Skip to main content

Type Alias: OptionalPropertyTypeOf<T, K>

OptionalPropertyTypeOf<T, K> = [K] extends [keyof T] ? T[K] : undefined

Defined in: src/sdk/utils/types/UtilityTypes.ts:35

Gets the type of another type's property. If the property does not exist, then undefined is returned.

Type Parameters

Type ParameterDescription
TThe type containing the property for which to get a type.
KThe key of the property for which to get a type.