24 lines
490 B
Text
24 lines
490 B
Text
=== tests/cases/compiler/genericFunctionSpecializations1.ts ===
|
|
function foo3<T>(test: string); // error
|
|
>foo3 : <T>(test: string) => any
|
|
>T : T
|
|
>test : string
|
|
|
|
function foo3<T>(test: T) { }
|
|
>foo3 : <T>(test: string) => any
|
|
>T : T
|
|
>test : T
|
|
>T : T
|
|
|
|
function foo4<T>(test: string); // valid
|
|
>foo4 : <T>(test: string) => any
|
|
>T : T
|
|
>test : string
|
|
|
|
function foo4<T extends String>(test: T) { }
|
|
>foo4 : <T>(test: string) => any
|
|
>T : T
|
|
>String : String
|
|
>test : T
|
|
>T : T
|
|
|