23 lines
398 B
TypeScript
23 lines
398 B
TypeScript
//// [initializersInDeclarations.ts]
|
|
|
|
// Errors: Initializers & statements in declaration file
|
|
|
|
declare class Foo {
|
|
name = "test";
|
|
"some prop" = 42;
|
|
fn(): boolean {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
declare var x = [];
|
|
declare var y = {};
|
|
|
|
declare module M1 {
|
|
while(true);
|
|
|
|
export var v1 = () => false;
|
|
}
|
|
|
|
//// [initializersInDeclarations.js]
|
|
// Errors: Initializers & statements in declaration file
|