TypeScript Partial type without undefined
TS 4.4 UPDATE: TS4.4 will have an –exactOptionalPropertyTypes compiler flag to give you the behavior you’re looking for directly with Partial, as long as you intentionally add undefined where you’d like to allow it: interface MyType { foo: string bar?: number | undefined // <– you want this } const merge = (value1: MyType, value2: … Read more