1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts(4,5): error TS1044: 'public' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts(8,5): error TS1044: 'public' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts(12,5): error TS1044: 'static' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts(16,5): error TS1044: 'static' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts(20,5): error TS1044: 'private' modifier cannot appear on a module or namespace element.
tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts(25,5): error TS1044: 'private' modifier cannot appear on a module or namespace element.
==== tests/cases/conformance/internalModules/moduleBody/invalidModuleWithVarStatements.ts (6 errors) ====
// All of these should be an error
module Y {
public var x: number = 0;
~~~~~~
!!! error TS1044: 'public' modifier cannot appear on a module or namespace element.
}
module Y2 {
public function fn(x: string) { }
~~~~~~
!!! error TS1044: 'public' modifier cannot appear on a module or namespace element.
}
module Y4 {
static var x: number = 0;
~~~~~~
!!! error TS1044: 'static' modifier cannot appear on a module or namespace element.
}
module YY {
static function fn(x: string) { }
~~~~~~
!!! error TS1044: 'static' modifier cannot appear on a module or namespace element.
}
module YY2 {
private var x: number = 0;
~~~~~~~
!!! error TS1044: 'private' modifier cannot appear on a module or namespace element.
}
module YY3 {
private function fn(x: string) { }
~~~~~~~
!!! error TS1044: 'private' modifier cannot appear on a module or namespace element.
}
|