mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
36 lines
778 B
Plaintext
36 lines
778 B
Plaintext
//// [tests/cases/conformance/externalModules/initializersInDeclarations.ts] ////
|
|
|
|
=== file1.d.ts ===
|
|
// Errors: Initializers & statements in declaration file
|
|
|
|
declare class Foo {
|
|
>Foo : Symbol(Foo, Decl(file1.d.ts, 0, 0))
|
|
|
|
name = "test";
|
|
>name : Symbol(Foo.name, Decl(file1.d.ts, 2, 19))
|
|
|
|
"some prop" = 42;
|
|
>"some prop" : Symbol(Foo["some prop"], Decl(file1.d.ts, 3, 15))
|
|
|
|
fn(): boolean {
|
|
>fn : Symbol(Foo.fn, Decl(file1.d.ts, 4, 18))
|
|
|
|
return false;
|
|
}
|
|
}
|
|
|
|
declare var x = [];
|
|
>x : Symbol(x, Decl(file1.d.ts, 10, 11))
|
|
|
|
declare var y = {};
|
|
>y : Symbol(y, Decl(file1.d.ts, 11, 11))
|
|
|
|
declare namespace M1 {
|
|
>M1 : Symbol(M1, Decl(file1.d.ts, 11, 19))
|
|
|
|
while(true);
|
|
|
|
export var v1 = () => false;
|
|
>v1 : Symbol(v1, Decl(file1.d.ts, 16, 11))
|
|
}
|