taggedTemplateStringsWithOverloadResolution3_ES6.ts(2,10): error TS2394: This overload signature is not compatible with its implementation signature.
taggedTemplateStringsWithOverloadResolution3_ES6.ts(6,25): error TS2769: No overload matches this call.
  Overload 1 of 2, '(strs: TemplateStringsArray, s: string): string', gave the following error.
    Argument of type 'undefined' is not assignable to parameter of type 'string'.
  Overload 2 of 2, '(strs: TemplateStringsArray, n: number): number', gave the following error.
    Argument of type 'undefined' is not assignable to parameter of type 'number'.
taggedTemplateStringsWithOverloadResolution3_ES6.ts(9,9): error TS2769: No overload matches this call.
  Overload 1 of 2, '(strs: TemplateStringsArray, s: string): string', gave the following error.
    Argument of type '{}' is not assignable to parameter of type 'string'.
  Overload 2 of 2, '(strs: TemplateStringsArray, n: number): number', gave the following error.
    Argument of type '{}' is not assignable to parameter of type 'number'.
taggedTemplateStringsWithOverloadResolution3_ES6.ts(11,10): error TS2394: This overload signature is not compatible with its implementation signature.
taggedTemplateStringsWithOverloadResolution3_ES6.ts(15,5): error TS2322: Type 'undefined' is not assignable to type 'Date'.
taggedTemplateStringsWithOverloadResolution3_ES6.ts(18,4): error TS2339: Property 'foo' does not exist on type 'Date'.
taggedTemplateStringsWithOverloadResolution3_ES6.ts(19,1): error TS2722: Cannot invoke an object which is possibly 'undefined'.
taggedTemplateStringsWithOverloadResolution3_ES6.ts(28,10): error TS2394: This overload signature is not compatible with its implementation signature.
taggedTemplateStringsWithOverloadResolution3_ES6.ts(44,1): error TS2554: Expected 2-4 arguments, but got 1.
taggedTemplateStringsWithOverloadResolution3_ES6.ts(47,10): error TS7010: 'fn4', which lacks return-type annotation, implicitly has an 'any' return type.
taggedTemplateStringsWithOverloadResolution3_ES6.ts(48,10): error TS7010: 'fn4', which lacks return-type annotation, implicitly has an 'any' return type.
taggedTemplateStringsWithOverloadResolution3_ES6.ts(49,10): error TS7010: 'fn4', which lacks return-type annotation, implicitly has an 'any' return type.
taggedTemplateStringsWithOverloadResolution3_ES6.ts(55,1): error TS2769: No overload matches this call.
  Overload 1 of 3, '(strs: TemplateStringsArray, n: string, m: number): any', gave the following error.
    Argument of type 'number' is not assignable to parameter of type 'string'.
  Overload 2 of 3, '(strs: TemplateStringsArray, n: 3, m: string): any', gave the following error.
    Argument of type 'undefined' is not assignable to parameter of type 'string'.
taggedTemplateStringsWithOverloadResolution3_ES6.ts(56,1): error TS2769: No overload matches this call.
  Overload 1 of 3, '(strs: TemplateStringsArray, n: "", m: number): any', gave the following error.
    Argument of type 'null' is not assignable to parameter of type 'number'.
  Overload 2 of 3, '(strs: TemplateStringsArray, n: number, m: string): any', gave the following error.
    Argument of type 'string' is not assignable to parameter of type 'number'.
taggedTemplateStringsWithOverloadResolution3_ES6.ts(59,9): error TS2769: No overload matches this call.
  Overload 1 of 3, '(strs: TemplateStringsArray, n: string, m: number): any', gave the following error.
    Argument of type 'null' is not assignable to parameter of type 'string'.
  Overload 2 of 3, '(strs: TemplateStringsArray, n: number, m: string): any', gave the following error.
    Argument of type 'null' is not assignable to parameter of type 'number'.
taggedTemplateStringsWithOverloadResolution3_ES6.ts(62,9): error TS2769: No overload matches this call.
  Overload 1 of 3, '(strs: TemplateStringsArray, n: string, m: number): any', gave the following error.
    Argument of type 'boolean' is not assignable to parameter of type 'string'.
  Overload 2 of 3, '(strs: TemplateStringsArray, n: number, m: string): any', gave the following error.
    Argument of type 'boolean' is not assignable to parameter of type 'number'.
taggedTemplateStringsWithOverloadResolution3_ES6.ts(63,9): error TS2769: No overload matches this call.
  Overload 1 of 3, '(strs: TemplateStringsArray, n: string, m: number): any', gave the following error.
    Argument of type 'null' is not assignable to parameter of type 'string'.
  Overload 2 of 3, '(strs: TemplateStringsArray, n: number, m: string): any', gave the following error.
    Argument of type 'null' is not assignable to parameter of type 'number'.
taggedTemplateStringsWithOverloadResolution3_ES6.ts(66,10): error TS2394: This overload signature is not compatible with its implementation signature.
taggedTemplateStringsWithOverloadResolution3_ES6.ts(69,18): error TS2551: Property 'toFixed' does not exist on type 'string'. Did you mean 'fixed'?


==== taggedTemplateStringsWithOverloadResolution3_ES6.ts (19 errors) ====
    // Ambiguous call picks the first overload in declaration order
    function fn1(strs: TemplateStringsArray, s: string): string;
             ~~~
!!! error TS2394: This overload signature is not compatible with its implementation signature.
!!! related TS2750 taggedTemplateStringsWithOverloadResolution3_ES6.ts:4:10: The implementation signature is declared here.
    function fn1(strs: TemplateStringsArray, n: number): number;
    function fn1() { return null; }
    
    var s: string = fn1 `${ undefined }`;
                            ~~~~~~~~~
!!! error TS2769: No overload matches this call.
!!! error TS2769:   Overload 1 of 2, '(strs: TemplateStringsArray, s: string): string', gave the following error.
!!! error TS2769:     Argument of type 'undefined' is not assignable to parameter of type 'string'.
!!! error TS2769:   Overload 2 of 2, '(strs: TemplateStringsArray, n: number): number', gave the following error.
!!! error TS2769:     Argument of type 'undefined' is not assignable to parameter of type 'number'.
    
    // No candidate overloads found
    fn1 `${ {} }`; // Error
            ~~
!!! error TS2769: No overload matches this call.
!!! error TS2769:   Overload 1 of 2, '(strs: TemplateStringsArray, s: string): string', gave the following error.
!!! error TS2769:     Argument of type '{}' is not assignable to parameter of type 'string'.
!!! error TS2769:   Overload 2 of 2, '(strs: TemplateStringsArray, n: number): number', gave the following error.
!!! error TS2769:     Argument of type '{}' is not assignable to parameter of type 'number'.
    
    function fn2(strs: TemplateStringsArray, s: string, n: number): number;
             ~~~
!!! error TS2394: This overload signature is not compatible with its implementation signature.
!!! related TS2750 taggedTemplateStringsWithOverloadResolution3_ES6.ts:13:10: The implementation signature is declared here.
    function fn2<T>(strs: TemplateStringsArray, n: number, t: T): T;
    function fn2() { return undefined; }
    
    var d1: Date = fn2 `${ 0 }${ undefined }`; // contextually typed
        ~~
!!! error TS2322: Type 'undefined' is not assignable to type 'Date'.
    var d2 = fn2 `${ 0 }${ undefined }`; // any
    
    d1.foo(); // error
       ~~~
!!! error TS2339: Property 'foo' does not exist on type 'Date'.
    d2();     // no error (typed as any)
    ~~
!!! error TS2722: Cannot invoke an object which is possibly 'undefined'.
    
    // Generic and non-generic overload where generic overload is the only candidate
    fn2 `${ 0 }${ '' }`; // OK
    
    // Generic and non-generic overload where non-generic overload is the only candidate
    fn2 `${ '' }${ 0 }`; // OK
    
    // Generic overloads with differing arity
    function fn3<T>(strs: TemplateStringsArray, n: T): string;
             ~~~
!!! error TS2394: This overload signature is not compatible with its implementation signature.
!!! related TS2750 taggedTemplateStringsWithOverloadResolution3_ES6.ts:31:10: The implementation signature is declared here.
    function fn3<T, U>(strs: TemplateStringsArray, s: string, t: T, u: U): U;
    function fn3<T, U, V>(strs: TemplateStringsArray, v: V, u: U, t: T): number;
    function fn3() { return null; }
    
    var s = fn3 `${ 3 }`;
    var s = fn3 `${'' }${ 3 }${ '' }`;
    var n = fn3 `${ 5 }${ 5 }${ 5 }`;
    var n: number;
    
    // Generic overloads with differing arity tagging with arguments matching each overload type parameter count
    var s = fn3 `${ 4 }`
    var s = fn3 `${ '' }${ '' }${ '' }`;
    var n = fn3 `${ '' }${ '' }${ 3 }`;
    
    // Generic overloads with differing arity tagging with argument count that doesn't match any overload
    fn3 ``; // Error
    ~~~~~~
!!! error TS2554: Expected 2-4 arguments, but got 1.
!!! related TS6210 taggedTemplateStringsWithOverloadResolution3_ES6.ts:28:45: An argument for 'n' was not provided.
    
    // Generic overloads with constraints
    function fn4<T extends string, U extends number>(strs: TemplateStringsArray, n: T, m: U);
             ~~~
!!! error TS7010: 'fn4', which lacks return-type annotation, implicitly has an 'any' return type.
    function fn4<T extends number, U extends string>(strs: TemplateStringsArray, n: T, m: U);
             ~~~
!!! error TS7010: 'fn4', which lacks return-type annotation, implicitly has an 'any' return type.
    function fn4(strs: TemplateStringsArray)
             ~~~
!!! error TS7010: 'fn4', which lacks return-type annotation, implicitly has an 'any' return type.
    function fn4() { }
    
    // Generic overloads with constraints tagged with types that satisfy the constraints
    fn4 `${ '' }${ 3  }`;
    fn4 `${ 3  }${ '' }`;
    fn4 `${ 3  }${ undefined }`;
    ~~~
!!! error TS2769: No overload matches this call.
!!! error TS2769:   Overload 1 of 3, '(strs: TemplateStringsArray, n: string, m: number): any', gave the following error.
!!! error TS2769:     Argument of type 'number' is not assignable to parameter of type 'string'.
!!! error TS2769:   Overload 2 of 3, '(strs: TemplateStringsArray, n: 3, m: string): any', gave the following error.
!!! error TS2769:     Argument of type 'undefined' is not assignable to parameter of type 'string'.
    fn4 `${ '' }${ null }`;
    ~~~
!!! error TS2769: No overload matches this call.
!!! error TS2769:   Overload 1 of 3, '(strs: TemplateStringsArray, n: "", m: number): any', gave the following error.
!!! error TS2769:     Argument of type 'null' is not assignable to parameter of type 'number'.
!!! error TS2769:   Overload 2 of 3, '(strs: TemplateStringsArray, n: number, m: string): any', gave the following error.
!!! error TS2769:     Argument of type 'string' is not assignable to parameter of type 'number'.
    
    // Generic overloads with constraints called with type arguments that do not satisfy the constraints
    fn4 `${ null }${ null }`; // Error
            ~~~~
!!! error TS2769: No overload matches this call.
!!! error TS2769:   Overload 1 of 3, '(strs: TemplateStringsArray, n: string, m: number): any', gave the following error.
!!! error TS2769:     Argument of type 'null' is not assignable to parameter of type 'string'.
!!! error TS2769:   Overload 2 of 3, '(strs: TemplateStringsArray, n: number, m: string): any', gave the following error.
!!! error TS2769:     Argument of type 'null' is not assignable to parameter of type 'number'.
    
    // Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints
    fn4 `${ true }${ null }`;
            ~~~~
!!! error TS2769: No overload matches this call.
!!! error TS2769:   Overload 1 of 3, '(strs: TemplateStringsArray, n: string, m: number): any', gave the following error.
!!! error TS2769:     Argument of type 'boolean' is not assignable to parameter of type 'string'.
!!! error TS2769:   Overload 2 of 3, '(strs: TemplateStringsArray, n: number, m: string): any', gave the following error.
!!! error TS2769:     Argument of type 'boolean' is not assignable to parameter of type 'number'.
    fn4 `${ null }${ true }`;
            ~~~~
!!! error TS2769: No overload matches this call.
!!! error TS2769:   Overload 1 of 3, '(strs: TemplateStringsArray, n: string, m: number): any', gave the following error.
!!! error TS2769:     Argument of type 'null' is not assignable to parameter of type 'string'.
!!! error TS2769:   Overload 2 of 3, '(strs: TemplateStringsArray, n: number, m: string): any', gave the following error.
!!! error TS2769:     Argument of type 'null' is not assignable to parameter of type 'number'.
    
    // Non - generic overloads where contextual typing of function arguments has errors
    function fn5(strs: TemplateStringsArray, f: (n: string) => void): string;
             ~~~
!!! error TS2394: This overload signature is not compatible with its implementation signature.
!!! related TS2750 taggedTemplateStringsWithOverloadResolution3_ES6.ts:68:10: The implementation signature is declared here.
    function fn5(strs: TemplateStringsArray, f: (n: number) => void): number;
    function fn5() { return undefined; }
    fn5 `${ (n) => n.toFixed() }`; // will error; 'n' should have type 'string'.
                     ~~~~~~~
!!! error TS2551: Property 'toFixed' does not exist on type 'string'. Did you mean 'fixed'?
!!! related TS2728 lib.es2015.core.d.ts:--:--: 'fixed' is declared here.
    fn5 `${ (n) => n.substr(0) }`;
    
    