Skip to main content

Type Alias: OptionalDistributedPropertyTypeOfDistributed<T, K>

OptionalDistributedPropertyTypeOfDistributed<T, K> = T extends Record<any, any> ? OptionalPropertyTypeOf<T, K> : never

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

Gets the type of another type's property. If the property key is a union type, then it is distributed. If the parent type is a union, then it will be distributed. If a property does not exist on at least one distributed parent type, then the property type is returned as a union with undefined. If a property does not exist on any distributed parent type, 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.