21 lines
370 B
Text
21 lines
370 B
Text
|
=== tests/cases/compiler/typeOfOnTypeArg.ts ===
|
||
|
var A = { '': 3 };
|
||
|
>A : { '': number; }
|
||
|
>{ '': 3 } : { '': number; }
|
||
|
>3 : 3
|
||
|
|
||
|
function fill<B extends typeof A>(f: B) {
|
||
|
>fill : <B extends { '': number; }>(f: B) => void
|
||
|
>B : B
|
||
|
>A : { '': number; }
|
||
|
>f : B
|
||
|
>B : B
|
||
|
|
||
|
}
|
||
|
|
||
|
fill(32);
|
||
|
>fill(32) : any
|
||
|
>fill : <B extends { '': number; }>(f: B) => void
|
||
|
>32 : 32
|
||
|
|