Skip to content

nameof<T>

Retrieves the name of a property of a given type T.

Import:

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

Signature:

function nameof(name: StringKeys<T>): StringKeys<T>

Parameters:

ParameterTypeDescription
nameStringKeys<T>The name of the property as a string.

Returns: StringKeys<T> — The name of the property.