Skip to content

deleteProperty<T>

Deletes a property from an object.

Import:

import { deleteProperty } from 'obsidian-dev-utils/object-utils';

Signature:

function deleteProperty(obj: T, propertyName: keyof T): boolean

Parameters:

ParameterTypeDescription
objTThe object to delete the property from.
propertyNamekeyof TThe name of the property to delete.

Returns: booleantrue if the property was present, otherwise false.