TypeScript/tests/baselines/reference/initializersInDeclarations.errors.txt
2014-11-19 13:26:15 -08:00

31 lines
No EOL
1.1 KiB
Text

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(7,16): error TS1037: A function implementation cannot be declared in an ambient context.
==== tests/cases/conformance/externalModules/initializersInDeclarations.ts (3 errors) ====
// Errors: Initializers & statements in declaration file
declare class Foo {
name = "test";
~
!!! error TS1039: Initializers are not allowed in ambient contexts.
"some prop" = 42;
~
!!! error TS1039: Initializers are not allowed in ambient contexts.
fn(): boolean {
~
!!! error TS1037: A function implementation cannot be declared in an ambient context.
return false;
}
}
declare var x = [];
declare var y = {};
declare module M1 {
while(true);
export var v1 = () => false;
}