a4f9bf0fce
* Create type aliases for unresolved type symbols * Accept new baselines * Update fourslash tests * Unresolved import aliases create tagged unresolved symbols * Add comments * Accept new baselines * Add fourslash tests
55 lines
1.4 KiB
Plaintext
55 lines
1.4 KiB
Plaintext
=== tests/cases/compiler/typeParameterConstraints1.ts ===
|
|
function foo1<T extends any>(test: T) { }
|
|
>foo1 : <T extends unknown>(test: T) => void
|
|
>test : T
|
|
|
|
function foo2<T extends number>(test: T) { }
|
|
>foo2 : <T extends number>(test: T) => void
|
|
>test : T
|
|
|
|
function foo3<T extends string>(test: T) { }
|
|
>foo3 : <T extends string>(test: T) => void
|
|
>test : T
|
|
|
|
function foo4<T extends Date>(test: T) { } // valid
|
|
>foo4 : <T extends Date>(test: T) => void
|
|
>test : T
|
|
|
|
function foo5<T extends RegExp>(test: T) { } // valid
|
|
>foo5 : <T extends RegExp>(test: T) => void
|
|
>test : T
|
|
|
|
function foo6<T extends hm>(test: T) { }
|
|
>foo6 : <T extends hm>(test: T) => void
|
|
>test : T
|
|
|
|
function foo7<T extends Object>(test: T) { } // valid
|
|
>foo7 : <T extends Object>(test: T) => void
|
|
>test : T
|
|
|
|
function foo8<T extends "">(test: T) { }
|
|
>foo8 : <T extends "">(test: T) => void
|
|
>test : T
|
|
|
|
function foo9<T extends 1 > (test: T) { }
|
|
>foo9 : <T extends 1>(test: T) => void
|
|
>test : T
|
|
|
|
function foo10<T extends (1)> (test: T) { }
|
|
>foo10 : <T extends 1>(test: T) => void
|
|
>test : T
|
|
|
|
function foo11<T extends null> (test: T) { }
|
|
>foo11 : <T extends null>(test: T) => void
|
|
>null : null
|
|
>test : T
|
|
|
|
function foo12<T extends undefined>(test: T) { }
|
|
>foo12 : <T extends undefined>(test: T) => void
|
|
>test : T
|
|
|
|
function foo13<T extends void>(test: T) { }
|
|
>foo13 : <T extends void>(test: T) => void
|
|
>test : T
|
|
|