mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-17 10:31:20 -06:00
Added baselines.
This commit is contained in:
parent
e93b7a75ce
commit
448e8bf0c7
@ -0,0 +1,13 @@
|
||||
//// [asiPreventsParsingAsAmbientExternalModule01.ts]
|
||||
|
||||
var declare: number;
|
||||
var module: string;
|
||||
|
||||
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
|
||||
|
||||
//// [asiPreventsParsingAsAmbientExternalModule01.js]
|
||||
var declare;
|
||||
var module;
|
||||
@ -0,0 +1,12 @@
|
||||
=== tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule01.ts ===
|
||||
|
||||
var declare: number;
|
||||
>declare : Symbol(declare, Decl(asiPreventsParsingAsAmbientExternalModule01.ts, 1, 3))
|
||||
|
||||
var module: string;
|
||||
>module : Symbol(module, Decl(asiPreventsParsingAsAmbientExternalModule01.ts, 2, 3))
|
||||
|
||||
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
|
||||
@ -0,0 +1,12 @@
|
||||
=== tests/cases/conformance/externalModules/asiPreventsParsingAsAmbientExternalModule01.ts ===
|
||||
|
||||
var declare: number;
|
||||
>declare : number
|
||||
|
||||
var module: string;
|
||||
>module : string
|
||||
|
||||
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
|
||||
@ -0,0 +1,16 @@
|
||||
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
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
//// [asiPreventsParsingAsAmbientExternalModule02.ts]
|
||||
|
||||
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
|
||||
{ } // this is a block body
|
||||
}
|
||||
|
||||
//// [asiPreventsParsingAsAmbientExternalModule02.js]
|
||||
var declare;
|
||||
var module;
|
||||
12
tests/baselines/reference/asiPreventsParsingAsNamespace01.js
Normal file
12
tests/baselines/reference/asiPreventsParsingAsNamespace01.js
Normal file
@ -0,0 +1,12 @@
|
||||
//// [asiPreventsParsingAsNamespace01.ts]
|
||||
|
||||
var namespace: number;
|
||||
var n: string;
|
||||
|
||||
namespace // this is the identifier 'namespace'
|
||||
n // this is the identifier 'n'
|
||||
{ } // this is a block body
|
||||
|
||||
//// [asiPreventsParsingAsNamespace01.js]
|
||||
var namespace;
|
||||
var n;
|
||||
@ -0,0 +1,13 @@
|
||||
=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace01.ts ===
|
||||
|
||||
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))
|
||||
|
||||
namespace // this is the identifier 'namespace'
|
||||
n // this is the identifier 'n'
|
||||
>n : Symbol(n, Decl(asiPreventsParsingAsNamespace01.ts, 2, 3), Decl(asiPreventsParsingAsNamespace01.ts, 2, 14))
|
||||
|
||||
{ } // this is a block body
|
||||
@ -0,0 +1,13 @@
|
||||
=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace01.ts ===
|
||||
|
||||
var namespace: number;
|
||||
>namespace : number
|
||||
|
||||
var n: string;
|
||||
>n : string
|
||||
|
||||
namespace // this is the identifier 'namespace'
|
||||
n // this is the identifier 'n'
|
||||
>n : string
|
||||
|
||||
{ } // this is a block body
|
||||
12
tests/baselines/reference/asiPreventsParsingAsNamespace02.js
Normal file
12
tests/baselines/reference/asiPreventsParsingAsNamespace02.js
Normal file
@ -0,0 +1,12 @@
|
||||
//// [asiPreventsParsingAsNamespace02.ts]
|
||||
|
||||
var module: number;
|
||||
var m: string;
|
||||
|
||||
module // this is the identifier 'namespace'
|
||||
m // this is the identifier 'm'
|
||||
{ } // this is a block body
|
||||
|
||||
//// [asiPreventsParsingAsNamespace02.js]
|
||||
var module;
|
||||
var m;
|
||||
@ -0,0 +1,13 @@
|
||||
=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace02.ts ===
|
||||
|
||||
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))
|
||||
|
||||
module // this is the identifier 'namespace'
|
||||
m // this is the identifier 'm'
|
||||
>m : Symbol(m, Decl(asiPreventsParsingAsNamespace02.ts, 2, 3), Decl(asiPreventsParsingAsNamespace02.ts, 2, 14))
|
||||
|
||||
{ } // this is a block body
|
||||
@ -0,0 +1,13 @@
|
||||
=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace02.ts ===
|
||||
|
||||
var module: number;
|
||||
>module : number
|
||||
|
||||
var m: string;
|
||||
>m : string
|
||||
|
||||
module // this is the identifier 'namespace'
|
||||
m // this is the identifier 'm'
|
||||
>m : string
|
||||
|
||||
{ } // this is a block body
|
||||
14
tests/baselines/reference/asiPreventsParsingAsNamespace03.js
Normal file
14
tests/baselines/reference/asiPreventsParsingAsNamespace03.js
Normal file
@ -0,0 +1,14 @@
|
||||
//// [asiPreventsParsingAsNamespace03.ts]
|
||||
|
||||
var namespace: number;
|
||||
var n: string;
|
||||
|
||||
namespace container {
|
||||
namespace // this is the identifier 'namespace'
|
||||
n // this is the identifier 'n'
|
||||
{ } // this is a block body
|
||||
}
|
||||
|
||||
//// [asiPreventsParsingAsNamespace03.js]
|
||||
var namespace;
|
||||
var n;
|
||||
@ -0,0 +1,17 @@
|
||||
=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace03.ts ===
|
||||
|
||||
var namespace: number;
|
||||
>namespace : Symbol(namespace, Decl(asiPreventsParsingAsNamespace03.ts, 1, 3))
|
||||
|
||||
var n: string;
|
||||
>n : Symbol(n, Decl(asiPreventsParsingAsNamespace03.ts, 2, 3))
|
||||
|
||||
namespace container {
|
||||
>container : Symbol(container, Decl(asiPreventsParsingAsNamespace03.ts, 2, 14))
|
||||
|
||||
namespace // this is the identifier 'namespace'
|
||||
n // this is the identifier 'n'
|
||||
>n : Symbol(n, Decl(asiPreventsParsingAsNamespace03.ts, 4, 21))
|
||||
|
||||
{ } // this is a block body
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
=== tests/cases/conformance/internalModules/moduleDeclarations/asiPreventsParsingAsNamespace03.ts ===
|
||||
|
||||
var namespace: number;
|
||||
>namespace : number
|
||||
|
||||
var n: string;
|
||||
>n : string
|
||||
|
||||
namespace container {
|
||||
>container : any
|
||||
|
||||
namespace // this is the identifier 'namespace'
|
||||
n // this is the identifier 'n'
|
||||
>n : any
|
||||
|
||||
{ } // this is a block body
|
||||
}
|
||||
13
tests/baselines/reference/asiPreventsParsingAsTypeAlias01.js
Normal file
13
tests/baselines/reference/asiPreventsParsingAsTypeAlias01.js
Normal file
@ -0,0 +1,13 @@
|
||||
//// [asiPreventsParsingAsTypeAlias01.ts]
|
||||
|
||||
var type;
|
||||
var string;
|
||||
var Foo;
|
||||
|
||||
type
|
||||
Foo = string;
|
||||
|
||||
//// [asiPreventsParsingAsTypeAlias01.js]
|
||||
var type;
|
||||
var string;
|
||||
var Foo;
|
||||
@ -0,0 +1,15 @@
|
||||
=== tests/cases/conformance/types/typeAliases/asiPreventsParsingAsTypeAlias01.ts ===
|
||||
|
||||
var type;
|
||||
>type : Symbol(type, Decl(asiPreventsParsingAsTypeAlias01.ts, 1, 3))
|
||||
|
||||
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))
|
||||
|
||||
type
|
||||
Foo = string;
|
||||
>Foo : Symbol(Foo, Decl(asiPreventsParsingAsTypeAlias01.ts, 3, 3), Decl(asiPreventsParsingAsTypeAlias01.ts, 3, 8))
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
=== tests/cases/conformance/types/typeAliases/asiPreventsParsingAsTypeAlias01.ts ===
|
||||
|
||||
var type;
|
||||
>type : any
|
||||
|
||||
var string;
|
||||
>string : any
|
||||
|
||||
var Foo;
|
||||
>Foo : any
|
||||
|
||||
type
|
||||
Foo = string;
|
||||
>Foo : string
|
||||
|
||||
15
tests/baselines/reference/asiPreventsParsingAsTypeAlias02.js
Normal file
15
tests/baselines/reference/asiPreventsParsingAsTypeAlias02.js
Normal file
@ -0,0 +1,15 @@
|
||||
//// [asiPreventsParsingAsTypeAlias02.ts]
|
||||
|
||||
var type;
|
||||
var string;
|
||||
var Foo;
|
||||
|
||||
namespace container {
|
||||
type
|
||||
Foo = string;
|
||||
}
|
||||
|
||||
//// [asiPreventsParsingAsTypeAlias02.js]
|
||||
var type;
|
||||
var string;
|
||||
var Foo;
|
||||
@ -0,0 +1,18 @@
|
||||
=== tests/cases/conformance/types/typeAliases/asiPreventsParsingAsTypeAlias02.ts ===
|
||||
|
||||
var type;
|
||||
>type : Symbol(type, Decl(asiPreventsParsingAsTypeAlias02.ts, 1, 3))
|
||||
|
||||
var string;
|
||||
>string : Symbol(string, Decl(asiPreventsParsingAsTypeAlias02.ts, 2, 3))
|
||||
|
||||
var Foo;
|
||||
>Foo : Symbol(Foo, Decl(asiPreventsParsingAsTypeAlias02.ts, 3, 3))
|
||||
|
||||
namespace container {
|
||||
>container : Symbol(container, Decl(asiPreventsParsingAsTypeAlias02.ts, 3, 8))
|
||||
|
||||
type
|
||||
Foo = string;
|
||||
>Foo : Symbol(Foo, Decl(asiPreventsParsingAsTypeAlias02.ts, 5, 21))
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
=== tests/cases/conformance/types/typeAliases/asiPreventsParsingAsTypeAlias02.ts ===
|
||||
|
||||
var type;
|
||||
>type : any
|
||||
|
||||
var string;
|
||||
>string : any
|
||||
|
||||
var Foo;
|
||||
>Foo : any
|
||||
|
||||
namespace container {
|
||||
>container : any
|
||||
|
||||
type
|
||||
Foo = string;
|
||||
>Foo : string
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user