TypeScript/tests/baselines/reference/initializersInDeclarations.errors.txt

28 lines
904 B
Text
Raw Normal View History

tests/cases/conformance/externalModules/initializersInDeclarations.ts(5,7): error TS1039: Initializers are not allowed in ambient contexts.
tests/cases/conformance/externalModules/initializersInDeclarations.ts(6,14): error TS1039: Initializers are not allowed in ambient contexts.
==== tests/cases/conformance/externalModules/initializersInDeclarations.ts (2 errors) ====
2014-07-13 01:04:16 +02:00
// Errors: Initializers & statements in declaration file
declare class Foo {
name = "test";
~
!!! error TS1039: Initializers are not allowed in ambient contexts.
2014-07-13 01:04:16 +02:00
"some prop" = 42;
~
!!! error TS1039: Initializers are not allowed in ambient contexts.
2014-07-13 01:04:16 +02:00
fn(): boolean {
return false;
}
}
declare var x = [];
declare var y = {};
declare module M1 {
while(true);
export var v1 = () => false;
}