Improve 'Cannot compile modules unless the '--module' flag is provided.' message

This commit is contained in:
yaoyao 2015-12-08 08:56:41 +08:00
parent bf8812ee57
commit e95ae4f100
60 changed files with 117 additions and 117 deletions

View file

@ -435,7 +435,7 @@
"category": "Error",
"code": 1147
},
"Cannot compile modules unless the '--module' flag is provided.": {
"Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.": {
"category": "Error",
"code": 1148
},

View file

@ -1234,7 +1234,7 @@ namespace ts {
else if (firstExternalModuleSourceFile && languageVersion < ScriptTarget.ES6 && !options.module) {
// We cannot use createDiagnosticFromNode because nodes do not have parents yet
const span = getErrorSpanForNode(firstExternalModuleSourceFile, firstExternalModuleSourceFile.externalModuleIndicator);
programDiagnostics.add(createFileDiagnostic(firstExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_modules_unless_the_module_flag_is_provided));
programDiagnostics.add(createFileDiagnostic(firstExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_modules_unless_the_module_flag_is_provided_Consider_setting_the_module_compiler_option_in_a_tsconfig_json_file));
}
// Cannot specify module gen target of es6 when below es6

View file

@ -1,4 +1,4 @@
tests/cases/compiler/ExportAssignment7.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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'.
@ -6,7 +6,7 @@ tests/cases/compiler/ExportAssignment7.ts(4,10): error TS2304: Cannot find name
==== tests/cases/compiler/ExportAssignment7.ts (3 errors) ====
export class C {
~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
}
export = B;

View file

@ -1,4 +1,4 @@
tests/cases/compiler/ExportAssignment8.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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'.
@ -6,7 +6,7 @@ tests/cases/compiler/ExportAssignment8.ts(1,10): error TS2304: Cannot find name
==== tests/cases/compiler/ExportAssignment8.ts (3 errors) ====
export = B;
~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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.
~

View file

@ -1,4 +1,4 @@
tests/cases/conformance/internalModules/DeclarationMerging/part1.ts(1,15): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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'.
@ -7,7 +7,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/part2.ts(7,54): error
==== tests/cases/conformance/internalModules/DeclarationMerging/part1.ts (1 errors) ====
export module A {
~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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;

View file

@ -1,11 +1,11 @@
tests/cases/conformance/ambient/consumer.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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.
!!! 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

View file

@ -1,4 +1,4 @@
tests/cases/conformance/externalModules/foo1.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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'.
@ -29,7 +29,7 @@ tests/cases/conformance/externalModules/foo2.ts(13,8): error TS2339: Property 'x
==== tests/cases/conformance/externalModules/foo1.ts (2 errors) ====
import foo2 = require('./foo2');
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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;

View file

@ -1,4 +1,4 @@
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractManyKeywords.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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.
@ -7,7 +7,7 @@ tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbst
==== tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractManyKeywords.ts (4 errors) ====
export default abstract class A {}
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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 {}

View file

@ -1,4 +1,4 @@
tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(4,14): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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.
@ -11,7 +11,7 @@ tests/cases/compiler/classMemberInitializerWithLamdaScoping3_1.ts(8,21): error T
};
export class Test1 {
~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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 = () => {

View file

@ -1,11 +1,11 @@
tests/cases/compiler/classMemberInitializerWithLamdaScoping3_0.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
export var field1: string;
~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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: {

View file

@ -1,4 +1,4 @@
tests/cases/conformance/externalModules/foo1.ts(3,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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='.
@ -17,7 +17,7 @@ tests/cases/conformance/externalModules/foo5.ts(6,1): error TS2300: Duplicate id
var y = 20;
export = x;
~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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;

View file

@ -1,7 +1,7 @@
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.
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 'any', but here has type 'number'.
@ -25,7 +25,7 @@ tests/cases/compiler/duplicateLocalVariable1.ts(187,22): error TS2403: Subsequen
export class TestCase {
~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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) {
}
}

View file

@ -1,10 +1,10 @@
tests/cases/compiler/es5ModuleWithoutModuleGenTarget.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
{
constructor ()
{

View file

@ -1,4 +1,4 @@
tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
@ -8,7 +8,7 @@ tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot comp
==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ====
export function x(){
~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
return true;
}

View file

@ -1,4 +1,4 @@
tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
@ -7,7 +7,7 @@ tests/cases/conformance/externalModules/foo1.ts(1,17): error TS1148: Cannot comp
==== tests/cases/conformance/externalModules/foo1.ts (1 errors) ====
export function x(){
~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
return true;
}

View file

@ -1,4 +1,4 @@
tests/cases/conformance/externalModules/foo1.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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.
@ -6,7 +6,7 @@ tests/cases/conformance/externalModules/foo6.ts(1,14): error TS1109: Expression
var x = 10;
export = typeof x; // Ok
~~~~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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

View file

@ -1,4 +1,4 @@
tests/cases/conformance/externalModules/expString.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
@ -27,7 +27,7 @@ tests/cases/conformance/externalModules/expString.ts(2,1): error TS1148: Cannot
var x = "test";
export = x;
~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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;

View file

@ -1,4 +1,4 @@
tests/cases/conformance/externalModules/foo1.ts(6,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
@ -12,5 +12,5 @@ tests/cases/conformance/externalModules/foo1.ts(6,1): error TS1148: Cannot compi
}
export = M1;
~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.

View file

@ -1,4 +1,4 @@
tests/cases/conformance/externalModules/foo1.ts(7,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
@ -10,7 +10,7 @@ tests/cases/conformance/externalModules/foo1.ts(7,1): error TS1148: Cannot compi
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.
!!! 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) ====

View file

@ -1,4 +1,4 @@
tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
@ -6,5 +6,5 @@ tests/cases/compiler/externalModuleWithoutCompilerFlag1.ts(3,17): error TS1148:
// 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.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
}

View file

@ -1,4 +1,4 @@
tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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>'.
@ -6,7 +6,7 @@ tests/cases/compiler/genericArrayExtenstions.ts(1,22): error TS2420: Class 'Obse
==== tests/cases/compiler/genericArrayExtenstions.ts (2 errors) ====
export declare class ObservableArray<T> implements Array<T> { // MS.Entertainment.ObservableArray
~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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>'.

View file

@ -1,4 +1,4 @@
tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts(1,15): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
@ -12,7 +12,7 @@ tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts(
==== tests/cases/compiler/importAliasAnExternalModuleInsideAnInternalModule_file0.ts (1 errors) ====
export module m {
~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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() { }
}

View file

@ -1,4 +1,4 @@
tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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 TS2435: Ambient modules cannot be nested in other modules or namespaces.
tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(3,26): error TS2307: Cannot find module 'externalModule'.
@ -7,7 +7,7 @@ tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(3,26): er
==== tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts (4 errors) ====
import b = require("externalModule");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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" {

View file

@ -1,4 +1,4 @@
tests/cases/compiler/importDeclWithDeclareModifier.ts(5,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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'.
@ -10,7 +10,7 @@ tests/cases/compiler/importDeclWithDeclareModifier.ts(5,29): error TS2305: Modul
}
declare export import a = x.c;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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.
~

View file

@ -1,5 +1,5 @@
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.
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.
@ -7,6 +7,6 @@ tests/cases/compiler/a.js(1,1): error TS8003: 'export=' can only be used in a .t
==== tests/cases/compiler/a.js (2 errors) ====
export = b;
~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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.

View file

@ -1,10 +1,10 @@
tests/cases/compiler/mergedModuleDeclarationCodeGen.ts(1,15): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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.
!!! 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) {

View file

@ -1,4 +1,4 @@
tests/cases/conformance/externalModules/file3.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
@ -11,7 +11,7 @@ tests/cases/conformance/externalModules/file3.ts(1,1): error TS1148: Cannot comp
==== tests/cases/conformance/externalModules/file3.ts (1 errors) ====
export var v3 = true;
~~~~~~~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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) ====

View file

@ -1,5 +1,5 @@
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.
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'.
@ -11,7 +11,7 @@ tests/cases/compiler/nonMergedOverloads.ts(4,17): error TS2300: Duplicate identi
export function f();
~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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() {

View file

@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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.
@ -38,7 +38,7 @@ tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts(3,25): error T
==== tests/cases/conformance/parser/ecmascript5/Fuzz/parser0_004152.ts (35 errors) ====
export class Game {
~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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'.

View file

@ -1,10 +1,10 @@
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
public
}

View file

@ -1,10 +1,10 @@
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_1.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
public
}

View file

@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts(3,14): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509546_2.ts(3,1
export class Logger {
~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
public
}

View file

@ -1,5 +1,5 @@
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.
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) ====
@ -7,7 +7,7 @@ tests/cases/conformance/parser/ecmascript5/RegressionTests/parser618973.ts(1,21)
~~~~~~
!!! error TS1030: 'export' modifier already seen.
~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
public Bar() {
}
}

View file

@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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'.
@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts(2,42): error T
==== tests/cases/conformance/parser/ecmascript5/parserArgumentList1.ts (3 errors) ====
export function removeClass (node:HTMLElement, className:string) {
~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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) {

View file

@ -1,11 +1,11 @@
tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass1.ts(1,18): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
export class NullLogger implements ILogger {
~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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; }

View file

@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts(3,18): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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'.
@ -9,7 +9,7 @@ tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClass2.ts(5,1
export class LoggerAdapter implements ILogger {
~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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) {

View file

@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts(3,17)
export enum SignatureFlags {
~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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,

View file

@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts(3,17)
export enum SignatureFlags {
~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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,

View file

@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum3.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
@ -6,5 +6,5 @@ tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum3.ts(3,17)
export enum SignatureFlags {
~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
}

View file

@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum4.ts(3,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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.
@ -7,7 +7,7 @@ tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum4.ts(4,9):
export enum SignatureFlags {
~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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.

View file

@ -1,10 +1,10 @@
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment1.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
export = foo
~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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'.

View file

@ -1,10 +1,10 @@
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment2.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
export = foo;
~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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'.

View file

@ -1,10 +1,10 @@
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment3.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
export =
~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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.

View file

@ -1,10 +1,10 @@
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment4.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
export = ;
~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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.

View file

@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment7.ts(1,14): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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'.
@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignm
==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment7.ts (3 errors) ====
export class C {
~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
}
export = B;

View file

@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment8.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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'.
@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignm
==== tests/cases/conformance/parser/ecmascript5/ExportAssignments/parserExportAssignment8.ts (3 errors) ====
export = B;
~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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.
~

View file

@ -1,5 +1,5 @@
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.
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) ====
@ -7,5 +7,5 @@ tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterface
~~~~~~
!!! error TS1030: 'export' modifier already seen.
~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
}

View file

@ -1,8 +1,8 @@
tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration7.ts(1,18): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
}

View file

@ -1,11 +1,11 @@
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
export function foo() {
~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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.

View file

@ -1,11 +1,11 @@
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserModifierOnStatementInBlock3.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
export function foo() {
~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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.

View file

@ -1,10 +1,10 @@
tests/cases/conformance/parser/ecmascript5/ModuleDeclarations/parserModule1.ts(1,19): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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.
!!! 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;

View file

@ -1,4 +1,4 @@
tests/cases/conformance/externalModules/test/foo.d.ts(1,23): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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) ====
@ -13,7 +13,7 @@ tests/cases/conformance/externalModules/test/foo.d.ts(1,23): error TS1148: Canno
==== 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.
!!! 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;
}

View file

@ -1,4 +1,4 @@
tests/cases/compiler/reservedWords2.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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'.
@ -35,7 +35,7 @@ tests/cases/compiler/reservedWords2.ts(10,6): error TS1003: Identifier expected.
==== tests/cases/compiler/reservedWords2.ts (32 errors) ====
import while = require("dfdf");
~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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.
~

View file

@ -1,4 +1,4 @@
tests/cases/conformance/scanner/ecmascript5/scannerClass2.ts(3,18): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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'.
@ -9,7 +9,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerClass2.ts(5,18): error TS2339
export class LoggerAdapter implements ILogger {
~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! 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) {

View file

@ -1,10 +1,10 @@
tests/cases/conformance/scanner/ecmascript5/scannerEnum1.ts(1,17): error TS1148: Cannot compile modules unless the '--module' flag is provided.
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.
!!! 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,
}

View file

@ -5,7 +5,7 @@ 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.
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 (8 errors) ====
@ -72,4 +72,4 @@ tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalMod
export = this; // Should be an error
~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.

View file

@ -1,4 +1,4 @@
tests/cases/conformance/jsx/file.tsx(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/jsx/file.tsx(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/jsx/file.tsx(20,16): error TS2339: Property 'ref' does not exist on type 'IntrinsicAttributes & { name?: string; }'.
tests/cases/conformance/jsx/file.tsx(26,42): error TS2339: Property 'subtr' does not exist on type 'string'.
tests/cases/conformance/jsx/file.tsx(28,33): error TS2339: Property 'notARealProperty' does not exist on type 'BigGreeter'.
@ -9,7 +9,7 @@ tests/cases/conformance/jsx/file.tsx(36,26): error TS2339: Property 'propertyNot
import React = require('react');
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
function Greet(x: {name?: string}) {
return <div>Hello, {x}</div>;

View file

@ -1,4 +1,4 @@
tests/cases/conformance/types/specifyingTypes/typeQueries/typeofANonExportedType.ts(2,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/types/specifyingTypes/typeQueries/typeofANonExportedType.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/types/specifyingTypes/typeQueries/typeofANonExportedType.ts(20,12): error TS2323: Cannot redeclare exported variable 'r5'.
tests/cases/conformance/types/specifyingTypes/typeQueries/typeofANonExportedType.ts(21,12): error TS2323: Cannot redeclare exported variable 'r5'.
tests/cases/conformance/types/specifyingTypes/typeQueries/typeofANonExportedType.ts(42,12): error TS2502: 'r12' is referenced directly or indirectly in its own type annotation.
@ -8,7 +8,7 @@ tests/cases/conformance/types/specifyingTypes/typeQueries/typeofANonExportedType
var x = 1;
export var r1: typeof x;
~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
var y = { foo: '' };
export var r2: typeof y;
class C {

View file

@ -1,4 +1,4 @@
tests/cases/conformance/types/specifyingTypes/typeQueries/typeofAnExportedType.ts(1,1): error TS1148: Cannot compile modules unless the '--module' flag is provided.
tests/cases/conformance/types/specifyingTypes/typeQueries/typeofAnExportedType.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/types/specifyingTypes/typeQueries/typeofAnExportedType.ts(20,12): error TS2323: Cannot redeclare exported variable 'r5'.
tests/cases/conformance/types/specifyingTypes/typeQueries/typeofAnExportedType.ts(21,12): error TS2323: Cannot redeclare exported variable 'r5'.
tests/cases/conformance/types/specifyingTypes/typeQueries/typeofAnExportedType.ts(42,12): error TS2502: 'r12' is referenced directly or indirectly in its own type annotation.
@ -7,7 +7,7 @@ tests/cases/conformance/types/specifyingTypes/typeQueries/typeofAnExportedType.t
==== tests/cases/conformance/types/specifyingTypes/typeQueries/typeofAnExportedType.ts (4 errors) ====
export var x = 1;
~~~~~~~~~~~~~~~~~
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided.
!!! error TS1148: Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.
export var r1: typeof x;
export var y = { foo: '' };
export var r2: typeof y;

View file

@ -13,7 +13,7 @@ verify.getSemanticDiagnostics(`[
"code": 8003
},
{
"message": "Cannot compile modules unless the '--module' flag is provided.",
"message": "Cannot compile modules unless the '--module' flag is provided. Consider setting the 'module' compiler option in a 'tsconfig.json' file.",
"start": 0,
"length": 11,
"category": "error",