UNPKG

@vitruvius-labs/ts-predicate

Version:
5 lines (4 loc) 183 B
type ObjectWithProperty<O extends object, K extends string | symbol, T> = O & { [property in K]: K extends keyof O ? NonNullable<O[K]> : T; }; export type { ObjectWithProperty };