diff --git a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.js b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.js index efd82f27d1..caf90acae5 100644 --- a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.js +++ b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.js @@ -11,3 +11,7 @@ module // this is the identifier 'module' //// [asiPreventsParsingAsAmbientExternalModule01.js] var declare; var module; +declare; // this is the identifier 'declare' +module; // this is the identifier 'module' +"my external module"; // this is just a string +{ } // this is a block body diff --git a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.symbols b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.symbols index 87eb8daf7e..c35432b7ec 100644 --- a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.symbols @@ -7,6 +7,10 @@ var module: string; >module : Symbol(module, Decl(asiPreventsParsingAsAmbientExternalModule01.ts, 2, 3)) declare // this is the identifier 'declare' +>declare : Symbol(declare, Decl(asiPreventsParsingAsAmbientExternalModule01.ts, 1, 3)) + module // this is the identifier 'module' +>module : Symbol(module, Decl(asiPreventsParsingAsAmbientExternalModule01.ts, 2, 3)) + "my external module" // this is just a string { } // this is a block body diff --git a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.types b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.types index 94a2cc8d6a..3e6aade9a2 100644 --- a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.types +++ b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule01.types @@ -7,6 +7,12 @@ var module: string; >module : string declare // this is the identifier 'declare' +>declare : number + module // this is the identifier 'module' +>module : string + "my external module" // this is just a string +>"my external module" : string + { } // this is a block body diff --git a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.errors.txt b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.errors.txt deleted file mode 100644 index 3064b137a1..0000000000 --- a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.errors.txt +++ /dev/null @@ -1,16 +0,0 @@ -tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule02.ts(8,5): error TS2435: Ambient modules cannot be nested in other modules. - - -==== tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule02.ts (1 errors) ==== - - var declare: number; - var module: string; - - module container { - declare // this is the identifier 'declare' - module // this is the identifier 'module' - "my external module" // this is just a string - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2435: Ambient modules cannot be nested in other modules. - { } // this is a block body - } \ No newline at end of file diff --git a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.js b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.js index 444b4b392c..20e2693ba7 100644 --- a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.js +++ b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.js @@ -13,3 +13,10 @@ module container { //// [asiPreventsParsingAsAmbientExternalModule02.js] var declare; var module; +var container; +(function (container) { + declare; // this is the identifier 'declare' + module; // this is the identifier 'module' + "my external module"; // this is just a string + { } // this is a block body +})(container || (container = {})); diff --git a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.symbols b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.symbols new file mode 100644 index 0000000000..ed97f39fc1 --- /dev/null +++ b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.symbols @@ -0,0 +1,20 @@ +=== tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule02.ts === + +var declare: number; +>declare : Symbol(declare, Decl(asiPreventsParsingAsAmbientExternalModule02.ts, 1, 3)) + +var module: string; +>module : Symbol(module, Decl(asiPreventsParsingAsAmbientExternalModule02.ts, 2, 3)) + +module container { +>container : Symbol(container, Decl(asiPreventsParsingAsAmbientExternalModule02.ts, 2, 19)) + + declare // this is the identifier 'declare' +>declare : Symbol(declare, Decl(asiPreventsParsingAsAmbientExternalModule02.ts, 1, 3)) + + module // this is the identifier 'module' +>module : Symbol(module, Decl(asiPreventsParsingAsAmbientExternalModule02.ts, 2, 3)) + + "my external module" // this is just a string + { } // this is a block body +} diff --git a/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.types b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.types new file mode 100644 index 0000000000..6767185399 --- /dev/null +++ b/tests/baselines/reference/asiPreventsParsingAsAmbientExternalModule02.types @@ -0,0 +1,22 @@ +=== tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule02.ts === + +var declare: number; +>declare : number + +var module: string; +>module : string + +module container { +>container : typeof container + + declare // this is the identifier 'declare' +>declare : number + + module // this is the identifier 'module' +>module : string + + "my external module" // this is just a string +>"my external module" : string + + { } // this is a block body +} diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace01.js b/tests/baselines/reference/asiPreventsParsingAsNamespace01.js index eed9769da6..282d9dd1c7 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace01.js +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace01.js @@ -10,3 +10,6 @@ n // this is the identifier 'n' //// [asiPreventsParsingAsNamespace01.js] var namespace; var n; +namespace; // this is the identifier 'namespace' +n; // this is the identifier 'n' +{ } // this is a block body diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace01.symbols b/tests/baselines/reference/asiPreventsParsingAsNamespace01.symbols index a2494904be..b196d73335 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace01.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace01.symbols @@ -4,10 +4,12 @@ var namespace: number; >namespace : Symbol(namespace, Decl(asiPreventsParsingAsNamespace01.ts, 1, 3)) var n: string; ->n : Symbol(n, Decl(asiPreventsParsingAsNamespace01.ts, 2, 3), Decl(asiPreventsParsingAsNamespace01.ts, 2, 14)) +>n : Symbol(n, Decl(asiPreventsParsingAsNamespace01.ts, 2, 3)) namespace // this is the identifier 'namespace' +>namespace : Symbol(namespace, Decl(asiPreventsParsingAsNamespace01.ts, 1, 3)) + n // this is the identifier 'n' ->n : Symbol(n, Decl(asiPreventsParsingAsNamespace01.ts, 2, 3), Decl(asiPreventsParsingAsNamespace01.ts, 2, 14)) +>n : Symbol(n, Decl(asiPreventsParsingAsNamespace01.ts, 2, 3)) { } // this is a block body diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace01.types b/tests/baselines/reference/asiPreventsParsingAsNamespace01.types index 87044c5806..417a96dbed 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace01.types +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace01.types @@ -7,6 +7,8 @@ var n: string; >n : string namespace // this is the identifier 'namespace' +>namespace : number + n // this is the identifier 'n' >n : string diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace02.js b/tests/baselines/reference/asiPreventsParsingAsNamespace02.js index de2bdfa8a9..514a026dc7 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace02.js +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace02.js @@ -10,3 +10,6 @@ m // this is the identifier 'm' //// [asiPreventsParsingAsNamespace02.js] var module; var m; +module; // this is the identifier 'namespace' +m; // this is the identifier 'm' +{ } // this is a block body diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace02.symbols b/tests/baselines/reference/asiPreventsParsingAsNamespace02.symbols index 70024a8de6..a3bb37c73b 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace02.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace02.symbols @@ -4,10 +4,12 @@ var module: number; >module : Symbol(module, Decl(asiPreventsParsingAsNamespace02.ts, 1, 3)) var m: string; ->m : Symbol(m, Decl(asiPreventsParsingAsNamespace02.ts, 2, 3), Decl(asiPreventsParsingAsNamespace02.ts, 2, 14)) +>m : Symbol(m, Decl(asiPreventsParsingAsNamespace02.ts, 2, 3)) module // this is the identifier 'namespace' +>module : Symbol(module, Decl(asiPreventsParsingAsNamespace02.ts, 1, 3)) + m // this is the identifier 'm' ->m : Symbol(m, Decl(asiPreventsParsingAsNamespace02.ts, 2, 3), Decl(asiPreventsParsingAsNamespace02.ts, 2, 14)) +>m : Symbol(m, Decl(asiPreventsParsingAsNamespace02.ts, 2, 3)) { } // this is a block body diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace02.types b/tests/baselines/reference/asiPreventsParsingAsNamespace02.types index 8f6dec87a0..e9e1433be7 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace02.types +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace02.types @@ -7,6 +7,8 @@ var m: string; >m : string module // this is the identifier 'namespace' +>module : number + m // this is the identifier 'm' >m : string diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace03.js b/tests/baselines/reference/asiPreventsParsingAsNamespace03.js index 6d8b897097..3c27694f5c 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace03.js +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace03.js @@ -12,3 +12,9 @@ namespace container { //// [asiPreventsParsingAsNamespace03.js] var namespace; var n; +var container; +(function (container) { + namespace; // this is the identifier 'namespace' + n; // this is the identifier 'n' + { } // this is a block body +})(container || (container = {})); diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace03.symbols b/tests/baselines/reference/asiPreventsParsingAsNamespace03.symbols index 8dfa30c17a..e77d012a1b 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace03.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace03.symbols @@ -10,8 +10,10 @@ namespace container { >container : Symbol(container, Decl(asiPreventsParsingAsNamespace03.ts, 2, 14)) namespace // this is the identifier 'namespace' +>namespace : Symbol(namespace, Decl(asiPreventsParsingAsNamespace03.ts, 1, 3)) + n // this is the identifier 'n' ->n : Symbol(n, Decl(asiPreventsParsingAsNamespace03.ts, 4, 21)) +>n : Symbol(n, Decl(asiPreventsParsingAsNamespace03.ts, 2, 3)) { } // this is a block body } diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace03.types b/tests/baselines/reference/asiPreventsParsingAsNamespace03.types index 3742375715..f119a789e1 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace03.types +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace03.types @@ -7,11 +7,13 @@ var n: string; >n : string namespace container { ->container : any +>container : typeof container namespace // this is the identifier 'namespace' +>namespace : number + n // this is the identifier 'n' ->n : any +>n : string { } // this is a block body } diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace04.errors.txt b/tests/baselines/reference/asiPreventsParsingAsNamespace04.errors.txt deleted file mode 100644 index d0a6be446a..0000000000 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace04.errors.txt +++ /dev/null @@ -1,9 +0,0 @@ -tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts(3,8): error TS1003: Identifier expected. - - -==== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts (1 errors) ==== - - let module = 10; - module in {} - ~~ -!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace04.js b/tests/baselines/reference/asiPreventsParsingAsNamespace04.js index bcd8975d46..704c8893e7 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace04.js +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace04.js @@ -5,4 +5,4 @@ module in {} //// [asiPreventsParsingAsNamespace04.js] var module = 10; - in {}; +module in {}; diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace04.symbols b/tests/baselines/reference/asiPreventsParsingAsNamespace04.symbols new file mode 100644 index 0000000000..60d1f8fcc4 --- /dev/null +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace04.symbols @@ -0,0 +1,8 @@ +=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts === + +let module = 10; +>module : Symbol(module, Decl(asiPreventsParsingAsNamespace04.ts, 1, 3)) + +module in {} +>module : Symbol(module, Decl(asiPreventsParsingAsNamespace04.ts, 1, 3)) + diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace04.types b/tests/baselines/reference/asiPreventsParsingAsNamespace04.types new file mode 100644 index 0000000000..3fa2a448cf --- /dev/null +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace04.types @@ -0,0 +1,11 @@ +=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace04.ts === + +let module = 10; +>module : number +>10 : number + +module in {} +>module in {} : boolean +>module : number +>{} : {} + diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace05.js b/tests/baselines/reference/asiPreventsParsingAsNamespace05.js index 0a525179d2..35f557328c 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace05.js +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace05.js @@ -1,6 +1,9 @@ //// [asiPreventsParsingAsNamespace05.ts] let namespace = 10; +namespace a.b { + export let c = 20; +} namespace a.b.c @@ -9,3 +12,14 @@ a.b.c //// [asiPreventsParsingAsNamespace05.js] var namespace = 10; +var a; +(function (a) { + var b; + (function (b) { + b.c = 20; + })(b = a.b || (a.b = {})); +})(a || (a = {})); +namespace; +a.b.c; +{ +} diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace05.symbols b/tests/baselines/reference/asiPreventsParsingAsNamespace05.symbols index 65125806b6..47f05862b0 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace05.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace05.symbols @@ -3,10 +3,22 @@ let namespace = 10; >namespace : Symbol(namespace, Decl(asiPreventsParsingAsNamespace05.ts, 1, 3)) -namespace -a.b.c +namespace a.b { >a : Symbol(a, Decl(asiPreventsParsingAsNamespace05.ts, 1, 19)) ->b : Symbol(b, Decl(asiPreventsParsingAsNamespace05.ts, 4, 2)) ->c : Symbol(c, Decl(asiPreventsParsingAsNamespace05.ts, 4, 4)) +>b : Symbol(b, Decl(asiPreventsParsingAsNamespace05.ts, 2, 12)) + + export let c = 20; +>c : Symbol(c, Decl(asiPreventsParsingAsNamespace05.ts, 3, 14)) +} + +namespace +>namespace : Symbol(namespace, Decl(asiPreventsParsingAsNamespace05.ts, 1, 3)) + +a.b.c +>a.b.c : Symbol(a.b.c, Decl(asiPreventsParsingAsNamespace05.ts, 3, 14)) +>a.b : Symbol(a.b, Decl(asiPreventsParsingAsNamespace05.ts, 2, 12)) +>a : Symbol(a, Decl(asiPreventsParsingAsNamespace05.ts, 1, 19)) +>b : Symbol(a.b, Decl(asiPreventsParsingAsNamespace05.ts, 2, 12)) +>c : Symbol(a.b.c, Decl(asiPreventsParsingAsNamespace05.ts, 3, 14)) { } diff --git a/tests/baselines/reference/asiPreventsParsingAsNamespace05.types b/tests/baselines/reference/asiPreventsParsingAsNamespace05.types index f17ad1f2a1..515147c109 100644 --- a/tests/baselines/reference/asiPreventsParsingAsNamespace05.types +++ b/tests/baselines/reference/asiPreventsParsingAsNamespace05.types @@ -4,10 +4,23 @@ let namespace = 10; >namespace : number >10 : number +namespace a.b { +>a : typeof a +>b : typeof b + + export let c = 20; +>c : number +>20 : number +} + namespace +>namespace : number + a.b.c ->a : any ->b : any ->c : any +>a.b.c : number +>a.b : typeof a.b +>a : typeof a +>b : typeof a.b +>c : number { } diff --git a/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.js b/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.js index 33e3895fab..b05988290c 100644 --- a/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.js +++ b/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.js @@ -11,3 +11,5 @@ Foo = string; var type; var string; var Foo; +type; +Foo = string; diff --git a/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.symbols b/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.symbols index d11c9ff5c1..fa82d53ac7 100644 --- a/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.symbols @@ -7,9 +7,12 @@ var string; >string : Symbol(string, Decl(asiPreventsParsingAsTypeAlias01.ts, 2, 3)) var Foo; ->Foo : Symbol(Foo, Decl(asiPreventsParsingAsTypeAlias01.ts, 3, 3), Decl(asiPreventsParsingAsTypeAlias01.ts, 3, 8)) +>Foo : Symbol(Foo, Decl(asiPreventsParsingAsTypeAlias01.ts, 3, 3)) type -Foo = string; ->Foo : Symbol(Foo, Decl(asiPreventsParsingAsTypeAlias01.ts, 3, 3), Decl(asiPreventsParsingAsTypeAlias01.ts, 3, 8)) +>type : Symbol(type, Decl(asiPreventsParsingAsTypeAlias01.ts, 1, 3)) + +Foo = string; +>Foo : Symbol(Foo, Decl(asiPreventsParsingAsTypeAlias01.ts, 3, 3)) +>string : Symbol(string, Decl(asiPreventsParsingAsTypeAlias01.ts, 2, 3)) diff --git a/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.types b/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.types index d112022afa..7492a698e3 100644 --- a/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.types +++ b/tests/baselines/reference/asiPreventsParsingAsTypeAlias01.types @@ -10,6 +10,10 @@ var Foo; >Foo : any type -Foo = string; ->Foo : string +>type : any + +Foo = string; +>Foo = string : any +>Foo : any +>string : any diff --git a/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.js b/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.js index 4a8298b2bd..eae9898c8d 100644 --- a/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.js +++ b/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.js @@ -13,3 +13,8 @@ namespace container { var type; var string; var Foo; +var container; +(function (container) { + type; + Foo = string; +})(container || (container = {})); diff --git a/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.symbols b/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.symbols index 0da8856010..4b83dba4c5 100644 --- a/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.symbols +++ b/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.symbols @@ -13,6 +13,9 @@ namespace container { >container : Symbol(container, Decl(asiPreventsParsingAsTypeAlias02.ts, 3, 8)) type +>type : Symbol(type, Decl(asiPreventsParsingAsTypeAlias02.ts, 1, 3)) + Foo = string; ->Foo : Symbol(Foo, Decl(asiPreventsParsingAsTypeAlias02.ts, 5, 21)) +>Foo : Symbol(Foo, Decl(asiPreventsParsingAsTypeAlias02.ts, 3, 3)) +>string : Symbol(string, Decl(asiPreventsParsingAsTypeAlias02.ts, 2, 3)) } diff --git a/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.types b/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.types index 4af0721ec2..1e6c7a8caf 100644 --- a/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.types +++ b/tests/baselines/reference/asiPreventsParsingAsTypeAlias02.types @@ -10,9 +10,13 @@ var Foo; >Foo : any namespace container { ->container : any +>container : typeof container type +>type : any + Foo = string; ->Foo : string +>Foo = string : any +>Foo : any +>string : any } diff --git a/tests/baselines/reference/reservedNamesInAliases.errors.txt b/tests/baselines/reference/reservedNamesInAliases.errors.txt index 277e06111c..5c17158053 100644 --- a/tests/baselines/reference/reservedNamesInAliases.errors.txt +++ b/tests/baselines/reference/reservedNamesInAliases.errors.txt @@ -2,12 +2,13 @@ tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(2,6): error tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(3,6): error TS2457: Type alias name cannot be 'number' tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(4,6): error TS2457: Type alias name cannot be 'boolean' tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(5,6): error TS2457: Type alias name cannot be 'string' -tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,6): error TS1003: Identifier expected. -tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,11): error TS1005: ';' expected. +tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,1): error TS2304: Cannot find name 'type'. +tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,6): error TS1005: ';' expected. +tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,11): error TS1109: Expression expected. tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,13): error TS2304: Cannot find name 'I'. -==== tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts (7 errors) ==== +==== tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts (8 errors) ==== interface I {} type any = I; ~~~ @@ -22,9 +23,11 @@ tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,13): error ~~~~~~ !!! error TS2457: Type alias name cannot be 'string' type void = I; + ~~~~ +!!! error TS2304: Cannot find name 'type'. ~~~~ -!!! error TS1003: Identifier expected. - ~ !!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. ~ !!! error TS2304: Cannot find name 'I'. \ No newline at end of file diff --git a/tests/baselines/reference/reservedNamesInAliases.js b/tests/baselines/reference/reservedNamesInAliases.js index 773cc3ca84..4ebc3bdb95 100644 --- a/tests/baselines/reference/reservedNamesInAliases.js +++ b/tests/baselines/reference/reservedNamesInAliases.js @@ -7,4 +7,6 @@ type string = I; type void = I; //// [reservedNamesInAliases.js] +type; +void ; I; diff --git a/tests/baselines/reference/reservedWords2.errors.txt b/tests/baselines/reference/reservedWords2.errors.txt index 471eef4710..090b2d0d43 100644 --- a/tests/baselines/reference/reservedWords2.errors.txt +++ b/tests/baselines/reference/reservedWords2.errors.txt @@ -13,8 +13,8 @@ tests/cases/compiler/reservedWords2.ts(4,12): error TS1109: Expression expected. tests/cases/compiler/reservedWords2.ts(5,9): error TS2300: Duplicate identifier '(Missing)'. tests/cases/compiler/reservedWords2.ts(5,10): error TS1003: Identifier expected. tests/cases/compiler/reservedWords2.ts(5,18): error TS1005: '=>' expected. -tests/cases/compiler/reservedWords2.ts(6,7): error TS2300: Duplicate identifier '(Missing)'. -tests/cases/compiler/reservedWords2.ts(6,8): error TS1003: Identifier expected. +tests/cases/compiler/reservedWords2.ts(6,1): error TS2304: Cannot find name 'module'. +tests/cases/compiler/reservedWords2.ts(6,8): error TS1005: ';' expected. tests/cases/compiler/reservedWords2.ts(7,11): error TS2300: Duplicate identifier '(Missing)'. tests/cases/compiler/reservedWords2.ts(7,11): error TS1005: ':' expected. tests/cases/compiler/reservedWords2.ts(7,19): error TS2300: Duplicate identifier '(Missing)'. @@ -68,10 +68,10 @@ tests/cases/compiler/reservedWords2.ts(10,6): error TS1003: Identifier expected. ~ !!! error TS1005: '=>' expected. module void {} - -!!! error TS2300: Duplicate identifier '(Missing)'. + ~~~~~~ +!!! error TS2304: Cannot find name 'module'. ~~~~ -!!! error TS1003: Identifier expected. +!!! error TS1005: ';' expected. var {while, return} = { while: 1, return: 2 }; !!! error TS2300: Duplicate identifier '(Missing)'. diff --git a/tests/baselines/reference/reservedWords2.js b/tests/baselines/reference/reservedWords2.js index 6d5a5f530c..fb90a718ec 100644 --- a/tests/baselines/reference/reservedWords2.js +++ b/tests/baselines/reference/reservedWords2.js @@ -23,6 +23,7 @@ var ; typeof ; 10; throw function () { }; +module; void {}; var _a = { while: 1, return: 2 }, = _a.while, = _a.return; var _b = { this: 1, switch: { continue: 2 } }, = _b.this, = _b.switch.continue;