contextuallyTypedOptionalProperty.ts(6,21): error TS18048: 'y' is possibly 'undefined'.
contextuallyTypedOptionalProperty.ts(9,18): error TS18048: 'y' is possibly 'undefined'.


==== contextuallyTypedOptionalProperty.ts (2 errors) ====
    // repro from https://github.com/microsoft/TypeScript/issues/55164
    
    declare function match<T>(cb: (value: T) => boolean): T;
    
    declare function foo(pos: { x?: number; y?: number }): boolean;
    foo({ y: match(y => y > 0) })
                        ~
!!! error TS18048: 'y' is possibly 'undefined'.
    
    declare function foo2(point: [number?]): boolean;
    foo2([match(y => y > 0)])
                     ~
!!! error TS18048: 'y' is possibly 'undefined'.
    