parent
bb28424b45
commit
671191a584
|
@ -1,12 +1,9 @@
|
|||
tests/cases/compiler/ExportAssignment7.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/compiler/ExportAssignment7.ts(4,1): error TS2309: An export assignment cannot be used in a module with other exported elements.
|
||||
tests/cases/compiler/ExportAssignment7.ts(4,10): error TS2304: Cannot find name 'B'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/ExportAssignment7.ts (3 errors) ====
|
||||
==== tests/cases/compiler/ExportAssignment7.ts (2 errors) ====
|
||||
export class C {
|
||||
~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
}
|
||||
|
||||
export = B;
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
tests/cases/compiler/ExportAssignment8.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/compiler/ExportAssignment8.ts(1,1): error TS2309: An export assignment cannot be used in a module with other exported elements.
|
||||
tests/cases/compiler/ExportAssignment8.ts(1,10): error TS2304: Cannot find name 'B'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/ExportAssignment8.ts (3 errors) ====
|
||||
==== tests/cases/compiler/ExportAssignment8.ts (2 errors) ====
|
||||
export = B;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2309: An export assignment cannot be used in a module with other exported elements.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'B'.
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
tests/cases/conformance/internalModules/DeclarationMerging/part1.ts(1,15): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(3,24): error TS2304: Cannot find name 'Point'.
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(7,36): error TS2304: Cannot find name 'Point'.
|
||||
tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(7,54): error TS2304: Cannot find name 'Point'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts (1 errors) ====
|
||||
==== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts (0 errors) ====
|
||||
export module A {
|
||||
~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
export interface Point {
|
||||
x: number;
|
||||
y: number;
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
tests/cases/conformance/ambient/consumer.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/ambient/consumer.ts (1 errors) ====
|
||||
/// <reference path="decls.ts" />
|
||||
import imp1 = require('equ');
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
// Ambient external module members are always exported with or without export keyword when module lacks export assignment
|
||||
import imp3 = require('equ2');
|
||||
var n = imp3.x;
|
||||
var n: number;
|
||||
|
||||
==== tests/cases/conformance/ambient/decls.ts (0 errors) ====
|
||||
|
||||
// Ambient external module with export assignment
|
||||
declare module 'equ' {
|
||||
var x;
|
||||
export = x;
|
||||
}
|
||||
|
||||
declare module 'equ2' {
|
||||
var x: number;
|
||||
}
|
||||
|
||||
// Ambient external import declaration referencing ambient external module using top level module name
|
|
@ -0,0 +1,36 @@
|
|||
=== tests/cases/conformance/ambient/consumer.ts ===
|
||||
/// <reference path="decls.ts" />
|
||||
import imp1 = require('equ');
|
||||
>imp1 : Symbol(imp1, Decl(consumer.ts, 0, 0))
|
||||
|
||||
|
||||
// Ambient external module members are always exported with or without export keyword when module lacks export assignment
|
||||
import imp3 = require('equ2');
|
||||
>imp3 : Symbol(imp3, Decl(consumer.ts, 1, 29))
|
||||
|
||||
var n = imp3.x;
|
||||
>n : Symbol(n, Decl(consumer.ts, 6, 3), Decl(consumer.ts, 7, 3))
|
||||
>imp3.x : Symbol(imp3.x, Decl(decls.ts, 8, 7))
|
||||
>imp3 : Symbol(imp3, Decl(consumer.ts, 1, 29))
|
||||
>x : Symbol(imp3.x, Decl(decls.ts, 8, 7))
|
||||
|
||||
var n: number;
|
||||
>n : Symbol(n, Decl(consumer.ts, 6, 3), Decl(consumer.ts, 7, 3))
|
||||
|
||||
=== tests/cases/conformance/ambient/decls.ts ===
|
||||
|
||||
// Ambient external module with export assignment
|
||||
declare module 'equ' {
|
||||
var x;
|
||||
>x : Symbol(x, Decl(decls.ts, 3, 7))
|
||||
|
||||
export = x;
|
||||
>x : Symbol(x, Decl(decls.ts, 3, 7))
|
||||
}
|
||||
|
||||
declare module 'equ2' {
|
||||
var x: number;
|
||||
>x : Symbol(x, Decl(decls.ts, 8, 7))
|
||||
}
|
||||
|
||||
// Ambient external import declaration referencing ambient external module using top level module name
|
36
tests/baselines/reference/ambientDeclarationsExternal.types
Normal file
36
tests/baselines/reference/ambientDeclarationsExternal.types
Normal file
|
@ -0,0 +1,36 @@
|
|||
=== tests/cases/conformance/ambient/consumer.ts ===
|
||||
/// <reference path="decls.ts" />
|
||||
import imp1 = require('equ');
|
||||
>imp1 : any
|
||||
|
||||
|
||||
// Ambient external module members are always exported with or without export keyword when module lacks export assignment
|
||||
import imp3 = require('equ2');
|
||||
>imp3 : typeof imp3
|
||||
|
||||
var n = imp3.x;
|
||||
>n : number
|
||||
>imp3.x : number
|
||||
>imp3 : typeof imp3
|
||||
>x : number
|
||||
|
||||
var n: number;
|
||||
>n : number
|
||||
|
||||
=== tests/cases/conformance/ambient/decls.ts ===
|
||||
|
||||
// Ambient external module with export assignment
|
||||
declare module 'equ' {
|
||||
var x;
|
||||
>x : any
|
||||
|
||||
export = x;
|
||||
>x : any
|
||||
}
|
||||
|
||||
declare module 'equ2' {
|
||||
var x: number;
|
||||
>x : number
|
||||
}
|
||||
|
||||
// Ambient external import declaration referencing ambient external module using top level module name
|
|
@ -1,4 +1,3 @@
|
|||
tests/cases/conformance/externalModules/foo1.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/conformance/externalModules/foo1.ts(9,12): error TS2339: Property 'x' does not exist on type 'C1'.
|
||||
tests/cases/conformance/externalModules/foo2.ts(8,12): error TS2339: Property 'y' does not exist on type 'C1'.
|
||||
tests/cases/conformance/externalModules/foo2.ts(13,8): error TS2339: Property 'x' does not exist on type 'C1'.
|
||||
|
@ -26,10 +25,8 @@ tests/cases/conformance/externalModules/foo2.ts(13,8): error TS2339: Property 'x
|
|||
}
|
||||
}
|
||||
|
||||
==== tests/cases/conformance/externalModules/foo1.ts (2 errors) ====
|
||||
==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ====
|
||||
import foo2 = require('./foo2');
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
export module M1 {
|
||||
export class C1 {
|
||||
m1: foo2.M1.C1;
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractManyKeywords.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractManyKeywords.ts(1,25): error TS1005: ';' expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractManyKeywords.ts(3,1): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractManyKeywords.ts(4,17): error TS1005: '=' expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractManyKeywords.ts (4 errors) ====
|
||||
==== tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractManyKeywords.ts (3 errors) ====
|
||||
export default abstract class A {}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
~~~~~
|
||||
!!! error TS1005: ';' expected.
|
||||
export abstract class B {}
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(4,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(8,21): error TS2301: Initializer of instance member variable 'messageHandler' cannot reference identifier 'field1' declared in the constructor.
|
||||
|
||||
|
||||
==== tests/cases/compiler/classMemberInitializerWithLamdaScoping3_0.ts (0 errors) ====
|
||||
var field1: string;
|
||||
|
||||
==== tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts (2 errors) ====
|
||||
==== tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts (1 errors) ====
|
||||
declare var console: {
|
||||
log(msg?: any): void;
|
||||
};
|
||||
export class Test1 {
|
||||
~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
constructor(private field1: string) {
|
||||
}
|
||||
messageHandler = () => {
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
tests/cases/compiler/classMemberInitializerWithLamdaScoping3_0.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(8,21): error TS2304: Cannot find name 'field1'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/classMemberInitializerWithLamdaScoping3_0.ts (1 errors) ====
|
||||
==== tests/cases/compiler/classMemberInitializerWithLamdaScoping3_0.ts (0 errors) ====
|
||||
export var field1: string;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
==== tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts (1 errors) ====
|
||||
declare var console: {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
tests/cases/conformance/externalModules/foo1.ts(3,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/conformance/externalModules/foo1.ts(3,1): error TS2300: Duplicate identifier 'export='.
|
||||
tests/cases/conformance/externalModules/foo1.ts(4,1): error TS2300: Duplicate identifier 'export='.
|
||||
tests/cases/conformance/externalModules/foo2.ts(3,1): error TS2300: Duplicate identifier 'export='.
|
||||
|
@ -12,13 +11,11 @@ tests/cases/conformance/externalModules/foo5.ts(5,1): error TS2300: Duplicate id
|
|||
tests/cases/conformance/externalModules/foo5.ts(6,1): error TS2300: Duplicate identifier 'export='.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/foo1.ts (3 errors) ====
|
||||
==== tests/cases/conformance/externalModules/foo1.ts (2 errors) ====
|
||||
var x = 10;
|
||||
var y = 20;
|
||||
export = x;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2300: Duplicate identifier 'export='.
|
||||
export = y;
|
||||
~~~~~~~~~~~
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
tests/cases/compiler/duplicateLocalVariable1.ts(2,4): error TS1005: ';' expected.
|
||||
tests/cases/compiler/duplicateLocalVariable1.ts(2,11): error TS1146: Declaration expected.
|
||||
tests/cases/compiler/duplicateLocalVariable1.ts(2,13): error TS2304: Cannot find name 'commonjs'.
|
||||
tests/cases/compiler/duplicateLocalVariable1.ts(12,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/compiler/duplicateLocalVariable1.ts(187,22): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'string', but here has type 'number'.
|
||||
tests/cases/compiler/duplicateLocalVariable1.ts(187,29): error TS2365: Operator '<' cannot be applied to types 'string' and 'number'.
|
||||
tests/cases/compiler/duplicateLocalVariable1.ts(187,37): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
|
||||
|
||||
|
||||
==== tests/cases/compiler/duplicateLocalVariable1.ts (7 errors) ====
|
||||
==== tests/cases/compiler/duplicateLocalVariable1.ts (6 errors) ====
|
||||
|
||||
/ /@module: commonjs
|
||||
~
|
||||
|
@ -26,8 +25,6 @@ tests/cases/compiler/duplicateLocalVariable1.ts(187,37): error TS2356: An arithm
|
|||
var TestFileDir = ".\\TempTestFiles";
|
||||
|
||||
export class TestCase {
|
||||
~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
constructor (public name: string, public test: ()=>boolean, public errorMessageRegEx?: string) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
tests/cases/compiler/es5ModuleWithoutModuleGenTarget.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/compiler/es5ModuleWithoutModuleGenTarget.ts (1 errors) ====
|
||||
export class A
|
||||
~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
{
|
||||
constructor ()
|
||||
{
|
||||
}
|
||||
|
||||
public B()
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
=== tests/cases/compiler/es5ModuleWithoutModuleGenTarget.ts ===
|
||||
export class A
|
||||
>A : Symbol(A, Decl(es5ModuleWithoutModuleGenTarget.ts, 0, 0))
|
||||
{
|
||||
constructor ()
|
||||
{
|
||||
}
|
||||
|
||||
public B()
|
||||
>B : Symbol(B, Decl(es5ModuleWithoutModuleGenTarget.ts, 4, 5))
|
||||
{
|
||||
return 42;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
=== tests/cases/compiler/es5ModuleWithoutModuleGenTarget.ts ===
|
||||
export class A
|
||||
>A : A
|
||||
{
|
||||
constructor ()
|
||||
{
|
||||
}
|
||||
|
||||
public B()
|
||||
>B : () => number
|
||||
{
|
||||
return 42;
|
||||
>42 : number
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ====
|
||||
import foo1 = require('./foo1');
|
||||
export = foo1.x; // Ok
|
||||
|
||||
==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ====
|
||||
export function x(){
|
||||
~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
return true;
|
||||
}
|
||||
|
16
tests/baselines/reference/exportAssignDottedName.symbols
Normal file
16
tests/baselines/reference/exportAssignDottedName.symbols
Normal file
|
@ -0,0 +1,16 @@
|
|||
=== tests/cases/conformance/externalModules/foo2.ts ===
|
||||
import foo1 = require('./foo1');
|
||||
>foo1 : Symbol(foo1, Decl(foo2.ts, 0, 0))
|
||||
|
||||
export = foo1.x; // Ok
|
||||
>foo1.x : Symbol(foo1.x, Decl(foo1.ts, 0, 0))
|
||||
>foo1 : Symbol(foo1, Decl(foo2.ts, 0, 0))
|
||||
>x : Symbol(foo1.x, Decl(foo1.ts, 0, 0))
|
||||
|
||||
=== tests/cases/conformance/externalModules/foo1.ts ===
|
||||
export function x(){
|
||||
>x : Symbol(x, Decl(foo1.ts, 0, 0))
|
||||
|
||||
return true;
|
||||
}
|
||||
|
17
tests/baselines/reference/exportAssignDottedName.types
Normal file
17
tests/baselines/reference/exportAssignDottedName.types
Normal file
|
@ -0,0 +1,17 @@
|
|||
=== tests/cases/conformance/externalModules/foo2.ts ===
|
||||
import foo1 = require('./foo1');
|
||||
>foo1 : typeof foo1
|
||||
|
||||
export = foo1.x; // Ok
|
||||
>foo1.x : () => boolean
|
||||
>foo1 : typeof foo1
|
||||
>x : () => boolean
|
||||
|
||||
=== tests/cases/conformance/externalModules/foo1.ts ===
|
||||
export function x(){
|
||||
>x : () => boolean
|
||||
|
||||
return true;
|
||||
>true : boolean
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/foo3.ts (0 errors) ====
|
||||
import foo2 = require('./foo2');
|
||||
var x = foo2(); // should be boolean
|
||||
==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ====
|
||||
export function x(){
|
||||
~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
return true;
|
||||
}
|
||||
|
||||
==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ====
|
||||
import foo1 = require('./foo1');
|
||||
var x = foo1.x;
|
||||
export = x;
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
=== tests/cases/conformance/externalModules/foo3.ts ===
|
||||
import foo2 = require('./foo2');
|
||||
>foo2 : Symbol(foo2, Decl(foo3.ts, 0, 0))
|
||||
|
||||
var x = foo2(); // should be boolean
|
||||
>x : Symbol(x, Decl(foo3.ts, 1, 3))
|
||||
>foo2 : Symbol(foo2, Decl(foo3.ts, 0, 0))
|
||||
|
||||
=== tests/cases/conformance/externalModules/foo1.ts ===
|
||||
export function x(){
|
||||
>x : Symbol(x, Decl(foo1.ts, 0, 0))
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/externalModules/foo2.ts ===
|
||||
import foo1 = require('./foo1');
|
||||
>foo1 : Symbol(foo1, Decl(foo2.ts, 0, 0))
|
||||
|
||||
var x = foo1.x;
|
||||
>x : Symbol(x, Decl(foo2.ts, 1, 3))
|
||||
>foo1.x : Symbol(foo1.x, Decl(foo1.ts, 0, 0))
|
||||
>foo1 : Symbol(foo1, Decl(foo2.ts, 0, 0))
|
||||
>x : Symbol(foo1.x, Decl(foo1.ts, 0, 0))
|
||||
|
||||
export = x;
|
||||
>x : Symbol(x, Decl(foo2.ts, 1, 3))
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
=== tests/cases/conformance/externalModules/foo3.ts ===
|
||||
import foo2 = require('./foo2');
|
||||
>foo2 : () => boolean
|
||||
|
||||
var x = foo2(); // should be boolean
|
||||
>x : boolean
|
||||
>foo2() : boolean
|
||||
>foo2 : () => boolean
|
||||
|
||||
=== tests/cases/conformance/externalModules/foo1.ts ===
|
||||
export function x(){
|
||||
>x : () => boolean
|
||||
|
||||
return true;
|
||||
>true : boolean
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/externalModules/foo2.ts ===
|
||||
import foo1 = require('./foo1');
|
||||
>foo1 : typeof foo1
|
||||
|
||||
var x = foo1.x;
|
||||
>x : () => boolean
|
||||
>foo1.x : () => boolean
|
||||
>foo1 : typeof foo1
|
||||
>x : () => boolean
|
||||
|
||||
export = x;
|
||||
>x : () => boolean
|
||||
|
|
@ -1,12 +1,9 @@
|
|||
tests/cases/conformance/externalModules/foo1.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/conformance/externalModules/foo6.ts(1,14): error TS1109: Expression expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ====
|
||||
==== tests/cases/conformance/externalModules/foo1.ts (0 errors) ====
|
||||
var x = 10;
|
||||
export = typeof x; // Ok
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ====
|
||||
export = "sausages"; // Ok
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
tests/cases/conformance/externalModules/expString.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/consumer.ts (0 errors) ====
|
||||
import iString = require('./expString');
|
||||
var v1: string = iString;
|
||||
|
||||
import iNumber = require('./expNumber');
|
||||
var v2: number = iNumber;
|
||||
|
||||
import iBoolean = require('./expBoolean');
|
||||
var v3: boolean = iBoolean;
|
||||
|
||||
import iArray = require('./expArray');
|
||||
var v4: Array<number> = iArray;
|
||||
|
||||
import iObject = require('./expObject');
|
||||
var v5: Object = iObject;
|
||||
|
||||
import iAny = require('./expAny');
|
||||
var v6 = iAny;
|
||||
|
||||
import iGeneric = require('./expGeneric');
|
||||
var v7: {<x>(p1: x): x} = iGeneric;
|
||||
|
||||
==== tests/cases/conformance/externalModules/expString.ts (1 errors) ====
|
||||
var x = "test";
|
||||
export = x;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
==== tests/cases/conformance/externalModules/expNumber.ts (0 errors) ====
|
||||
var x = 42;
|
||||
export = x;
|
||||
|
||||
==== tests/cases/conformance/externalModules/expBoolean.ts (0 errors) ====
|
||||
var x = true;
|
||||
export = x;
|
||||
|
||||
==== tests/cases/conformance/externalModules/expArray.ts (0 errors) ====
|
||||
var x = [1,2];
|
||||
export = x;
|
||||
|
||||
==== tests/cases/conformance/externalModules/expObject.ts (0 errors) ====
|
||||
var x = { answer: 42, when: 1776};
|
||||
export = x;
|
||||
|
||||
==== tests/cases/conformance/externalModules/expAny.ts (0 errors) ====
|
||||
var x;
|
||||
export = x;
|
||||
|
||||
==== tests/cases/conformance/externalModules/expGeneric.ts (0 errors) ====
|
||||
function x<T>(a: T){
|
||||
return a;
|
||||
}
|
||||
export = x;
|
||||
|
113
tests/baselines/reference/exportAssignTypes.symbols
Normal file
113
tests/baselines/reference/exportAssignTypes.symbols
Normal file
|
@ -0,0 +1,113 @@
|
|||
=== tests/cases/conformance/externalModules/consumer.ts ===
|
||||
import iString = require('./expString');
|
||||
>iString : Symbol(iString, Decl(consumer.ts, 0, 0))
|
||||
|
||||
var v1: string = iString;
|
||||
>v1 : Symbol(v1, Decl(consumer.ts, 1, 3))
|
||||
>iString : Symbol(iString, Decl(consumer.ts, 0, 0))
|
||||
|
||||
import iNumber = require('./expNumber');
|
||||
>iNumber : Symbol(iNumber, Decl(consumer.ts, 1, 25))
|
||||
|
||||
var v2: number = iNumber;
|
||||
>v2 : Symbol(v2, Decl(consumer.ts, 4, 3))
|
||||
>iNumber : Symbol(iNumber, Decl(consumer.ts, 1, 25))
|
||||
|
||||
import iBoolean = require('./expBoolean');
|
||||
>iBoolean : Symbol(iBoolean, Decl(consumer.ts, 4, 25))
|
||||
|
||||
var v3: boolean = iBoolean;
|
||||
>v3 : Symbol(v3, Decl(consumer.ts, 7, 3))
|
||||
>iBoolean : Symbol(iBoolean, Decl(consumer.ts, 4, 25))
|
||||
|
||||
import iArray = require('./expArray');
|
||||
>iArray : Symbol(iArray, Decl(consumer.ts, 7, 27))
|
||||
|
||||
var v4: Array<number> = iArray;
|
||||
>v4 : Symbol(v4, Decl(consumer.ts, 10, 3))
|
||||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>iArray : Symbol(iArray, Decl(consumer.ts, 7, 27))
|
||||
|
||||
import iObject = require('./expObject');
|
||||
>iObject : Symbol(iObject, Decl(consumer.ts, 10, 31))
|
||||
|
||||
var v5: Object = iObject;
|
||||
>v5 : Symbol(v5, Decl(consumer.ts, 13, 3))
|
||||
>Object : Symbol(Object, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>iObject : Symbol(iObject, Decl(consumer.ts, 10, 31))
|
||||
|
||||
import iAny = require('./expAny');
|
||||
>iAny : Symbol(iAny, Decl(consumer.ts, 13, 25))
|
||||
|
||||
var v6 = iAny;
|
||||
>v6 : Symbol(v6, Decl(consumer.ts, 16, 3))
|
||||
>iAny : Symbol(iAny, Decl(consumer.ts, 13, 25))
|
||||
|
||||
import iGeneric = require('./expGeneric');
|
||||
>iGeneric : Symbol(iGeneric, Decl(consumer.ts, 16, 14))
|
||||
|
||||
var v7: {<x>(p1: x): x} = iGeneric;
|
||||
>v7 : Symbol(v7, Decl(consumer.ts, 19, 3))
|
||||
>x : Symbol(x, Decl(consumer.ts, 19, 10))
|
||||
>p1 : Symbol(p1, Decl(consumer.ts, 19, 13))
|
||||
>x : Symbol(x, Decl(consumer.ts, 19, 10))
|
||||
>x : Symbol(x, Decl(consumer.ts, 19, 10))
|
||||
>iGeneric : Symbol(iGeneric, Decl(consumer.ts, 16, 14))
|
||||
|
||||
=== tests/cases/conformance/externalModules/expString.ts ===
|
||||
var x = "test";
|
||||
>x : Symbol(x, Decl(expString.ts, 0, 3))
|
||||
|
||||
export = x;
|
||||
>x : Symbol(x, Decl(expString.ts, 0, 3))
|
||||
|
||||
=== tests/cases/conformance/externalModules/expNumber.ts ===
|
||||
var x = 42;
|
||||
>x : Symbol(x, Decl(expNumber.ts, 0, 3))
|
||||
|
||||
export = x;
|
||||
>x : Symbol(x, Decl(expNumber.ts, 0, 3))
|
||||
|
||||
=== tests/cases/conformance/externalModules/expBoolean.ts ===
|
||||
var x = true;
|
||||
>x : Symbol(x, Decl(expBoolean.ts, 0, 3))
|
||||
|
||||
export = x;
|
||||
>x : Symbol(x, Decl(expBoolean.ts, 0, 3))
|
||||
|
||||
=== tests/cases/conformance/externalModules/expArray.ts ===
|
||||
var x = [1,2];
|
||||
>x : Symbol(x, Decl(expArray.ts, 0, 3))
|
||||
|
||||
export = x;
|
||||
>x : Symbol(x, Decl(expArray.ts, 0, 3))
|
||||
|
||||
=== tests/cases/conformance/externalModules/expObject.ts ===
|
||||
var x = { answer: 42, when: 1776};
|
||||
>x : Symbol(x, Decl(expObject.ts, 0, 3))
|
||||
>answer : Symbol(answer, Decl(expObject.ts, 0, 9))
|
||||
>when : Symbol(when, Decl(expObject.ts, 0, 21))
|
||||
|
||||
export = x;
|
||||
>x : Symbol(x, Decl(expObject.ts, 0, 3))
|
||||
|
||||
=== tests/cases/conformance/externalModules/expAny.ts ===
|
||||
var x;
|
||||
>x : Symbol(x, Decl(expAny.ts, 0, 3))
|
||||
|
||||
export = x;
|
||||
>x : Symbol(x, Decl(expAny.ts, 0, 3))
|
||||
|
||||
=== tests/cases/conformance/externalModules/expGeneric.ts ===
|
||||
function x<T>(a: T){
|
||||
>x : Symbol(x, Decl(expGeneric.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(expGeneric.ts, 0, 11))
|
||||
>a : Symbol(a, Decl(expGeneric.ts, 0, 14))
|
||||
>T : Symbol(T, Decl(expGeneric.ts, 0, 11))
|
||||
|
||||
return a;
|
||||
>a : Symbol(a, Decl(expGeneric.ts, 0, 14))
|
||||
}
|
||||
export = x;
|
||||
>x : Symbol(x, Decl(expGeneric.ts, 0, 0))
|
||||
|
122
tests/baselines/reference/exportAssignTypes.types
Normal file
122
tests/baselines/reference/exportAssignTypes.types
Normal file
|
@ -0,0 +1,122 @@
|
|||
=== tests/cases/conformance/externalModules/consumer.ts ===
|
||||
import iString = require('./expString');
|
||||
>iString : string
|
||||
|
||||
var v1: string = iString;
|
||||
>v1 : string
|
||||
>iString : string
|
||||
|
||||
import iNumber = require('./expNumber');
|
||||
>iNumber : number
|
||||
|
||||
var v2: number = iNumber;
|
||||
>v2 : number
|
||||
>iNumber : number
|
||||
|
||||
import iBoolean = require('./expBoolean');
|
||||
>iBoolean : boolean
|
||||
|
||||
var v3: boolean = iBoolean;
|
||||
>v3 : boolean
|
||||
>iBoolean : boolean
|
||||
|
||||
import iArray = require('./expArray');
|
||||
>iArray : number[]
|
||||
|
||||
var v4: Array<number> = iArray;
|
||||
>v4 : number[]
|
||||
>Array : T[]
|
||||
>iArray : number[]
|
||||
|
||||
import iObject = require('./expObject');
|
||||
>iObject : { answer: number; when: number; }
|
||||
|
||||
var v5: Object = iObject;
|
||||
>v5 : Object
|
||||
>Object : Object
|
||||
>iObject : { answer: number; when: number; }
|
||||
|
||||
import iAny = require('./expAny');
|
||||
>iAny : any
|
||||
|
||||
var v6 = iAny;
|
||||
>v6 : any
|
||||
>iAny : any
|
||||
|
||||
import iGeneric = require('./expGeneric');
|
||||
>iGeneric : <T>(a: T) => T
|
||||
|
||||
var v7: {<x>(p1: x): x} = iGeneric;
|
||||
>v7 : <x>(p1: x) => x
|
||||
>x : x
|
||||
>p1 : x
|
||||
>x : x
|
||||
>x : x
|
||||
>iGeneric : <T>(a: T) => T
|
||||
|
||||
=== tests/cases/conformance/externalModules/expString.ts ===
|
||||
var x = "test";
|
||||
>x : string
|
||||
>"test" : string
|
||||
|
||||
export = x;
|
||||
>x : string
|
||||
|
||||
=== tests/cases/conformance/externalModules/expNumber.ts ===
|
||||
var x = 42;
|
||||
>x : number
|
||||
>42 : number
|
||||
|
||||
export = x;
|
||||
>x : number
|
||||
|
||||
=== tests/cases/conformance/externalModules/expBoolean.ts ===
|
||||
var x = true;
|
||||
>x : boolean
|
||||
>true : boolean
|
||||
|
||||
export = x;
|
||||
>x : boolean
|
||||
|
||||
=== tests/cases/conformance/externalModules/expArray.ts ===
|
||||
var x = [1,2];
|
||||
>x : number[]
|
||||
>[1,2] : number[]
|
||||
>1 : number
|
||||
>2 : number
|
||||
|
||||
export = x;
|
||||
>x : number[]
|
||||
|
||||
=== tests/cases/conformance/externalModules/expObject.ts ===
|
||||
var x = { answer: 42, when: 1776};
|
||||
>x : { answer: number; when: number; }
|
||||
>{ answer: 42, when: 1776} : { answer: number; when: number; }
|
||||
>answer : number
|
||||
>42 : number
|
||||
>when : number
|
||||
>1776 : number
|
||||
|
||||
export = x;
|
||||
>x : { answer: number; when: number; }
|
||||
|
||||
=== tests/cases/conformance/externalModules/expAny.ts ===
|
||||
var x;
|
||||
>x : any
|
||||
|
||||
export = x;
|
||||
>x : any
|
||||
|
||||
=== tests/cases/conformance/externalModules/expGeneric.ts ===
|
||||
function x<T>(a: T){
|
||||
>x : <T>(a: T) => T
|
||||
>T : T
|
||||
>a : T
|
||||
>T : T
|
||||
|
||||
return a;
|
||||
>a : T
|
||||
}
|
||||
export = x;
|
||||
>x : <T>(a: T) => T
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
tests/cases/conformance/externalModules/foo1.ts(6,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ====
|
||||
import foo1 = require('./foo1');
|
||||
var x: number = foo1.b();
|
||||
==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ====
|
||||
|
||||
declare module M1 {
|
||||
export var a: string;
|
||||
export function b(): number;
|
||||
}
|
||||
export = M1;
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
24
tests/baselines/reference/exportDeclaredModule.symbols
Normal file
24
tests/baselines/reference/exportDeclaredModule.symbols
Normal file
|
@ -0,0 +1,24 @@
|
|||
=== tests/cases/conformance/externalModules/foo2.ts ===
|
||||
import foo1 = require('./foo1');
|
||||
>foo1 : Symbol(foo1, Decl(foo2.ts, 0, 0))
|
||||
|
||||
var x: number = foo1.b();
|
||||
>x : Symbol(x, Decl(foo2.ts, 1, 3))
|
||||
>foo1.b : Symbol(foo1.b, Decl(foo1.ts, 2, 22))
|
||||
>foo1 : Symbol(foo1, Decl(foo2.ts, 0, 0))
|
||||
>b : Symbol(foo1.b, Decl(foo1.ts, 2, 22))
|
||||
|
||||
=== tests/cases/conformance/externalModules/foo1.ts ===
|
||||
|
||||
declare module M1 {
|
||||
>M1 : Symbol(M1, Decl(foo1.ts, 0, 0))
|
||||
|
||||
export var a: string;
|
||||
>a : Symbol(a, Decl(foo1.ts, 2, 11))
|
||||
|
||||
export function b(): number;
|
||||
>b : Symbol(b, Decl(foo1.ts, 2, 22))
|
||||
}
|
||||
export = M1;
|
||||
>M1 : Symbol(M1, Decl(foo1.ts, 0, 0))
|
||||
|
25
tests/baselines/reference/exportDeclaredModule.types
Normal file
25
tests/baselines/reference/exportDeclaredModule.types
Normal file
|
@ -0,0 +1,25 @@
|
|||
=== tests/cases/conformance/externalModules/foo2.ts ===
|
||||
import foo1 = require('./foo1');
|
||||
>foo1 : typeof foo1
|
||||
|
||||
var x: number = foo1.b();
|
||||
>x : number
|
||||
>foo1.b() : number
|
||||
>foo1.b : () => number
|
||||
>foo1 : typeof foo1
|
||||
>b : () => number
|
||||
|
||||
=== tests/cases/conformance/externalModules/foo1.ts ===
|
||||
|
||||
declare module M1 {
|
||||
>M1 : typeof M1
|
||||
|
||||
export var a: string;
|
||||
>a : string
|
||||
|
||||
export function b(): number;
|
||||
>b : () => number
|
||||
}
|
||||
export = M1;
|
||||
>M1 : typeof M1
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
tests/cases/conformance/externalModules/foo1.ts(7,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ====
|
||||
interface I1 {
|
||||
a: string;
|
||||
b: number;
|
||||
}
|
||||
|
||||
var x: I1 = {a: "test", b: 42};
|
||||
export = x; // Should fail, I1 not exported.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/foo2.ts (0 errors) ====
|
||||
interface I1 {
|
||||
a: string;
|
||||
b: number;
|
||||
}
|
||||
|
||||
class C1 {
|
||||
m1: I1;
|
||||
}
|
||||
|
||||
export = C1; // Should fail, type I1 of visible member C1.m1 not exported.
|
||||
|
||||
==== tests/cases/conformance/externalModules/foo3.ts (0 errors) ====
|
||||
interface I1 {
|
||||
a: string;
|
||||
b: number;
|
||||
}
|
||||
|
||||
class C1 {
|
||||
private m1: I1;
|
||||
}
|
||||
|
||||
export = C1; // Should work, private type I1 of visible class C1 only used in private member m1.
|
||||
|
65
tests/baselines/reference/exportNonVisibleType.symbols
Normal file
65
tests/baselines/reference/exportNonVisibleType.symbols
Normal file
|
@ -0,0 +1,65 @@
|
|||
=== tests/cases/conformance/externalModules/foo1.ts ===
|
||||
interface I1 {
|
||||
>I1 : Symbol(I1, Decl(foo1.ts, 0, 0))
|
||||
|
||||
a: string;
|
||||
>a : Symbol(a, Decl(foo1.ts, 0, 14))
|
||||
|
||||
b: number;
|
||||
>b : Symbol(b, Decl(foo1.ts, 1, 11))
|
||||
}
|
||||
|
||||
var x: I1 = {a: "test", b: 42};
|
||||
>x : Symbol(x, Decl(foo1.ts, 5, 3))
|
||||
>I1 : Symbol(I1, Decl(foo1.ts, 0, 0))
|
||||
>a : Symbol(a, Decl(foo1.ts, 5, 13))
|
||||
>b : Symbol(b, Decl(foo1.ts, 5, 23))
|
||||
|
||||
export = x; // Should fail, I1 not exported.
|
||||
>x : Symbol(x, Decl(foo1.ts, 5, 3))
|
||||
|
||||
|
||||
=== tests/cases/conformance/externalModules/foo2.ts ===
|
||||
interface I1 {
|
||||
>I1 : Symbol(I1, Decl(foo2.ts, 0, 0))
|
||||
|
||||
a: string;
|
||||
>a : Symbol(a, Decl(foo2.ts, 0, 14))
|
||||
|
||||
b: number;
|
||||
>b : Symbol(b, Decl(foo2.ts, 1, 11))
|
||||
}
|
||||
|
||||
class C1 {
|
||||
>C1 : Symbol(C1, Decl(foo2.ts, 3, 1))
|
||||
|
||||
m1: I1;
|
||||
>m1 : Symbol(m1, Decl(foo2.ts, 5, 10))
|
||||
>I1 : Symbol(I1, Decl(foo2.ts, 0, 0))
|
||||
}
|
||||
|
||||
export = C1; // Should fail, type I1 of visible member C1.m1 not exported.
|
||||
>C1 : Symbol(C1, Decl(foo2.ts, 3, 1))
|
||||
|
||||
=== tests/cases/conformance/externalModules/foo3.ts ===
|
||||
interface I1 {
|
||||
>I1 : Symbol(I1, Decl(foo3.ts, 0, 0))
|
||||
|
||||
a: string;
|
||||
>a : Symbol(a, Decl(foo3.ts, 0, 14))
|
||||
|
||||
b: number;
|
||||
>b : Symbol(b, Decl(foo3.ts, 1, 11))
|
||||
}
|
||||
|
||||
class C1 {
|
||||
>C1 : Symbol(C1, Decl(foo3.ts, 3, 1))
|
||||
|
||||
private m1: I1;
|
||||
>m1 : Symbol(m1, Decl(foo3.ts, 5, 10))
|
||||
>I1 : Symbol(I1, Decl(foo3.ts, 0, 0))
|
||||
}
|
||||
|
||||
export = C1; // Should work, private type I1 of visible class C1 only used in private member m1.
|
||||
>C1 : Symbol(C1, Decl(foo3.ts, 3, 1))
|
||||
|
68
tests/baselines/reference/exportNonVisibleType.types
Normal file
68
tests/baselines/reference/exportNonVisibleType.types
Normal file
|
@ -0,0 +1,68 @@
|
|||
=== tests/cases/conformance/externalModules/foo1.ts ===
|
||||
interface I1 {
|
||||
>I1 : I1
|
||||
|
||||
a: string;
|
||||
>a : string
|
||||
|
||||
b: number;
|
||||
>b : number
|
||||
}
|
||||
|
||||
var x: I1 = {a: "test", b: 42};
|
||||
>x : I1
|
||||
>I1 : I1
|
||||
>{a: "test", b: 42} : { a: string; b: number; }
|
||||
>a : string
|
||||
>"test" : string
|
||||
>b : number
|
||||
>42 : number
|
||||
|
||||
export = x; // Should fail, I1 not exported.
|
||||
>x : I1
|
||||
|
||||
|
||||
=== tests/cases/conformance/externalModules/foo2.ts ===
|
||||
interface I1 {
|
||||
>I1 : I1
|
||||
|
||||
a: string;
|
||||
>a : string
|
||||
|
||||
b: number;
|
||||
>b : number
|
||||
}
|
||||
|
||||
class C1 {
|
||||
>C1 : C1
|
||||
|
||||
m1: I1;
|
||||
>m1 : I1
|
||||
>I1 : I1
|
||||
}
|
||||
|
||||
export = C1; // Should fail, type I1 of visible member C1.m1 not exported.
|
||||
>C1 : C1
|
||||
|
||||
=== tests/cases/conformance/externalModules/foo3.ts ===
|
||||
interface I1 {
|
||||
>I1 : I1
|
||||
|
||||
a: string;
|
||||
>a : string
|
||||
|
||||
b: number;
|
||||
>b : number
|
||||
}
|
||||
|
||||
class C1 {
|
||||
>C1 : C1
|
||||
|
||||
private m1: I1;
|
||||
>m1 : I1
|
||||
>I1 : I1
|
||||
}
|
||||
|
||||
export = C1; // Should work, private type I1 of visible class C1 only used in private member m1.
|
||||
>C1 : C1
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts (1 errors) ====
|
||||
|
||||
// Not on line 0 because we want to verify the error is placed in the appropriate location.
|
||||
export module M {
|
||||
~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
=== tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts ===
|
||||
|
||||
// Not on line 0 because we want to verify the error is placed in the appropriate location.
|
||||
export module M {
|
||||
>M : Symbol(M, Decl(externalModuleWithoutCompilerFlag1.ts, 0, 0))
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
=== tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts ===
|
||||
|
||||
// Not on line 0 because we want to verify the error is placed in the appropriate location.
|
||||
export module M {
|
||||
>M : any
|
||||
}
|
|
@ -1,13 +1,10 @@
|
|||
tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS2420: Class 'ObservableArray<T>' incorrectly implements interface 'T[]'.
|
||||
Property 'length' is missing in type 'ObservableArray<T>'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/genericArrayExtenstions.ts (2 errors) ====
|
||||
==== tests/cases/compiler/genericArrayExtenstions.ts (1 errors) ====
|
||||
export declare class ObservableArray<T> implements Array<T> { // MS.Entertainment.ObservableArray
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2420: Class 'ObservableArray<T>' incorrectly implements interface 'T[]'.
|
||||
!!! error TS2420: Property 'length' is missing in type 'ObservableArray<T>'.
|
||||
concat<U extends T[]>(...items: U[]): T[];
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts(1,15): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file1.ts (0 errors) ====
|
||||
import r = require('importAliasAnExternalModuleInsideAnInternalModule_file0');
|
||||
module m_private {
|
||||
//import r2 = require('m'); // would be error
|
||||
export import C = r; // no error
|
||||
C.m.foo();
|
||||
}
|
||||
|
||||
==== tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts (1 errors) ====
|
||||
export module m {
|
||||
~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
export function foo() { }
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
=== tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file1.ts ===
|
||||
import r = require('importAliasAnExternalModuleInsideAnInternalModule_file0');
|
||||
>r : Symbol(r, Decl(importAliasAnExternalModuleInsideAnInternalModule_file1.ts, 0, 0))
|
||||
|
||||
module m_private {
|
||||
>m_private : Symbol(m_private, Decl(importAliasAnExternalModuleInsideAnInternalModule_file1.ts, 0, 78))
|
||||
|
||||
//import r2 = require('m'); // would be error
|
||||
export import C = r; // no error
|
||||
>C : Symbol(C, Decl(importAliasAnExternalModuleInsideAnInternalModule_file1.ts, 1, 18))
|
||||
>r : Symbol(C, Decl(importAliasAnExternalModuleInsideAnInternalModule_file0.ts, 0, 0))
|
||||
|
||||
C.m.foo();
|
||||
>C.m.foo : Symbol(C.m.foo, Decl(importAliasAnExternalModuleInsideAnInternalModule_file0.ts, 0, 17))
|
||||
>C.m : Symbol(C.m, Decl(importAliasAnExternalModuleInsideAnInternalModule_file0.ts, 0, 0))
|
||||
>C : Symbol(C, Decl(importAliasAnExternalModuleInsideAnInternalModule_file1.ts, 1, 18))
|
||||
>m : Symbol(C.m, Decl(importAliasAnExternalModuleInsideAnInternalModule_file0.ts, 0, 0))
|
||||
>foo : Symbol(C.m.foo, Decl(importAliasAnExternalModuleInsideAnInternalModule_file0.ts, 0, 17))
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts ===
|
||||
export module m {
|
||||
>m : Symbol(m, Decl(importAliasAnExternalModuleInsideAnInternalModule_file0.ts, 0, 0))
|
||||
|
||||
export function foo() { }
|
||||
>foo : Symbol(foo, Decl(importAliasAnExternalModuleInsideAnInternalModule_file0.ts, 0, 17))
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
=== tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file1.ts ===
|
||||
import r = require('importAliasAnExternalModuleInsideAnInternalModule_file0');
|
||||
>r : typeof r
|
||||
|
||||
module m_private {
|
||||
>m_private : typeof m_private
|
||||
|
||||
//import r2 = require('m'); // would be error
|
||||
export import C = r; // no error
|
||||
>C : typeof C
|
||||
>r : typeof C
|
||||
|
||||
C.m.foo();
|
||||
>C.m.foo() : void
|
||||
>C.m.foo : () => void
|
||||
>C.m : typeof C.m
|
||||
>C : typeof C
|
||||
>m : typeof C.m
|
||||
>foo : () => void
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts ===
|
||||
export module m {
|
||||
>m : typeof m
|
||||
|
||||
export function foo() { }
|
||||
>foo : () => void
|
||||
}
|
||||
|
|
@ -1,13 +1,10 @@
|
|||
tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(1,20): error TS2307: Cannot find module 'externalModule'.
|
||||
tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(2,16): error TS2664: Invalid module name in augmentation, module 'm1' cannot be found.
|
||||
tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(3,26): error TS2307: Cannot find module 'externalModule'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts (4 errors) ====
|
||||
==== tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts (3 errors) ====
|
||||
import b = require("externalModule");
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS2307: Cannot find module 'externalModule'.
|
||||
declare module "m1" {
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
tests/cases/compiler/importDeclWithDeclareModifier.ts(5,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/compiler/importDeclWithDeclareModifier.ts(5,9): error TS1029: 'export' modifier must precede 'declare' modifier.
|
||||
tests/cases/compiler/importDeclWithDeclareModifier.ts(5,29): error TS2305: Module 'x' has no exported member 'c'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/importDeclWithDeclareModifier.ts (3 errors) ====
|
||||
==== tests/cases/compiler/importDeclWithDeclareModifier.ts (2 errors) ====
|
||||
module x {
|
||||
interface c {
|
||||
}
|
||||
}
|
||||
declare export import a = x.c;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
~~~~~~
|
||||
!!! error TS1029: 'export' modifier must precede 'declare' modifier.
|
||||
~
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
error TS5047: Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher.
|
||||
|
||||
|
||||
!!! error TS5047: Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher.
|
||||
==== tests/cases/compiler/file1.ts (0 errors) ====
|
||||
export var x;
|
|
@ -0,0 +1,4 @@
|
|||
=== tests/cases/compiler/file1.ts ===
|
||||
export var x;
|
||||
>x : Symbol(x, Decl(file1.ts, 0, 10))
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
=== tests/cases/compiler/file1.ts ===
|
||||
export var x;
|
||||
>x : any
|
||||
|
|
@ -1,12 +1,9 @@
|
|||
error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file.
|
||||
tests/cases/compiler/a.js(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/compiler/a.js(1,1): error TS8003: 'export=' can only be used in a .ts file.
|
||||
|
||||
|
||||
!!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' because it would overwrite input file.
|
||||
==== tests/cases/compiler/a.js (2 errors) ====
|
||||
==== tests/cases/compiler/a.js (1 errors) ====
|
||||
export = b;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS8003: 'export=' can only be used in a .ts file.
|
|
@ -1,13 +1,10 @@
|
|||
error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.
|
||||
tests/cases/compiler/a.ts(2,1): error TS2448: Block-scoped variable 'a' used before its declaration.
|
||||
|
||||
|
||||
!!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'.
|
||||
==== tests/cases/compiler/a.ts (1 errors) ====
|
||||
==== tests/cases/compiler/a.ts (0 errors) ====
|
||||
let b = 30;
|
||||
a = 10;
|
||||
~
|
||||
!!! error TS2448: Block-scoped variable 'a' used before its declaration.
|
||||
==== tests/cases/compiler/b.js (0 errors) ====
|
||||
let a = 10;
|
||||
b = 30;
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
tests/cases/compiler/mergedModuleDeclarationCodeGen.ts(1,15): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/compiler/mergedModuleDeclarationCodeGen.ts (1 errors) ====
|
||||
export module X {
|
||||
~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
export module Y {
|
||||
class A {
|
||||
constructor(Y: any) {
|
||||
new B();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
export module X {
|
||||
export module Y {
|
||||
export class B {
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
=== tests/cases/compiler/mergedModuleDeclarationCodeGen.ts ===
|
||||
export module X {
|
||||
>X : Symbol(X, Decl(mergedModuleDeclarationCodeGen.ts, 0, 0), Decl(mergedModuleDeclarationCodeGen.ts, 8, 1))
|
||||
|
||||
export module Y {
|
||||
>Y : Symbol(Y, Decl(mergedModuleDeclarationCodeGen.ts, 0, 17), Decl(mergedModuleDeclarationCodeGen.ts, 9, 17))
|
||||
|
||||
class A {
|
||||
>A : Symbol(A, Decl(mergedModuleDeclarationCodeGen.ts, 1, 21))
|
||||
|
||||
constructor(Y: any) {
|
||||
>Y : Symbol(Y, Decl(mergedModuleDeclarationCodeGen.ts, 3, 24))
|
||||
|
||||
new B();
|
||||
>B : Symbol(B, Decl(mergedModuleDeclarationCodeGen.ts, 10, 21))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
export module X {
|
||||
>X : Symbol(X, Decl(mergedModuleDeclarationCodeGen.ts, 0, 0), Decl(mergedModuleDeclarationCodeGen.ts, 8, 1))
|
||||
|
||||
export module Y {
|
||||
>Y : Symbol(Y, Decl(mergedModuleDeclarationCodeGen.ts, 0, 17), Decl(mergedModuleDeclarationCodeGen.ts, 9, 17))
|
||||
|
||||
export class B {
|
||||
>B : Symbol(B, Decl(mergedModuleDeclarationCodeGen.ts, 10, 21))
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
=== tests/cases/compiler/mergedModuleDeclarationCodeGen.ts ===
|
||||
export module X {
|
||||
>X : typeof X
|
||||
|
||||
export module Y {
|
||||
>Y : typeof Y
|
||||
|
||||
class A {
|
||||
>A : A
|
||||
|
||||
constructor(Y: any) {
|
||||
>Y : any
|
||||
|
||||
new B();
|
||||
>new B() : B
|
||||
>B : typeof B
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
export module X {
|
||||
>X : typeof X
|
||||
|
||||
export module Y {
|
||||
>Y : typeof Y
|
||||
|
||||
export class B {
|
||||
>B : B
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
tests/cases/conformance/externalModules/file3.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/file1.ts (0 errors) ====
|
||||
var v1 = "sausages"; // Global scope
|
||||
|
||||
==== tests/cases/conformance/externalModules/file2.ts (0 errors) ====
|
||||
var v2 = 42; // Global scope
|
||||
var v4 = () => 5;
|
||||
|
||||
==== tests/cases/conformance/externalModules/file3.ts (1 errors) ====
|
||||
export var v3 = true;
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
var v2 = [1,2,3]; // Module scope. Should not appear in global scope
|
||||
|
||||
==== tests/cases/conformance/externalModules/file4.ts (0 errors) ====
|
||||
import file3 = require('./file3');
|
||||
var t1 = v1;
|
||||
var t2 = v2;
|
||||
var t3 = file3.v3;
|
||||
var v4 = {a: true, b: NaN}; // Should shadow global v2 in this module
|
||||
|
||||
==== tests/cases/conformance/externalModules/file5.ts (0 errors) ====
|
||||
var x = v2; // Should be global v2 of type number again
|
||||
|
47
tests/baselines/reference/moduleScoping.symbols
Normal file
47
tests/baselines/reference/moduleScoping.symbols
Normal file
|
@ -0,0 +1,47 @@
|
|||
=== tests/cases/conformance/externalModules/file1.ts ===
|
||||
var v1 = "sausages"; // Global scope
|
||||
>v1 : Symbol(v1, Decl(file1.ts, 0, 3))
|
||||
|
||||
=== tests/cases/conformance/externalModules/file2.ts ===
|
||||
var v2 = 42; // Global scope
|
||||
>v2 : Symbol(v2, Decl(file2.ts, 0, 3))
|
||||
|
||||
var v4 = () => 5;
|
||||
>v4 : Symbol(v4, Decl(file2.ts, 1, 3))
|
||||
|
||||
=== tests/cases/conformance/externalModules/file3.ts ===
|
||||
export var v3 = true;
|
||||
>v3 : Symbol(v3, Decl(file3.ts, 0, 10))
|
||||
|
||||
var v2 = [1,2,3]; // Module scope. Should not appear in global scope
|
||||
>v2 : Symbol(v2, Decl(file3.ts, 1, 3))
|
||||
|
||||
=== tests/cases/conformance/externalModules/file4.ts ===
|
||||
import file3 = require('./file3');
|
||||
>file3 : Symbol(file3, Decl(file4.ts, 0, 0))
|
||||
|
||||
var t1 = v1;
|
||||
>t1 : Symbol(t1, Decl(file4.ts, 1, 3))
|
||||
>v1 : Symbol(v1, Decl(file1.ts, 0, 3))
|
||||
|
||||
var t2 = v2;
|
||||
>t2 : Symbol(t2, Decl(file4.ts, 2, 3))
|
||||
>v2 : Symbol(v2, Decl(file2.ts, 0, 3))
|
||||
|
||||
var t3 = file3.v3;
|
||||
>t3 : Symbol(t3, Decl(file4.ts, 3, 3))
|
||||
>file3.v3 : Symbol(file3.v3, Decl(file3.ts, 0, 10))
|
||||
>file3 : Symbol(file3, Decl(file4.ts, 0, 0))
|
||||
>v3 : Symbol(file3.v3, Decl(file3.ts, 0, 10))
|
||||
|
||||
var v4 = {a: true, b: NaN}; // Should shadow global v2 in this module
|
||||
>v4 : Symbol(v4, Decl(file4.ts, 4, 3))
|
||||
>a : Symbol(a, Decl(file4.ts, 4, 10))
|
||||
>b : Symbol(b, Decl(file4.ts, 4, 18))
|
||||
>NaN : Symbol(NaN, Decl(lib.d.ts, --, --))
|
||||
|
||||
=== tests/cases/conformance/externalModules/file5.ts ===
|
||||
var x = v2; // Should be global v2 of type number again
|
||||
>x : Symbol(x, Decl(file5.ts, 0, 3))
|
||||
>v2 : Symbol(v2, Decl(file2.ts, 0, 3))
|
||||
|
58
tests/baselines/reference/moduleScoping.types
Normal file
58
tests/baselines/reference/moduleScoping.types
Normal file
|
@ -0,0 +1,58 @@
|
|||
=== tests/cases/conformance/externalModules/file1.ts ===
|
||||
var v1 = "sausages"; // Global scope
|
||||
>v1 : string
|
||||
>"sausages" : string
|
||||
|
||||
=== tests/cases/conformance/externalModules/file2.ts ===
|
||||
var v2 = 42; // Global scope
|
||||
>v2 : number
|
||||
>42 : number
|
||||
|
||||
var v4 = () => 5;
|
||||
>v4 : () => number
|
||||
>() => 5 : () => number
|
||||
>5 : number
|
||||
|
||||
=== tests/cases/conformance/externalModules/file3.ts ===
|
||||
export var v3 = true;
|
||||
>v3 : boolean
|
||||
>true : boolean
|
||||
|
||||
var v2 = [1,2,3]; // Module scope. Should not appear in global scope
|
||||
>v2 : number[]
|
||||
>[1,2,3] : number[]
|
||||
>1 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
=== tests/cases/conformance/externalModules/file4.ts ===
|
||||
import file3 = require('./file3');
|
||||
>file3 : typeof file3
|
||||
|
||||
var t1 = v1;
|
||||
>t1 : string
|
||||
>v1 : string
|
||||
|
||||
var t2 = v2;
|
||||
>t2 : number
|
||||
>v2 : number
|
||||
|
||||
var t3 = file3.v3;
|
||||
>t3 : boolean
|
||||
>file3.v3 : boolean
|
||||
>file3 : typeof file3
|
||||
>v3 : boolean
|
||||
|
||||
var v4 = {a: true, b: NaN}; // Should shadow global v2 in this module
|
||||
>v4 : { a: boolean; b: number; }
|
||||
>{a: true, b: NaN} : { a: boolean; b: number; }
|
||||
>a : boolean
|
||||
>true : boolean
|
||||
>b : number
|
||||
>NaN : number
|
||||
|
||||
=== tests/cases/conformance/externalModules/file5.ts ===
|
||||
var x = v2; // Should be global v2 of type number again
|
||||
>x : number
|
||||
>v2 : number
|
||||
|
|
@ -1,18 +1,15 @@
|
|||
tests/cases/compiler/nonMergedOverloads.ts(1,5): error TS2300: Duplicate identifier 'f'.
|
||||
tests/cases/compiler/nonMergedOverloads.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/compiler/nonMergedOverloads.ts(3,17): error TS2300: Duplicate identifier 'f'.
|
||||
tests/cases/compiler/nonMergedOverloads.ts(4,17): error TS2300: Duplicate identifier 'f'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/nonMergedOverloads.ts (4 errors) ====
|
||||
==== tests/cases/compiler/nonMergedOverloads.ts (3 errors) ====
|
||||
var f = 10;
|
||||
~
|
||||
!!! error TS2300: Duplicate identifier 'f'.
|
||||
|
||||
export function f();
|
||||
~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
~
|
||||
!!! error TS2300: Duplicate identifier 'f'.
|
||||
export function f() {
|
||||
~
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,28): error TS2304: Cannot find name 'DisplayPosition'.
|
||||
tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,45): error TS1137: Expression or comma expected.
|
||||
tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,46): error TS1005: ';' expected.
|
||||
|
@ -35,10 +34,8 @@ tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(2,97): error T
|
|||
tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(3,25): error TS2304: Cannot find name 'SeedCoords'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts (35 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts (34 errors) ====
|
||||
export class Game {
|
||||
~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
private position = new DisplayPosition([), 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 0], NoMove, 0);
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'DisplayPosition'.
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546.ts (1 errors) ====
|
||||
export class Logger {
|
||||
~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
public
|
||||
}
|
||||
|
8
tests/baselines/reference/parser509546.symbols
Normal file
8
tests/baselines/reference/parser509546.symbols
Normal file
|
@ -0,0 +1,8 @@
|
|||
=== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546.ts ===
|
||||
export class Logger {
|
||||
>Logger : Symbol(Logger, Decl(parser509546.ts, 0, 0))
|
||||
|
||||
public
|
||||
>public : Symbol(public, Decl(parser509546.ts, 0, 21))
|
||||
}
|
||||
|
8
tests/baselines/reference/parser509546.types
Normal file
8
tests/baselines/reference/parser509546.types
Normal file
|
@ -0,0 +1,8 @@
|
|||
=== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546.ts ===
|
||||
export class Logger {
|
||||
>Logger : Logger
|
||||
|
||||
public
|
||||
>public : any
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_1.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_1.ts (1 errors) ====
|
||||
export class Logger {
|
||||
~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
public
|
||||
}
|
||||
|
8
tests/baselines/reference/parser509546_1.symbols
Normal file
8
tests/baselines/reference/parser509546_1.symbols
Normal file
|
@ -0,0 +1,8 @@
|
|||
=== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_1.ts ===
|
||||
export class Logger {
|
||||
>Logger : Symbol(Logger, Decl(parser509546_1.ts, 0, 0))
|
||||
|
||||
public
|
||||
>public : Symbol(public, Decl(parser509546_1.ts, 0, 21))
|
||||
}
|
||||
|
8
tests/baselines/reference/parser509546_1.types
Normal file
8
tests/baselines/reference/parser509546_1.types
Normal file
|
@ -0,0 +1,8 @@
|
|||
=== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_1.ts ===
|
||||
export class Logger {
|
||||
>Logger : Logger
|
||||
|
||||
public
|
||||
>public : any
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts(3,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts (1 errors) ====
|
||||
"use strict";
|
||||
|
||||
export class Logger {
|
||||
~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
public
|
||||
}
|
||||
|
10
tests/baselines/reference/parser509546_2.symbols
Normal file
10
tests/baselines/reference/parser509546_2.symbols
Normal file
|
@ -0,0 +1,10 @@
|
|||
=== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts ===
|
||||
"use strict";
|
||||
|
||||
export class Logger {
|
||||
>Logger : Symbol(Logger, Decl(parser509546_2.ts, 0, 13))
|
||||
|
||||
public
|
||||
>public : Symbol(public, Decl(parser509546_2.ts, 2, 21))
|
||||
}
|
||||
|
11
tests/baselines/reference/parser509546_2.types
Normal file
11
tests/baselines/reference/parser509546_2.types
Normal file
|
@ -0,0 +1,11 @@
|
|||
=== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts ===
|
||||
"use strict";
|
||||
>"use strict" : string
|
||||
|
||||
export class Logger {
|
||||
>Logger : Logger
|
||||
|
||||
public
|
||||
>public : any
|
||||
}
|
||||
|
|
@ -1,13 +1,10 @@
|
|||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts(1,8): error TS1030: 'export' modifier already seen.
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts(1,21): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts (1 errors) ====
|
||||
export export class Foo {
|
||||
~~~~~~
|
||||
!!! error TS1030: 'export' modifier already seen.
|
||||
~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
public Bar() {
|
||||
}
|
||||
}
|
|
@ -1,12 +1,9 @@
|
|||
tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts(1,35): error TS2304: Cannot find name 'HTMLElement'.
|
||||
tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts(2,42): error TS2304: Cannot find name '_classNameRegexp'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts (3 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts (2 errors) ====
|
||||
export function removeClass (node:HTMLElement, className:string) {
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'HTMLElement'.
|
||||
node.className = node.className.replace(_classNameRegexp(className), function (everything, leftDelimiter, name, rightDelimiter) {
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass1.ts(1,18): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass1.ts(1,40): error TS2304: Cannot find name 'ILogger'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass1.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass1.ts (1 errors) ====
|
||||
export class NullLogger implements ILogger {
|
||||
~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'ILogger'.
|
||||
public information(): boolean { return false; }
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts(3,18): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts(3,43): error TS2304: Cannot find name 'ILogger'.
|
||||
tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts(4,37): error TS2304: Cannot find name 'ILogger'.
|
||||
tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts(5,18): error TS2339: Property '_information' does not exist on type 'LoggerAdapter'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts (4 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts (3 errors) ====
|
||||
|
||||
|
||||
export class LoggerAdapter implements ILogger {
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'ILogger'.
|
||||
constructor (public logger: ILogger) {
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts (1 errors) ====
|
||||
|
||||
|
||||
export enum SignatureFlags {
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
None = 0,
|
||||
IsIndexer = 1,
|
||||
IsStringIndexer = 1 << 1,
|
||||
IsNumberIndexer = 1 << 2,
|
||||
}
|
18
tests/baselines/reference/parserEnum1.symbols
Normal file
18
tests/baselines/reference/parserEnum1.symbols
Normal file
|
@ -0,0 +1,18 @@
|
|||
=== tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts ===
|
||||
|
||||
|
||||
export enum SignatureFlags {
|
||||
>SignatureFlags : Symbol(SignatureFlags, Decl(parserEnum1.ts, 0, 0))
|
||||
|
||||
None = 0,
|
||||
>None : Symbol(SignatureFlags.None, Decl(parserEnum1.ts, 2, 32))
|
||||
|
||||
IsIndexer = 1,
|
||||
>IsIndexer : Symbol(SignatureFlags.IsIndexer, Decl(parserEnum1.ts, 3, 17))
|
||||
|
||||
IsStringIndexer = 1 << 1,
|
||||
>IsStringIndexer : Symbol(SignatureFlags.IsStringIndexer, Decl(parserEnum1.ts, 4, 22))
|
||||
|
||||
IsNumberIndexer = 1 << 2,
|
||||
>IsNumberIndexer : Symbol(SignatureFlags.IsNumberIndexer, Decl(parserEnum1.ts, 5, 33))
|
||||
}
|
26
tests/baselines/reference/parserEnum1.types
Normal file
26
tests/baselines/reference/parserEnum1.types
Normal file
|
@ -0,0 +1,26 @@
|
|||
=== tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts ===
|
||||
|
||||
|
||||
export enum SignatureFlags {
|
||||
>SignatureFlags : SignatureFlags
|
||||
|
||||
None = 0,
|
||||
>None : SignatureFlags
|
||||
>0 : number
|
||||
|
||||
IsIndexer = 1,
|
||||
>IsIndexer : SignatureFlags
|
||||
>1 : number
|
||||
|
||||
IsStringIndexer = 1 << 1,
|
||||
>IsStringIndexer : SignatureFlags
|
||||
>1 << 1 : number
|
||||
>1 : number
|
||||
>1 : number
|
||||
|
||||
IsNumberIndexer = 1 << 2,
|
||||
>IsNumberIndexer : SignatureFlags
|
||||
>1 << 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts (1 errors) ====
|
||||
|
||||
|
||||
export enum SignatureFlags {
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
None = 0,
|
||||
IsIndexer = 1,
|
||||
IsStringIndexer = 1 << 1,
|
||||
IsNumberIndexer = 1 << 2
|
||||
}
|
18
tests/baselines/reference/parserEnum2.symbols
Normal file
18
tests/baselines/reference/parserEnum2.symbols
Normal file
|
@ -0,0 +1,18 @@
|
|||
=== tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts ===
|
||||
|
||||
|
||||
export enum SignatureFlags {
|
||||
>SignatureFlags : Symbol(SignatureFlags, Decl(parserEnum2.ts, 0, 0))
|
||||
|
||||
None = 0,
|
||||
>None : Symbol(SignatureFlags.None, Decl(parserEnum2.ts, 2, 32))
|
||||
|
||||
IsIndexer = 1,
|
||||
>IsIndexer : Symbol(SignatureFlags.IsIndexer, Decl(parserEnum2.ts, 3, 17))
|
||||
|
||||
IsStringIndexer = 1 << 1,
|
||||
>IsStringIndexer : Symbol(SignatureFlags.IsStringIndexer, Decl(parserEnum2.ts, 4, 22))
|
||||
|
||||
IsNumberIndexer = 1 << 2
|
||||
>IsNumberIndexer : Symbol(SignatureFlags.IsNumberIndexer, Decl(parserEnum2.ts, 5, 33))
|
||||
}
|
26
tests/baselines/reference/parserEnum2.types
Normal file
26
tests/baselines/reference/parserEnum2.types
Normal file
|
@ -0,0 +1,26 @@
|
|||
=== tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts ===
|
||||
|
||||
|
||||
export enum SignatureFlags {
|
||||
>SignatureFlags : SignatureFlags
|
||||
|
||||
None = 0,
|
||||
>None : SignatureFlags
|
||||
>0 : number
|
||||
|
||||
IsIndexer = 1,
|
||||
>IsIndexer : SignatureFlags
|
||||
>1 : number
|
||||
|
||||
IsStringIndexer = 1 << 1,
|
||||
>IsStringIndexer : SignatureFlags
|
||||
>1 << 1 : number
|
||||
>1 : number
|
||||
>1 : number
|
||||
|
||||
IsNumberIndexer = 1 << 2
|
||||
>IsNumberIndexer : SignatureFlags
|
||||
>1 << 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum3.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum3.ts (1 errors) ====
|
||||
|
||||
|
||||
export enum SignatureFlags {
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
}
|
6
tests/baselines/reference/parserEnum3.symbols
Normal file
6
tests/baselines/reference/parserEnum3.symbols
Normal file
|
@ -0,0 +1,6 @@
|
|||
=== tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum3.ts ===
|
||||
|
||||
|
||||
export enum SignatureFlags {
|
||||
>SignatureFlags : Symbol(SignatureFlags, Decl(parserEnum3.ts, 0, 0))
|
||||
}
|
6
tests/baselines/reference/parserEnum3.types
Normal file
6
tests/baselines/reference/parserEnum3.types
Normal file
|
@ -0,0 +1,6 @@
|
|||
=== tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum3.ts ===
|
||||
|
||||
|
||||
export enum SignatureFlags {
|
||||
>SignatureFlags : SignatureFlags
|
||||
}
|
|
@ -1,13 +1,10 @@
|
|||
tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum4.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum4.ts(4,9): error TS1132: Enum member expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum4.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum4.ts (1 errors) ====
|
||||
|
||||
|
||||
export enum SignatureFlags {
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
,
|
||||
~
|
||||
!!! error TS1132: Enum member expected.
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment1.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment1.ts(1,10): error TS2304: Cannot find name 'foo'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment1.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment1.ts (1 errors) ====
|
||||
export = foo
|
||||
~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'foo'.
|
|
@ -1,10 +1,7 @@
|
|||
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment2.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment2.ts(1,10): error TS2304: Cannot find name 'foo'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment2.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment2.ts (1 errors) ====
|
||||
export = foo;
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'foo'.
|
|
@ -1,10 +1,7 @@
|
|||
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment3.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment3.ts(1,9): error TS1109: Expression expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment3.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment3.ts (1 errors) ====
|
||||
export =
|
||||
~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
!!! error TS1109: Expression expected.
|
|
@ -1,10 +1,7 @@
|
|||
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment4.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment4.ts(1,10): error TS1109: Expression expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment4.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment4.ts (1 errors) ====
|
||||
export = ;
|
||||
~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
|
@ -1,12 +1,9 @@
|
|||
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment7.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment7.ts(4,1): error TS2309: An export assignment cannot be used in a module with other exported elements.
|
||||
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment7.ts(4,10): error TS2304: Cannot find name 'B'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment7.ts (3 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment7.ts (2 errors) ====
|
||||
export class C {
|
||||
~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
}
|
||||
|
||||
export = B;
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment8.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment8.ts(1,1): error TS2309: An export assignment cannot be used in a module with other exported elements.
|
||||
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment8.ts(1,10): error TS2304: Cannot find name 'B'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment8.ts (3 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment8.ts (2 errors) ====
|
||||
export = B;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2309: An export assignment cannot be used in a module with other exported elements.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'B'.
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration6.ts(1,8): error TS1030: 'export' modifier already seen.
|
||||
tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration6.ts(1,25): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration6.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration6.ts (1 errors) ====
|
||||
export export interface I {
|
||||
~~~~~~
|
||||
!!! error TS1030: 'export' modifier already seen.
|
||||
~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration7.ts(1,18): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration7.ts (1 errors) ====
|
||||
export interface I {
|
||||
~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
=== tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration7.ts ===
|
||||
export interface I {
|
||||
>I : Symbol(I, Decl(parserInterfaceDeclaration7.ts, 0, 0))
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
=== tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration7.ts ===
|
||||
export interface I {
|
||||
>I : I
|
||||
}
|
|
@ -1,11 +1,8 @@
|
|||
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock1.ts(2,4): error TS1184: Modifiers cannot appear here.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock1.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock1.ts (1 errors) ====
|
||||
export function foo() {
|
||||
~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
export var x = this;
|
||||
~~~~~~
|
||||
!!! error TS1184: Modifiers cannot appear here.
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock3.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock3.ts(2,4): error TS1184: Modifiers cannot appear here.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock3.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock3.ts (1 errors) ====
|
||||
export function foo() {
|
||||
~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
export function bar() {
|
||||
~~~~~~
|
||||
!!! error TS1184: Modifiers cannot appear here.
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModule1.ts(1,19): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModule1.ts (1 errors) ====
|
||||
export module CompilerDiagnostics {
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
export var debug = false;
|
||||
export interface IDiagnosticWriter {
|
||||
Alert(output: string): void;
|
||||
}
|
||||
|
||||
export var diagnosticWriter: IDiagnosticWriter = null;
|
||||
|
||||
export var analysisPass: number = 0;
|
||||
|
||||
export function Alert(output: string) {
|
||||
if (diagnosticWriter) {
|
||||
diagnosticWriter.Alert(output);
|
||||
}
|
||||
}
|
||||
|
||||
export function debugPrint(s: string) {
|
||||
if (debug) {
|
||||
Alert(s);
|
||||
}
|
||||
}
|
||||
|
||||
export function assert(condition: boolean, s: string) {
|
||||
if (debug) {
|
||||
if (!condition) {
|
||||
Alert(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
69
tests/baselines/reference/parserModule1.symbols
Normal file
69
tests/baselines/reference/parserModule1.symbols
Normal file
|
@ -0,0 +1,69 @@
|
|||
=== tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModule1.ts ===
|
||||
export module CompilerDiagnostics {
|
||||
>CompilerDiagnostics : Symbol(CompilerDiagnostics, Decl(parserModule1.ts, 0, 0))
|
||||
|
||||
export var debug = false;
|
||||
>debug : Symbol(debug, Decl(parserModule1.ts, 1, 18))
|
||||
|
||||
export interface IDiagnosticWriter {
|
||||
>IDiagnosticWriter : Symbol(IDiagnosticWriter, Decl(parserModule1.ts, 1, 33))
|
||||
|
||||
Alert(output: string): void;
|
||||
>Alert : Symbol(Alert, Decl(parserModule1.ts, 2, 44))
|
||||
>output : Symbol(output, Decl(parserModule1.ts, 3, 18))
|
||||
}
|
||||
|
||||
export var diagnosticWriter: IDiagnosticWriter = null;
|
||||
>diagnosticWriter : Symbol(diagnosticWriter, Decl(parserModule1.ts, 6, 18))
|
||||
>IDiagnosticWriter : Symbol(IDiagnosticWriter, Decl(parserModule1.ts, 1, 33))
|
||||
|
||||
export var analysisPass: number = 0;
|
||||
>analysisPass : Symbol(analysisPass, Decl(parserModule1.ts, 8, 18))
|
||||
|
||||
export function Alert(output: string) {
|
||||
>Alert : Symbol(Alert, Decl(parserModule1.ts, 8, 44))
|
||||
>output : Symbol(output, Decl(parserModule1.ts, 10, 30))
|
||||
|
||||
if (diagnosticWriter) {
|
||||
>diagnosticWriter : Symbol(diagnosticWriter, Decl(parserModule1.ts, 6, 18))
|
||||
|
||||
diagnosticWriter.Alert(output);
|
||||
>diagnosticWriter.Alert : Symbol(IDiagnosticWriter.Alert, Decl(parserModule1.ts, 2, 44))
|
||||
>diagnosticWriter : Symbol(diagnosticWriter, Decl(parserModule1.ts, 6, 18))
|
||||
>Alert : Symbol(IDiagnosticWriter.Alert, Decl(parserModule1.ts, 2, 44))
|
||||
>output : Symbol(output, Decl(parserModule1.ts, 10, 30))
|
||||
}
|
||||
}
|
||||
|
||||
export function debugPrint(s: string) {
|
||||
>debugPrint : Symbol(debugPrint, Decl(parserModule1.ts, 14, 9))
|
||||
>s : Symbol(s, Decl(parserModule1.ts, 16, 35))
|
||||
|
||||
if (debug) {
|
||||
>debug : Symbol(debug, Decl(parserModule1.ts, 1, 18))
|
||||
|
||||
Alert(s);
|
||||
>Alert : Symbol(Alert, Decl(parserModule1.ts, 8, 44))
|
||||
>s : Symbol(s, Decl(parserModule1.ts, 16, 35))
|
||||
}
|
||||
}
|
||||
|
||||
export function assert(condition: boolean, s: string) {
|
||||
>assert : Symbol(assert, Decl(parserModule1.ts, 20, 9))
|
||||
>condition : Symbol(condition, Decl(parserModule1.ts, 22, 31))
|
||||
>s : Symbol(s, Decl(parserModule1.ts, 22, 50))
|
||||
|
||||
if (debug) {
|
||||
>debug : Symbol(debug, Decl(parserModule1.ts, 1, 18))
|
||||
|
||||
if (!condition) {
|
||||
>condition : Symbol(condition, Decl(parserModule1.ts, 22, 31))
|
||||
|
||||
Alert(s);
|
||||
>Alert : Symbol(Alert, Decl(parserModule1.ts, 8, 44))
|
||||
>s : Symbol(s, Decl(parserModule1.ts, 22, 50))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
76
tests/baselines/reference/parserModule1.types
Normal file
76
tests/baselines/reference/parserModule1.types
Normal file
|
@ -0,0 +1,76 @@
|
|||
=== tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModule1.ts ===
|
||||
export module CompilerDiagnostics {
|
||||
>CompilerDiagnostics : typeof CompilerDiagnostics
|
||||
|
||||
export var debug = false;
|
||||
>debug : boolean
|
||||
>false : boolean
|
||||
|
||||
export interface IDiagnosticWriter {
|
||||
>IDiagnosticWriter : IDiagnosticWriter
|
||||
|
||||
Alert(output: string): void;
|
||||
>Alert : (output: string) => void
|
||||
>output : string
|
||||
}
|
||||
|
||||
export var diagnosticWriter: IDiagnosticWriter = null;
|
||||
>diagnosticWriter : IDiagnosticWriter
|
||||
>IDiagnosticWriter : IDiagnosticWriter
|
||||
>null : null
|
||||
|
||||
export var analysisPass: number = 0;
|
||||
>analysisPass : number
|
||||
>0 : number
|
||||
|
||||
export function Alert(output: string) {
|
||||
>Alert : (output: string) => void
|
||||
>output : string
|
||||
|
||||
if (diagnosticWriter) {
|
||||
>diagnosticWriter : IDiagnosticWriter
|
||||
|
||||
diagnosticWriter.Alert(output);
|
||||
>diagnosticWriter.Alert(output) : void
|
||||
>diagnosticWriter.Alert : (output: string) => void
|
||||
>diagnosticWriter : IDiagnosticWriter
|
||||
>Alert : (output: string) => void
|
||||
>output : string
|
||||
}
|
||||
}
|
||||
|
||||
export function debugPrint(s: string) {
|
||||
>debugPrint : (s: string) => void
|
||||
>s : string
|
||||
|
||||
if (debug) {
|
||||
>debug : boolean
|
||||
|
||||
Alert(s);
|
||||
>Alert(s) : void
|
||||
>Alert : (output: string) => void
|
||||
>s : string
|
||||
}
|
||||
}
|
||||
|
||||
export function assert(condition: boolean, s: string) {
|
||||
>assert : (condition: boolean, s: string) => void
|
||||
>condition : boolean
|
||||
>s : string
|
||||
|
||||
if (debug) {
|
||||
>debug : boolean
|
||||
|
||||
if (!condition) {
|
||||
>!condition : boolean
|
||||
>condition : boolean
|
||||
|
||||
Alert(s);
|
||||
>Alert(s) : void
|
||||
>Alert : (output: string) => void
|
||||
>s : string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
tests/cases/conformance/externalModules/test/foo.d.ts(1,23): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/test/file1.ts (0 errors) ====
|
||||
import foo = require('foo');
|
||||
import other = require('./other');
|
||||
import relMod = require('./sub/relMod');
|
||||
|
||||
if(foo.M2.x){
|
||||
var x = new relMod(other.M2.x.charCodeAt(0));
|
||||
}
|
||||
|
||||
==== tests/cases/conformance/externalModules/test/foo.d.ts (1 errors) ====
|
||||
export declare module M2 {
|
||||
~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
export var x: boolean;
|
||||
}
|
||||
|
||||
==== tests/cases/conformance/externalModules/test/other.d.ts (0 errors) ====
|
||||
export declare module M2 {
|
||||
export var x: string;
|
||||
}
|
||||
|
||||
==== tests/cases/conformance/externalModules/test/sub/relMod.d.ts (0 errors) ====
|
||||
declare class Test {
|
||||
constructor(x: number);
|
||||
}
|
||||
export = Test;
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
=== tests/cases/conformance/externalModules/test/file1.ts ===
|
||||
import foo = require('foo');
|
||||
>foo : Symbol(foo, Decl(file1.ts, 0, 0))
|
||||
|
||||
import other = require('./other');
|
||||
>other : Symbol(other, Decl(file1.ts, 0, 28))
|
||||
|
||||
import relMod = require('./sub/relMod');
|
||||
>relMod : Symbol(relMod, Decl(file1.ts, 1, 34))
|
||||
|
||||
if(foo.M2.x){
|
||||
>foo.M2.x : Symbol(foo.M2.x, Decl(foo.d.ts, 1, 11))
|
||||
>foo.M2 : Symbol(foo.M2, Decl(foo.d.ts, 0, 0))
|
||||
>foo : Symbol(foo, Decl(file1.ts, 0, 0))
|
||||
>M2 : Symbol(foo.M2, Decl(foo.d.ts, 0, 0))
|
||||
>x : Symbol(foo.M2.x, Decl(foo.d.ts, 1, 11))
|
||||
|
||||
var x = new relMod(other.M2.x.charCodeAt(0));
|
||||
>x : Symbol(x, Decl(file1.ts, 5, 4))
|
||||
>relMod : Symbol(relMod, Decl(file1.ts, 1, 34))
|
||||
>other.M2.x.charCodeAt : Symbol(String.charCodeAt, Decl(lib.d.ts, --, --))
|
||||
>other.M2.x : Symbol(other.M2.x, Decl(other.d.ts, 1, 11))
|
||||
>other.M2 : Symbol(other.M2, Decl(other.d.ts, 0, 0))
|
||||
>other : Symbol(other, Decl(file1.ts, 0, 28))
|
||||
>M2 : Symbol(other.M2, Decl(other.d.ts, 0, 0))
|
||||
>x : Symbol(other.M2.x, Decl(other.d.ts, 1, 11))
|
||||
>charCodeAt : Symbol(String.charCodeAt, Decl(lib.d.ts, --, --))
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/externalModules/test/foo.d.ts ===
|
||||
export declare module M2 {
|
||||
>M2 : Symbol(M2, Decl(foo.d.ts, 0, 0))
|
||||
|
||||
export var x: boolean;
|
||||
>x : Symbol(x, Decl(foo.d.ts, 1, 11))
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/externalModules/test/other.d.ts ===
|
||||
export declare module M2 {
|
||||
>M2 : Symbol(M2, Decl(other.d.ts, 0, 0))
|
||||
|
||||
export var x: string;
|
||||
>x : Symbol(x, Decl(other.d.ts, 1, 11))
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/externalModules/test/sub/relMod.d.ts ===
|
||||
declare class Test {
|
||||
>Test : Symbol(Test, Decl(relMod.d.ts, 0, 0))
|
||||
|
||||
constructor(x: number);
|
||||
>x : Symbol(x, Decl(relMod.d.ts, 1, 13))
|
||||
}
|
||||
export = Test;
|
||||
>Test : Symbol(Test, Decl(relMod.d.ts, 0, 0))
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
=== tests/cases/conformance/externalModules/test/file1.ts ===
|
||||
import foo = require('foo');
|
||||
>foo : typeof foo
|
||||
|
||||
import other = require('./other');
|
||||
>other : typeof other
|
||||
|
||||
import relMod = require('./sub/relMod');
|
||||
>relMod : typeof relMod
|
||||
|
||||
if(foo.M2.x){
|
||||
>foo.M2.x : boolean
|
||||
>foo.M2 : typeof foo.M2
|
||||
>foo : typeof foo
|
||||
>M2 : typeof foo.M2
|
||||
>x : boolean
|
||||
|
||||
var x = new relMod(other.M2.x.charCodeAt(0));
|
||||
>x : relMod
|
||||
>new relMod(other.M2.x.charCodeAt(0)) : relMod
|
||||
>relMod : typeof relMod
|
||||
>other.M2.x.charCodeAt(0) : number
|
||||
>other.M2.x.charCodeAt : (index: number) => number
|
||||
>other.M2.x : string
|
||||
>other.M2 : typeof other.M2
|
||||
>other : typeof other
|
||||
>M2 : typeof other.M2
|
||||
>x : string
|
||||
>charCodeAt : (index: number) => number
|
||||
>0 : number
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/externalModules/test/foo.d.ts ===
|
||||
export declare module M2 {
|
||||
>M2 : typeof M2
|
||||
|
||||
export var x: boolean;
|
||||
>x : boolean
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/externalModules/test/other.d.ts ===
|
||||
export declare module M2 {
|
||||
>M2 : typeof M2
|
||||
|
||||
export var x: string;
|
||||
>x : string
|
||||
}
|
||||
|
||||
=== tests/cases/conformance/externalModules/test/sub/relMod.d.ts ===
|
||||
declare class Test {
|
||||
>Test : Test
|
||||
|
||||
constructor(x: number);
|
||||
>x : number
|
||||
}
|
||||
export = Test;
|
||||
>Test : Test
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
tests/cases/compiler/reservedWords2.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/compiler/reservedWords2.ts(1,8): error TS1109: Expression expected.
|
||||
tests/cases/compiler/reservedWords2.ts(1,14): error TS1005: '(' expected.
|
||||
tests/cases/compiler/reservedWords2.ts(1,16): error TS2304: Cannot find name 'require'.
|
||||
|
@ -32,10 +31,8 @@ tests/cases/compiler/reservedWords2.ts(10,5): error TS2300: Duplicate identifier
|
|||
tests/cases/compiler/reservedWords2.ts(10,6): error TS1003: Identifier expected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/reservedWords2.ts (32 errors) ====
|
||||
==== tests/cases/compiler/reservedWords2.ts (31 errors) ====
|
||||
import while = require("dfdf");
|
||||
~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
~~~~~
|
||||
!!! error TS1109: Expression expected.
|
||||
~
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
tests/cases/conformance/scanner/ecmascript5/scannerClass2.ts(3,18): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
tests/cases/conformance/scanner/ecmascript5/scannerClass2.ts(3,43): error TS2304: Cannot find name 'ILogger'.
|
||||
tests/cases/conformance/scanner/ecmascript5/scannerClass2.ts(4,37): error TS2304: Cannot find name 'ILogger'.
|
||||
tests/cases/conformance/scanner/ecmascript5/scannerClass2.ts(5,18): error TS2339: Property '_information' does not exist on type 'LoggerAdapter'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/scanner/ecmascript5/scannerClass2.ts (4 errors) ====
|
||||
==== tests/cases/conformance/scanner/ecmascript5/scannerClass2.ts (3 errors) ====
|
||||
|
||||
|
||||
export class LoggerAdapter implements ILogger {
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'ILogger'.
|
||||
constructor (public logger: ILogger) {
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
tests/cases/conformance/scanner/ecmascript5/scannerEnum1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/scanner/ecmascript5/scannerEnum1.ts (1 errors) ====
|
||||
export enum CodeGenTarget {
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
ES3 = 0,
|
||||
ES5 = 1,
|
||||
}
|
10
tests/baselines/reference/scannerEnum1.symbols
Normal file
10
tests/baselines/reference/scannerEnum1.symbols
Normal file
|
@ -0,0 +1,10 @@
|
|||
=== tests/cases/conformance/scanner/ecmascript5/scannerEnum1.ts ===
|
||||
export enum CodeGenTarget {
|
||||
>CodeGenTarget : Symbol(CodeGenTarget, Decl(scannerEnum1.ts, 0, 0))
|
||||
|
||||
ES3 = 0,
|
||||
>ES3 : Symbol(CodeGenTarget.ES3, Decl(scannerEnum1.ts, 0, 31))
|
||||
|
||||
ES5 = 1,
|
||||
>ES5 : Symbol(CodeGenTarget.ES5, Decl(scannerEnum1.ts, 1, 16))
|
||||
}
|
12
tests/baselines/reference/scannerEnum1.types
Normal file
12
tests/baselines/reference/scannerEnum1.types
Normal file
|
@ -0,0 +1,12 @@
|
|||
=== tests/cases/conformance/scanner/ecmascript5/scannerEnum1.ts ===
|
||||
export enum CodeGenTarget {
|
||||
>CodeGenTarget : CodeGenTarget
|
||||
|
||||
ES3 = 0,
|
||||
>ES3 : CodeGenTarget
|
||||
>0 : number
|
||||
|
||||
ES5 = 1,
|
||||
>ES5 : CodeGenTarget
|
||||
>1 : number
|
||||
}
|
|
@ -6,10 +6,9 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod
|
|||
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(38,25): error TS2507: Type 'any' is not a constructor function type.
|
||||
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(44,9): error TS2332: 'this' cannot be referenced in current location.
|
||||
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(45,9): error TS2332: 'this' cannot be referenced in current location.
|
||||
tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts(48,1): error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts (9 errors) ====
|
||||
==== tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts (8 errors) ====
|
||||
//'this' in static member initializer
|
||||
class ErrClass1 {
|
||||
static t = this; // Error
|
||||
|
@ -73,6 +72,4 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod
|
|||
!!! error TS2332: 'this' cannot be referenced in current location.
|
||||
}
|
||||
|
||||
export = this; // Should be an error
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
|
||||
export = this; // Should be an error
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue