Skip to content

nameof<T>

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

Import:

import { nameof } from '@mnaoumov/typescript-lib/object-utils';

Signature:

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

Parameters:

Parameter Type Description
name StringKeys<T> The name of the property as a string.

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