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

34 lines
978 B
Plaintext
Raw Normal View History

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