tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(8,6): error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I2'.
  Object literal may only specify known properties, and 'hello' does not exist in type 'I2'.
tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(9,4): error TS2345: Argument of type '{ value: string; }' is not assignable to parameter of type 'I2'.
  Property 'doStuff' is missing in type '{ value: string; }'.
tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(10,17): error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I2'.
  Object literal may only specify known properties, and 'what' does not exist in type 'I2'.
tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(11,6): error TS2345: Argument of type '{ toString: (s: any) => any; }' is not assignable to parameter of type 'I2'.
  Object literal may only specify known properties, and 'toString' does not exist in type 'I2'.
tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(12,6): error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I2'.
  Object literal may only specify known properties, and 'toString' does not exist in type 'I2'.
tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts(13,17): error TS2345: Argument of type '{ value: string; toString: (s: any) => any; }' is not assignable to parameter of type 'I2'.
  Object literal may only specify known properties, and 'toString' does not exist in type 'I2'.


==== tests/cases/compiler/objectLiteralFunctionArgContextualTyping2.ts (6 errors) ====
    interface I2 {
        value: string;
        doStuff: (t: string) => string;
    }
    
    function f2(args: I2) { }
    
    f2({ hello: 1 }) 
         ~~~~~~~~
!!! error TS2345: Argument of type '{ hello: number; }' is not assignable to parameter of type 'I2'.
!!! error TS2345:   Object literal may only specify known properties, and 'hello' does not exist in type 'I2'.
    f2({ value: '' })
       ~~~~~~~~~~~~~
!!! error TS2345: Argument of type '{ value: string; }' is not assignable to parameter of type 'I2'.
!!! error TS2345:   Property 'doStuff' is missing in type '{ value: string; }'.
    f2({ value: '', what: 1 }) 
                    ~~~~~~~
!!! error TS2345: Argument of type '{ value: string; what: number; }' is not assignable to parameter of type 'I2'.
!!! error TS2345:   Object literal may only specify known properties, and 'what' does not exist in type 'I2'.
    f2({ toString: (s) => s }) 
         ~~~~~~~~~~~~~~~~~~
!!! error TS2345: Argument of type '{ toString: (s: any) => any; }' is not assignable to parameter of type 'I2'.
!!! error TS2345:   Object literal may only specify known properties, and 'toString' does not exist in type 'I2'.
    f2({ toString: (s: string) => s }) 
         ~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I2'.
!!! error TS2345:   Object literal may only specify known properties, and 'toString' does not exist in type 'I2'.
    f2({ value: '', toString: (s) => s.uhhh }) 
                    ~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2345: Argument of type '{ value: string; toString: (s: any) => any; }' is not assignable to parameter of type 'I2'.
!!! error TS2345:   Object literal may only specify known properties, and 'toString' does not exist in type 'I2'.