partiallyAnnotatedFunctionInferenceWithTypeParameter.ts(2,3): error TS2564: Property 'test' has no initializer and is not definitely assigned in the constructor.
partiallyAnnotatedFunctionInferenceWithTypeParameter.ts(6,3): error TS2564: Property 'test2' has no initializer and is not definitely assigned in the constructor.
partiallyAnnotatedFunctionInferenceWithTypeParameter.ts(33,10): error TS2345: Argument of type '(t2: C, ...t3: D[]) => void' is not assignable to parameter of type '(t: C, t1: C, ...ts: C[]) => void'.
  Types of parameters 't3' and 't1' are incompatible.
    Property 'test2' is missing in type 'C' but required in type 'D'.


==== partiallyAnnotatedFunctionInferenceWithTypeParameter.ts (3 errors) ====
    class C {
      test: string
      ~~~~
!!! error TS2564: Property 'test' has no initializer and is not definitely assigned in the constructor.
    }
    
    class D extends C {
      test2: string
      ~~~~~
!!! error TS2564: Property 'test2' has no initializer and is not definitely assigned in the constructor.
    }
    
    declare function test<T extends C>(a: (t: T, t1: T) => void): T
    
    declare function testRest<T extends C>(a: (t: T, t1: T, ...ts: T[]) => void): T
    
    
    // exactly
    test((t1: D, t2) => { t2.test2 })
    test((t1, t2: D) => { t2.test2 })
    
    // zero arg
    test(() => {})
    
    // fewer args
    test((t1: D) => {})
    
    // rest arg
    test((...ts: D[]) => {})
    
    // source function has rest arg
    testRest((t1: D) => {})
    testRest((t1, t2, t3) => {})
    testRest((t1: D, t2, t3) => {})
    testRest((t1, t2: D, t3) => {})
    testRest((t2: D, ...t3) => {})
    testRest((t2, ...t3: D[]) => {})
             ~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2345: Argument of type '(t2: C, ...t3: D[]) => void' is not assignable to parameter of type '(t: C, t1: C, ...ts: C[]) => void'.
!!! error TS2345:   Types of parameters 't3' and 't1' are incompatible.
!!! error TS2345:     Property 'test2' is missing in type 'C' but required in type 'D'.
!!! related TS2728 partiallyAnnotatedFunctionInferenceWithTypeParameter.ts:6:3: 'test2' is declared here.
    