mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
30 lines
1.4 KiB
Plaintext
30 lines
1.4 KiB
Plaintext
//// [tests/cases/compiler/callSignaturesShouldBeResolvedBeforeSpecialization.ts] ////
|
|
|
|
=== callSignaturesShouldBeResolvedBeforeSpecialization.ts ===
|
|
interface I1<T> {
|
|
>I1 : Symbol(I1, Decl(callSignaturesShouldBeResolvedBeforeSpecialization.ts, 0, 0))
|
|
>T : Symbol(T, Decl(callSignaturesShouldBeResolvedBeforeSpecialization.ts, 0, 13))
|
|
|
|
(value: T): void;
|
|
>value : Symbol(value, Decl(callSignaturesShouldBeResolvedBeforeSpecialization.ts, 1, 5))
|
|
>T : Symbol(T, Decl(callSignaturesShouldBeResolvedBeforeSpecialization.ts, 0, 13))
|
|
|
|
field1: I1<boolean>;
|
|
>field1 : Symbol(I1.field1, Decl(callSignaturesShouldBeResolvedBeforeSpecialization.ts, 1, 21))
|
|
>I1 : Symbol(I1, Decl(callSignaturesShouldBeResolvedBeforeSpecialization.ts, 0, 0))
|
|
}
|
|
|
|
function foo() {
|
|
>foo : Symbol(foo, Decl(callSignaturesShouldBeResolvedBeforeSpecialization.ts, 3, 1))
|
|
|
|
var test!: I1<string>;
|
|
>test : Symbol(test, Decl(callSignaturesShouldBeResolvedBeforeSpecialization.ts, 6, 7))
|
|
>I1 : Symbol(I1, Decl(callSignaturesShouldBeResolvedBeforeSpecialization.ts, 0, 0))
|
|
|
|
test("expects boolean instead of string"); // should not error - "test" should not expect a boolean
|
|
>test : Symbol(test, Decl(callSignaturesShouldBeResolvedBeforeSpecialization.ts, 6, 7))
|
|
|
|
test(true); // should error - string expected
|
|
>test : Symbol(test, Decl(callSignaturesShouldBeResolvedBeforeSpecialization.ts, 6, 7))
|
|
}
|