Returns a type guard function, which receives an object and checks if the given property is not undefined.
Narrows the type of the given property within the object type from T | undefined to just T.
Example:
incoming type is { a: number, b: string | undefined }
outgoing type of returned type guard from propertyNotUndefined('b') is { a: number, b: string }
Returns a type guard function, which receives an object and checks if the given property is not undefined. Narrows the type of the given property within the object type from T | undefined to just T.
Example:
incoming type is { a: number, b: string | undefined }
outgoing type of returned type guard from propertyNotUndefined('b') is { a: number, b: string }