improve error message TS2307 (#27054)

* improve error message TS2307

* add updates missed from merge

* update more missed baselines

* remove incorrectly re-added test files

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
This commit is contained in:
Donald Pipowitch
2020-03-12 15:55:54 -07:00
committed by GitHub
co-authored by Nathan Shively-Sanders
parent b014e2b568
commit e0f6ecd957
123 changed files with 400 additions and 400 deletions
+1 -1
View File
@@ -2969,7 +2969,7 @@ namespace ts {
function resolveExternalModuleName(location: Node, moduleReferenceExpression: Expression, ignoreErrors?: boolean): Symbol | undefined {
return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? undefined : Diagnostics.Cannot_find_module_0);
return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? undefined : Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations);
}
function resolveExternalModuleNameWorker(location: Node, moduleReferenceExpression: Expression, moduleNotFoundError: DiagnosticMessage | undefined, isForAugmentation = false): Symbol | undefined {
+1 -1
View File
@@ -1205,7 +1205,7 @@
"category": "Error",
"code": 2306
},
"Cannot find module '{0}'.": {
"Cannot find module '{0}' or its corresponding type declarations.": {
"category": "Error",
"code": 2307
},
@@ -3,7 +3,7 @@ namespace ts.codefix {
const fixName = "fixCannotFindModule";
const fixIdInstallTypesPackage = "installTypesPackage";
const errorCodeCannotFindModule = Diagnostics.Cannot_find_module_0.code;
const errorCodeCannotFindModule = Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations.code;
const errorCodes = [
errorCodeCannotFindModule,
Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type.code,
+1 -1
View File
@@ -267,7 +267,7 @@ namespace ts.tscWatch {
export function getDiagnosticModuleNotFoundOfFile(program: Program, file: File, moduleName: string) {
const quotedModuleName = `"${moduleName}"`;
return getDiagnosticOfFileFromProgram(program, file.path, file.content.indexOf(quotedModuleName), quotedModuleName.length, Diagnostics.Cannot_find_module_0, moduleName);
return getDiagnosticOfFileFromProgram(program, file.path, file.content.indexOf(quotedModuleName), quotedModuleName.length, Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, moduleName);
}
export type TscWatchCompileChange = (
@@ -240,8 +240,8 @@ namespace ts.projectSystem {
let diags = project.getLanguageService().getSemanticDiagnostics(root.path);
assert.equal(diags.length, 1);
const diag = diags[0];
assert.equal(diag.code, Diagnostics.Cannot_find_module_0.code);
assert.equal(flattenDiagnosticMessageText(diag.messageText, "\n"), "Cannot find module 'bar'.");
assert.equal(diag.code, Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations.code);
assert.equal(flattenDiagnosticMessageText(diag.messageText, "\n"), "Cannot find module 'bar' or its corresponding type declarations.");
callsTrackingHost.verifyCalledOn(CalledMapsWithSingleArg.fileExists, imported.path);
@@ -474,8 +474,8 @@ namespace ts.projectSystem {
const project = service.configuredProjects.get(tsconfig.path)!;
checkProjectActualFiles(project, files.map(f => f.path));
assert.deepEqual(project.getLanguageService().getSemanticDiagnostics(file1.path).map(diag => diag.messageText), ["Cannot find module 'debug'."]);
assert.deepEqual(project.getLanguageService().getSemanticDiagnostics(file2.path).map(diag => diag.messageText), ["Cannot find module 'debug'."]);
assert.deepEqual(project.getLanguageService().getSemanticDiagnostics(file1.path).map(diag => diag.messageText), ["Cannot find module 'debug' or its corresponding type declarations."]);
assert.deepEqual(project.getLanguageService().getSemanticDiagnostics(file2.path).map(diag => diag.messageText), ["Cannot find module 'debug' or its corresponding type declarations."]);
const debugTypesFile: File = {
path: `${projectLocation}/node_modules/debug/index.d.ts`,
@@ -682,7 +682,7 @@ namespace ts.projectSystem {
const project = service.configuredProjects.get(tsconfig.path)!;
checkProjectActualFiles(project, files.map(f => f.path));
assert.deepEqual(project.getLanguageService().getSemanticDiagnostics(app.path).map(diag => diag.messageText), ["Cannot find module 'debug'."]);
assert.deepEqual(project.getLanguageService().getSemanticDiagnostics(app.path).map(diag => diag.messageText), ["Cannot find module 'debug' or its corresponding type declarations."]);
const debugTypesFile: File = {
path: `${projectLocation}/node_modules/@types/debug/index.d.ts`,
@@ -959,7 +959,7 @@ console.log(blabla);`
createDiagnostic(
span.start,
span.end,
Diagnostics.Cannot_find_module_0,
Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations,
["@angular/core"]
)
];
@@ -111,7 +111,7 @@ namespace ts.projectSystem {
);
let diags = session.executeCommand(getErrRequest).response as server.protocol.Diagnostic[];
verifyDiagnostics(diags, [
{ diagnosticMessage: Diagnostics.Cannot_find_module_0, errorTextArguments: ["./moduleFile"] }
{ diagnosticMessage: Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, errorTextArguments: ["./moduleFile"] }
]);
host.reloadFS([file1, moduleFile]);
@@ -158,7 +158,7 @@ namespace ts.projectSystem {
file: file1,
syntax: [],
semantic: [
createDiagnostic({ line: 1, offset: startOffset }, { line: 1, offset: startOffset + '"pad"'.length }, Diagnostics.Cannot_find_module_0, ["pad"])
createDiagnostic({ line: 1, offset: startOffset }, { line: 1, offset: startOffset + '"pad"'.length }, Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, ["pad"])
],
suggestion: []
}]
@@ -342,7 +342,7 @@ namespace ts.projectSystem {
host.runQueuedTimeoutCallbacks();
diags = session.executeCommand(getErrRequest).response as server.protocol.Diagnostic[];
verifyDiagnostics(diags, [
{ diagnosticMessage: Diagnostics.Cannot_find_module_0, errorTextArguments: ["./moduleFile"] }
{ diagnosticMessage: Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, errorTextArguments: ["./moduleFile"] }
]);
assert.equal(diags.length, 1);
@@ -393,7 +393,7 @@ namespace ts.projectSystem {
host.runQueuedTimeoutCallbacks();
diags = session.executeCommand(getErrRequest).response as server.protocol.Diagnostic[];
verifyDiagnostics(diags, [
{ diagnosticMessage: Diagnostics.Cannot_find_module_0, errorTextArguments: ["./moduleFile"] }
{ diagnosticMessage: Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, errorTextArguments: ["./moduleFile"] }
]);
moduleFile.path = moduleFileOldPath;
@@ -212,7 +212,7 @@ new C();`
verifyWatchedFilesAndDirectories(session.testhost, filesInProjectWithUnresolvedModule, watchedDirectoriesWithUnresolvedModule, nonRecursiveWatchedDirectories);
const startOffset = recognizersDateTimeSrcFile.content.indexOf('"') + 1;
verifyErrors(session, [
createDiagnostic({ line: 1, offset: startOffset }, { line: 1, offset: startOffset + moduleNameInFile.length }, Diagnostics.Cannot_find_module_0, [moduleName])
createDiagnostic({ line: 1, offset: startOffset }, { line: 1, offset: startOffset + moduleNameInFile.length }, Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, [moduleName])
]);
}
@@ -1,10 +1,10 @@
tests/cases/compiler/aliasesInSystemModule1.ts(1,24): error TS2307: Cannot find module 'foo'.
tests/cases/compiler/aliasesInSystemModule1.ts(1,24): error TS2307: Cannot find module 'foo' or its corresponding type declarations.
==== tests/cases/compiler/aliasesInSystemModule1.ts (1 errors) ====
import alias = require('foo');
~~~~~
!!! error TS2307: Cannot find module 'foo'.
!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations.
import cls = alias.Class;
export import cls2 = alias.Class;
@@ -1,10 +1,10 @@
tests/cases/compiler/aliasesInSystemModule2.ts(1,21): error TS2307: Cannot find module 'foo'.
tests/cases/compiler/aliasesInSystemModule2.ts(1,21): error TS2307: Cannot find module 'foo' or its corresponding type declarations.
==== tests/cases/compiler/aliasesInSystemModule2.ts (1 errors) ====
import {alias} from "foo";
~~~~~
!!! error TS2307: Cannot find module 'foo'.
!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations.
import cls = alias.Class;
export import cls2 = alias.Class;
@@ -1,5 +1,5 @@
tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(4,16): error TS2664: Invalid module name in augmentation, module 'ext' cannot be found.
tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(9,22): error TS2307: Cannot find module 'ext'.
tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(9,22): error TS2307: Cannot find module 'ext' or its corresponding type declarations.
==== tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts (2 errors) ====
@@ -15,5 +15,5 @@ tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(9,22): erro
// Cannot resolve this ext module reference
import ext = require("ext");
~~~~~
!!! error TS2307: Cannot find module 'ext'.
!!! error TS2307: Cannot find module 'ext' or its corresponding type declarations.
var x = ext;
@@ -1,5 +1,5 @@
tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,5): error TS2439: Import or export declaration in an ambient module declaration cannot reference module through relative module name.
tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,25): error TS2307: Cannot find module './SubModule'.
tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts(2,25): error TS2307: Cannot find module './SubModule' or its corresponding type declarations.
==== tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts (2 errors) ====
@@ -8,7 +8,7 @@ tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2439: Import or export declaration in an ambient module declaration cannot reference module through relative module name.
~~~~~~~~~~~~~
!!! error TS2307: Cannot find module './SubModule'.
!!! error TS2307: Cannot find module './SubModule' or its corresponding type declarations.
class SubModule {
public static StaticVar: number;
public InstanceVar: number;
@@ -1,4 +1,4 @@
tests/cases/compiler/amdDependencyComment1.ts(3,21): error TS2307: Cannot find module 'm2'.
tests/cases/compiler/amdDependencyComment1.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations.
==== tests/cases/compiler/amdDependencyComment1.ts (1 errors) ====
@@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyComment1.ts(3,21): error TS2307: Cannot find m
import m1 = require("m2")
~~~~
!!! error TS2307: Cannot find module 'm2'.
!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations.
m1.f();
@@ -1,4 +1,4 @@
tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2307: Cannot find module 'm2'.
tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations.
==== tests/cases/compiler/amdDependencyComment2.ts (1 errors) ====
@@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2307: Cannot find m
import m1 = require("m2")
~~~~
!!! error TS2307: Cannot find module 'm2'.
!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations.
m1.f();
@@ -1,4 +1,4 @@
tests/cases/compiler/amdDependencyCommentName1.ts(3,21): error TS2307: Cannot find module 'm2'.
tests/cases/compiler/amdDependencyCommentName1.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations.
==== tests/cases/compiler/amdDependencyCommentName1.ts (1 errors) ====
@@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyCommentName1.ts(3,21): error TS2307: Cannot fi
import m1 = require("m2")
~~~~
!!! error TS2307: Cannot find module 'm2'.
!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations.
m1.f();
@@ -1,4 +1,4 @@
tests/cases/compiler/amdDependencyCommentName2.ts(3,21): error TS2307: Cannot find module 'm2'.
tests/cases/compiler/amdDependencyCommentName2.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations.
==== tests/cases/compiler/amdDependencyCommentName2.ts (1 errors) ====
@@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyCommentName2.ts(3,21): error TS2307: Cannot fi
import m1 = require("m2")
~~~~
!!! error TS2307: Cannot find module 'm2'.
!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations.
m1.f();
@@ -1,4 +1,4 @@
tests/cases/compiler/amdDependencyCommentName3.ts(5,21): error TS2307: Cannot find module 'm2'.
tests/cases/compiler/amdDependencyCommentName3.ts(5,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations.
==== tests/cases/compiler/amdDependencyCommentName3.ts (1 errors) ====
@@ -8,5 +8,5 @@ tests/cases/compiler/amdDependencyCommentName3.ts(5,21): error TS2307: Cannot fi
import m1 = require("m2")
~~~~
!!! error TS2307: Cannot find module 'm2'.
!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations.
m1.f();
@@ -1,7 +1,7 @@
tests/cases/compiler/amdDependencyCommentName4.ts(8,21): error TS2307: Cannot find module 'aliasedModule1'.
tests/cases/compiler/amdDependencyCommentName4.ts(11,26): error TS2307: Cannot find module 'aliasedModule2'.
tests/cases/compiler/amdDependencyCommentName4.ts(14,15): error TS2307: Cannot find module 'aliasedModule3'.
tests/cases/compiler/amdDependencyCommentName4.ts(17,21): error TS2307: Cannot find module 'aliasedModule4'.
tests/cases/compiler/amdDependencyCommentName4.ts(8,21): error TS2307: Cannot find module 'aliasedModule1' or its corresponding type declarations.
tests/cases/compiler/amdDependencyCommentName4.ts(11,26): error TS2307: Cannot find module 'aliasedModule2' or its corresponding type declarations.
tests/cases/compiler/amdDependencyCommentName4.ts(14,15): error TS2307: Cannot find module 'aliasedModule3' or its corresponding type declarations.
tests/cases/compiler/amdDependencyCommentName4.ts(17,21): error TS2307: Cannot find module 'aliasedModule4' or its corresponding type declarations.
==== tests/cases/compiler/amdDependencyCommentName4.ts (4 errors) ====
@@ -14,22 +14,22 @@ tests/cases/compiler/amdDependencyCommentName4.ts(17,21): error TS2307: Cannot f
import r1 = require("aliasedModule1");
~~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'aliasedModule1'.
!!! error TS2307: Cannot find module 'aliasedModule1' or its corresponding type declarations.
r1;
import {p1, p2, p3} from "aliasedModule2";
~~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'aliasedModule2'.
!!! error TS2307: Cannot find module 'aliasedModule2' or its corresponding type declarations.
p1;
import d from "aliasedModule3";
~~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'aliasedModule3'.
!!! error TS2307: Cannot find module 'aliasedModule3' or its corresponding type declarations.
d;
import * as ns from "aliasedModule4";
~~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'aliasedModule4'.
!!! error TS2307: Cannot find module 'aliasedModule4' or its corresponding type declarations.
ns;
import "unaliasedModule2";
@@ -1,10 +1,10 @@
tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts(1,27): error TS2307: Cannot find module 'missing'.
tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts(1,27): error TS2307: Cannot find module 'missing' or its corresponding type declarations.
==== tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts (1 errors) ====
import { MyPromise } from "missing";
~~~~~~~~~
!!! error TS2307: Cannot find module 'missing'.
!!! error TS2307: Cannot find module 'missing' or its corresponding type declarations.
declare var p: Promise<number>;
declare var mp: MyPromise<number>;
@@ -1,10 +1,10 @@
tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts(1,27): error TS2307: Cannot find module 'missing'.
tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts(1,27): error TS2307: Cannot find module 'missing' or its corresponding type declarations.
==== tests/cases/conformance/async/es5/asyncAwaitIsolatedModules_es5.ts (1 errors) ====
import { MyPromise } from "missing";
~~~~~~~~~
!!! error TS2307: Cannot find module 'missing'.
!!! error TS2307: Cannot find module 'missing' or its corresponding type declarations.
declare var p: Promise<number>;
declare var mp: MyPromise<number>;
@@ -1,10 +1,10 @@
tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts(1,27): error TS2307: Cannot find module 'missing'.
tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts(1,27): error TS2307: Cannot find module 'missing' or its corresponding type declarations.
==== tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts (1 errors) ====
import { MyPromise } from "missing";
~~~~~~~~~
!!! error TS2307: Cannot find module 'missing'.
!!! error TS2307: Cannot find module 'missing' or its corresponding type declarations.
declare var p: Promise<number>;
declare var mp: MyPromise<number>;
@@ -1,10 +1,10 @@
tests/cases/compiler/badExternalModuleReference.ts(1,21): error TS2307: Cannot find module 'garbage'.
tests/cases/compiler/badExternalModuleReference.ts(1,21): error TS2307: Cannot find module 'garbage' or its corresponding type declarations.
==== tests/cases/compiler/badExternalModuleReference.ts (1 errors) ====
import a1 = require("garbage");
~~~~~~~~~
!!! error TS2307: Cannot find module 'garbage'.
!!! error TS2307: Cannot find module 'garbage' or its corresponding type declarations.
export declare var a: {
test1: a1.connectModule;
(): a1.connectExport;
@@ -1,13 +1,13 @@
/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo'.
/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo'.
/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations.
/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations.
==== /a/b/c/d/e/app.ts (1 errors) ====
import {x} from "foo";
~~~~~
!!! error TS2307: Cannot find module 'foo'.
!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations.
==== /a/b/c/lib.ts (1 errors) ====
import {x} from "foo";
~~~~~
!!! error TS2307: Cannot find module 'foo'.
!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations.
@@ -1,14 +1,14 @@
/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo'.
/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo'.
/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations.
/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations.
==== /a/b/c/lib.ts (1 errors) ====
import {x} from "foo";
~~~~~
!!! error TS2307: Cannot find module 'foo'.
!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations.
==== /a/b/c/d/e/app.ts (1 errors) ====
import {x} from "foo";
~~~~~
!!! error TS2307: Cannot find module 'foo'.
!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations.
@@ -1,13 +1,13 @@
/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo'.
/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo'.
/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations.
/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations.
==== /a/b/c/d/e/app.ts (1 errors) ====
import {x} from "foo";
~~~~~
!!! error TS2307: Cannot find module 'foo'.
!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations.
==== /a/b/c/lib.ts (1 errors) ====
import {x} from "foo";
~~~~~
!!! error TS2307: Cannot find module 'foo'.
!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations.
@@ -1,15 +1,15 @@
/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo'.
/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo'.
/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations.
/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations.
==== /a/b/c/lib.ts (1 errors) ====
import {x} from "foo";
~~~~~
!!! error TS2307: Cannot find module 'foo'.
!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations.
==== /a/b/c/d/e/app.ts (1 errors) ====
import {x} from "foo";
~~~~~
!!! error TS2307: Cannot find module 'foo'.
!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations.
@@ -1,4 +1,4 @@
tests/cases/compiler/commentOnImportStatement1.ts(3,22): error TS2307: Cannot find module './foo'.
tests/cases/compiler/commentOnImportStatement1.ts(3,22): error TS2307: Cannot find module './foo' or its corresponding type declarations.
==== tests/cases/compiler/commentOnImportStatement1.ts (1 errors) ====
@@ -6,5 +6,5 @@ tests/cases/compiler/commentOnImportStatement1.ts(3,22): error TS2307: Cannot fi
import foo = require('./foo');
~~~~~~~
!!! error TS2307: Cannot find module './foo'.
!!! error TS2307: Cannot find module './foo' or its corresponding type declarations.
@@ -1,8 +1,8 @@
tests/cases/compiler/commentOnImportStatement2.ts(2,22): error TS2307: Cannot find module './foo'.
tests/cases/compiler/commentOnImportStatement2.ts(2,22): error TS2307: Cannot find module './foo' or its corresponding type declarations.
==== tests/cases/compiler/commentOnImportStatement2.ts (1 errors) ====
/* not copyright */
import foo = require('./foo');
~~~~~~~
!!! error TS2307: Cannot find module './foo'.
!!! error TS2307: Cannot find module './foo' or its corresponding type declarations.
@@ -1,4 +1,4 @@
tests/cases/compiler/commentOnImportStatement3.ts(4,22): error TS2307: Cannot find module './foo'.
tests/cases/compiler/commentOnImportStatement3.ts(4,22): error TS2307: Cannot find module './foo' or its corresponding type declarations.
==== tests/cases/compiler/commentOnImportStatement3.ts (1 errors) ====
@@ -7,4 +7,4 @@ tests/cases/compiler/commentOnImportStatement3.ts(4,22): error TS2307: Cannot fi
/* not copyright */
import foo = require('./foo');
~~~~~~~
!!! error TS2307: Cannot find module './foo'.
!!! error TS2307: Cannot find module './foo' or its corresponding type declarations.
@@ -1,4 +1,4 @@
tests/cases/compiler/copyrightWithNewLine1.ts(5,24): error TS2307: Cannot find module './greeter'.
tests/cases/compiler/copyrightWithNewLine1.ts(5,24): error TS2307: Cannot find module './greeter' or its corresponding type declarations.
==== tests/cases/compiler/copyrightWithNewLine1.ts (1 errors) ====
@@ -8,7 +8,7 @@ tests/cases/compiler/copyrightWithNewLine1.ts(5,24): error TS2307: Cannot find m
import model = require("./greeter")
~~~~~~~~~~~
!!! error TS2307: Cannot find module './greeter'.
!!! error TS2307: Cannot find module './greeter' or its corresponding type declarations.
var el = document.getElementById('content');
var greeter = new model.Greeter(el);
/** things */
@@ -1,4 +1,4 @@
tests/cases/compiler/copyrightWithoutNewLine1.ts(4,24): error TS2307: Cannot find module './greeter'.
tests/cases/compiler/copyrightWithoutNewLine1.ts(4,24): error TS2307: Cannot find module './greeter' or its corresponding type declarations.
==== tests/cases/compiler/copyrightWithoutNewLine1.ts (1 errors) ====
@@ -7,7 +7,7 @@ tests/cases/compiler/copyrightWithoutNewLine1.ts(4,24): error TS2307: Cannot fin
****************************/
import model = require("./greeter")
~~~~~~~~~~~
!!! error TS2307: Cannot find module './greeter'.
!!! error TS2307: Cannot find module './greeter' or its corresponding type declarations.
var el = document.getElementById('content');
var greeter = new model.Greeter(el);
/** things */
@@ -1,29 +1,29 @@
tests/cases/compiler/deduplicateImportsInSystem.ts(1,17): error TS2307: Cannot find module 'f1'.
tests/cases/compiler/deduplicateImportsInSystem.ts(2,17): error TS2307: Cannot find module 'f2'.
tests/cases/compiler/deduplicateImportsInSystem.ts(3,17): error TS2307: Cannot find module 'f3'.
tests/cases/compiler/deduplicateImportsInSystem.ts(4,17): error TS2307: Cannot find module 'f2'.
tests/cases/compiler/deduplicateImportsInSystem.ts(5,17): error TS2307: Cannot find module 'f2'.
tests/cases/compiler/deduplicateImportsInSystem.ts(6,17): error TS2307: Cannot find module 'f1'.
tests/cases/compiler/deduplicateImportsInSystem.ts(1,17): error TS2307: Cannot find module 'f1' or its corresponding type declarations.
tests/cases/compiler/deduplicateImportsInSystem.ts(2,17): error TS2307: Cannot find module 'f2' or its corresponding type declarations.
tests/cases/compiler/deduplicateImportsInSystem.ts(3,17): error TS2307: Cannot find module 'f3' or its corresponding type declarations.
tests/cases/compiler/deduplicateImportsInSystem.ts(4,17): error TS2307: Cannot find module 'f2' or its corresponding type declarations.
tests/cases/compiler/deduplicateImportsInSystem.ts(5,17): error TS2307: Cannot find module 'f2' or its corresponding type declarations.
tests/cases/compiler/deduplicateImportsInSystem.ts(6,17): error TS2307: Cannot find module 'f1' or its corresponding type declarations.
==== tests/cases/compiler/deduplicateImportsInSystem.ts (6 errors) ====
import {A} from "f1";
~~~~
!!! error TS2307: Cannot find module 'f1'.
!!! error TS2307: Cannot find module 'f1' or its corresponding type declarations.
import {B} from "f2";
~~~~
!!! error TS2307: Cannot find module 'f2'.
!!! error TS2307: Cannot find module 'f2' or its corresponding type declarations.
import {C} from "f3";
~~~~
!!! error TS2307: Cannot find module 'f3'.
!!! error TS2307: Cannot find module 'f3' or its corresponding type declarations.
import {D} from 'f2';
~~~~
!!! error TS2307: Cannot find module 'f2'.
!!! error TS2307: Cannot find module 'f2' or its corresponding type declarations.
import {E} from "f2";
~~~~
!!! error TS2307: Cannot find module 'f2'.
!!! error TS2307: Cannot find module 'f2' or its corresponding type declarations.
import {F} from 'f1';
~~~~
!!! error TS2307: Cannot find module 'f1'.
!!! error TS2307: Cannot find module 'f1' or its corresponding type declarations.
console.log(A + B + C + D + E + F)
@@ -1,6 +1,6 @@
tests/cases/conformance/es6/modules/m1.ts(1,25): error TS2652: Merged declaration 'Decl' cannot include a default export declaration. Consider adding a separate 'export default Decl' declaration instead.
tests/cases/conformance/es6/modules/m1.ts(10,18): error TS2652: Merged declaration 'Decl' cannot include a default export declaration. Consider adding a separate 'export default Decl' declaration instead.
tests/cases/conformance/es6/modules/m2.ts(1,20): error TS2307: Cannot find module 'm1'.
tests/cases/conformance/es6/modules/m2.ts(1,20): error TS2307: Cannot find module 'm1' or its corresponding type declarations.
==== tests/cases/conformance/es6/modules/m1.ts (2 errors) ====
@@ -28,7 +28,7 @@ tests/cases/conformance/es6/modules/m2.ts(1,20): error TS2307: Cannot find modul
==== tests/cases/conformance/es6/modules/m2.ts (1 errors) ====
import Entity from "m1"
~~~~
!!! error TS2307: Cannot find module 'm1'.
!!! error TS2307: Cannot find module 'm1' or its corresponding type declarations.
Entity();
@@ -1,6 +1,6 @@
tests/cases/conformance/es6/modules/m1.ts(1,22): error TS2652: Merged declaration 'Decl' cannot include a default export declaration. Consider adding a separate 'export default Decl' declaration instead.
tests/cases/conformance/es6/modules/m1.ts(4,18): error TS2652: Merged declaration 'Decl' cannot include a default export declaration. Consider adding a separate 'export default Decl' declaration instead.
tests/cases/conformance/es6/modules/m2.ts(1,20): error TS2307: Cannot find module 'm1'.
tests/cases/conformance/es6/modules/m2.ts(1,20): error TS2307: Cannot find module 'm1' or its corresponding type declarations.
==== tests/cases/conformance/es6/modules/m1.ts (2 errors) ====
@@ -24,7 +24,7 @@ tests/cases/conformance/es6/modules/m2.ts(1,20): error TS2307: Cannot find modul
==== tests/cases/conformance/es6/modules/m2.ts (1 errors) ====
import Entity from "m1"
~~~~
!!! error TS2307: Cannot find module 'm1'.
!!! error TS2307: Cannot find module 'm1' or its corresponding type declarations.
Entity();
@@ -1,6 +1,6 @@
tests/cases/conformance/es6/modules/m1.ts(1,22): error TS2652: Merged declaration 'Decl' cannot include a default export declaration. Consider adding a separate 'export default Decl' declaration instead.
tests/cases/conformance/es6/modules/m1.ts(4,11): error TS2652: Merged declaration 'Decl' cannot include a default export declaration. Consider adding a separate 'export default Decl' declaration instead.
tests/cases/conformance/es6/modules/m2.ts(1,20): error TS2307: Cannot find module 'm1'.
tests/cases/conformance/es6/modules/m2.ts(1,20): error TS2307: Cannot find module 'm1' or its corresponding type declarations.
==== tests/cases/conformance/es6/modules/m1.ts (2 errors) ====
@@ -24,7 +24,7 @@ tests/cases/conformance/es6/modules/m2.ts(1,20): error TS2307: Cannot find modul
==== tests/cases/conformance/es6/modules/m2.ts (1 errors) ====
import Entity from "m1"
~~~~
!!! error TS2307: Cannot find module 'm1'.
!!! error TS2307: Cannot find module 'm1' or its corresponding type declarations.
Entity();
@@ -1,4 +1,4 @@
tests/cases/compiler/dynamicImportInDefaultExportExpression.ts(3,23): error TS2307: Cannot find module './foo2'.
tests/cases/compiler/dynamicImportInDefaultExportExpression.ts(3,23): error TS2307: Cannot find module './foo2' or its corresponding type declarations.
==== tests/cases/compiler/dynamicImportInDefaultExportExpression.ts (1 errors) ====
@@ -6,6 +6,6 @@ tests/cases/compiler/dynamicImportInDefaultExportExpression.ts(3,23): error TS23
getInstance: function () {
return import('./foo2');
~~~~~~~~
!!! error TS2307: Cannot find module './foo2'.
!!! error TS2307: Cannot find module './foo2' or its corresponding type declarations.
}
}
@@ -1,9 +1,9 @@
tests/cases/compiler/emptyModuleName.ts(1,20): error TS2307: Cannot find module ''.
tests/cases/compiler/emptyModuleName.ts(1,20): error TS2307: Cannot find module '' or its corresponding type declarations.
==== tests/cases/compiler/emptyModuleName.ts (1 errors) ====
import * as A from "";
~~
!!! error TS2307: Cannot find module ''.
!!! error TS2307: Cannot find module '' or its corresponding type declarations.
class B extends A {
}
@@ -9,7 +9,7 @@ tests/cases/compiler/es5ModuleInternalNamedImports.ts(29,5): error TS1194: Expor
tests/cases/compiler/es5ModuleInternalNamedImports.ts(30,25): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/es5ModuleInternalNamedImports.ts(31,20): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/es5ModuleInternalNamedImports.ts(32,32): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/es5ModuleInternalNamedImports.ts(34,16): error TS2307: Cannot find module 'M3'.
tests/cases/compiler/es5ModuleInternalNamedImports.ts(34,16): error TS2307: Cannot find module 'M3' or its corresponding type declarations.
==== tests/cases/compiler/es5ModuleInternalNamedImports.ts (12 errors) ====
@@ -70,5 +70,5 @@ tests/cases/compiler/es5ModuleInternalNamedImports.ts(34,16): error TS2307: Cann
}
import M3 from "M3";
~~~~
!!! error TS2307: Cannot find module 'M3'.
!!! error TS2307: Cannot find module 'M3' or its corresponding type declarations.
@@ -1,16 +1,16 @@
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(1,10): error TS2300: Duplicate identifier 'yield'.
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(1,23): error TS2307: Cannot find module 'somemodule'.
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(1,23): error TS2307: Cannot find module 'somemodule' or its corresponding type declarations.
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(2,10): error TS1003: Identifier expected.
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(2,10): error TS2300: Duplicate identifier 'default'.
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(2,25): error TS2307: Cannot find module 'somemodule'.
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(2,25): error TS2307: Cannot find module 'somemodule' or its corresponding type declarations.
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,19): error TS1003: Identifier expected.
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,19): error TS2300: Duplicate identifier 'default'.
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,34): error TS2307: Cannot find module 'somemodule'.
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(3,34): error TS2307: Cannot find module 'somemodule' or its corresponding type declarations.
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(4,21): error TS2300: Duplicate identifier 'yield'.
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(4,34): error TS2307: Cannot find module 'somemodule'.
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(4,34): error TS2307: Cannot find module 'somemodule' or its corresponding type declarations.
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,21): error TS1003: Identifier expected.
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,21): error TS2300: Duplicate identifier 'default'.
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,36): error TS2307: Cannot find module 'somemodule'.
tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,36): error TS2307: Cannot find module 'somemodule' or its corresponding type declarations.
==== tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts (13 errors) ====
@@ -18,30 +18,30 @@ tests/cases/compiler/es6ImportNamedImportIdentifiersParsing.ts(5,36): error TS23
~~~~~
!!! error TS2300: Duplicate identifier 'yield'.
~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'somemodule'.
!!! error TS2307: Cannot find module 'somemodule' or its corresponding type declarations.
import { default } from "somemodule"; // Error - as this is keyword that is not allowed as identifier
~~~~~~~
!!! error TS1003: Identifier expected.
~~~~~~~
!!! error TS2300: Duplicate identifier 'default'.
~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'somemodule'.
!!! error TS2307: Cannot find module 'somemodule' or its corresponding type declarations.
import { yield as default } from "somemodule"; // error to use default as binding name
~~~~~~~
!!! error TS1003: Identifier expected.
~~~~~~~
!!! error TS2300: Duplicate identifier 'default'.
~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'somemodule'.
!!! error TS2307: Cannot find module 'somemodule' or its corresponding type declarations.
import { default as yield } from "somemodule"; // no error
~~~~~
!!! error TS2300: Duplicate identifier 'yield'.
~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'somemodule'.
!!! error TS2307: Cannot find module 'somemodule' or its corresponding type declarations.
import { default as default } from "somemodule"; // default as is ok, error of default binding name
~~~~~~~
!!! error TS1003: Identifier expected.
~~~~~~~
!!! error TS2300: Duplicate identifier 'default'.
~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'somemodule'.
!!! error TS2307: Cannot find module 'somemodule' or its corresponding type declarations.
@@ -1,5 +1,5 @@
tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target10.ts(1,1): error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.
tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target10.ts(1,20): error TS2307: Cannot find module 'mod'.
tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target10.ts(1,20): error TS2307: Cannot find module 'mod' or its corresponding type declarations.
tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target10.ts(6,1): error TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead.
@@ -8,7 +8,7 @@ tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target10.ts(6,1)
~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.
~~~~~
!!! error TS2307: Cannot find module 'mod'.
!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations.
namespace N {
@@ -1,22 +1,22 @@
tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(1,15): error TS2307: Cannot find module 'mod'.
tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(3,17): error TS2307: Cannot find module 'mod'.
tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(5,20): error TS2307: Cannot find module 'mod'.
tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(13,15): error TS2307: Cannot find module 'mod'.
tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(15,17): error TS2307: Cannot find module 'mod'.
tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(1,15): error TS2307: Cannot find module 'mod' or its corresponding type declarations.
tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(3,17): error TS2307: Cannot find module 'mod' or its corresponding type declarations.
tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(5,20): error TS2307: Cannot find module 'mod' or its corresponding type declarations.
tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(13,15): error TS2307: Cannot find module 'mod' or its corresponding type declarations.
tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(15,17): error TS2307: Cannot find module 'mod' or its corresponding type declarations.
==== tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts (5 errors) ====
import d from "mod";
~~~~~
!!! error TS2307: Cannot find module 'mod'.
!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations.
import {a} from "mod";
~~~~~
!!! error TS2307: Cannot find module 'mod'.
!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations.
import * as M from "mod";
~~~~~
!!! error TS2307: Cannot find module 'mod'.
!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations.
export {a};
@@ -26,11 +26,11 @@ tests/cases/conformance/externalModules/es6/es6modulekindWithES5Target9.ts(15,17
export * from "mod";
~~~~~
!!! error TS2307: Cannot find module 'mod'.
!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations.
export {b} from "mod"
~~~~~
!!! error TS2307: Cannot find module 'mod'.
!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations.
export default d;
@@ -1,9 +1,9 @@
tests/cases/compiler/esModuleInteropImportDefaultWhenAllNamedAreDefaultAlias.ts(1,42): error TS2307: Cannot find module 'm'.
tests/cases/compiler/esModuleInteropImportDefaultWhenAllNamedAreDefaultAlias.ts(1,42): error TS2307: Cannot find module 'm' or its corresponding type declarations.
==== tests/cases/compiler/esModuleInteropImportDefaultWhenAllNamedAreDefaultAlias.ts (1 errors) ====
import {default as a, default as b} from "m";
~~~
!!! error TS2307: Cannot find module 'm'.
!!! error TS2307: Cannot find module 'm' or its corresponding type declarations.
void a;
void b;
@@ -1,9 +1,9 @@
tests/cases/compiler/esModuleInteropUsesExportStarWhenDefaultPlusNames.ts(1,28): error TS2307: Cannot find module './dep'.
tests/cases/compiler/esModuleInteropUsesExportStarWhenDefaultPlusNames.ts(1,28): error TS2307: Cannot find module './dep' or its corresponding type declarations.
==== tests/cases/compiler/esModuleInteropUsesExportStarWhenDefaultPlusNames.ts (1 errors) ====
import Deps, { var2 } from './dep';
~~~~~~~
!!! error TS2307: Cannot find module './dep'.
!!! error TS2307: Cannot find module './dep' or its corresponding type declarations.
void Deps;
void var2;
@@ -1,5 +1,5 @@
tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target10.ts(1,1): error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.
tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target10.ts(1,20): error TS2307: Cannot find module 'mod'.
tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target10.ts(1,20): error TS2307: Cannot find module 'mod' or its corresponding type declarations.
tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target10.ts(6,1): error TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead.
@@ -8,7 +8,7 @@ tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target10.t
~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.
~~~~~
!!! error TS2307: Cannot find module 'mod'.
!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations.
namespace N {
@@ -1,22 +1,22 @@
tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(1,15): error TS2307: Cannot find module 'mod'.
tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(3,17): error TS2307: Cannot find module 'mod'.
tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(5,20): error TS2307: Cannot find module 'mod'.
tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(13,15): error TS2307: Cannot find module 'mod'.
tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(15,17): error TS2307: Cannot find module 'mod'.
tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(1,15): error TS2307: Cannot find module 'mod' or its corresponding type declarations.
tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(3,17): error TS2307: Cannot find module 'mod' or its corresponding type declarations.
tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(5,20): error TS2307: Cannot find module 'mod' or its corresponding type declarations.
tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(13,15): error TS2307: Cannot find module 'mod' or its corresponding type declarations.
tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts(15,17): error TS2307: Cannot find module 'mod' or its corresponding type declarations.
==== tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts (5 errors) ====
import d from "mod";
~~~~~
!!! error TS2307: Cannot find module 'mod'.
!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations.
import {a} from "mod";
~~~~~
!!! error TS2307: Cannot find module 'mod'.
!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations.
import * as M from "mod";
~~~~~
!!! error TS2307: Cannot find module 'mod'.
!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations.
export {a};
@@ -26,11 +26,11 @@ tests/cases/conformance/externalModules/esnext/esnextmodulekindWithES5Target9.ts
export * from "mod";
~~~~~
!!! error TS2307: Cannot find module 'mod'.
!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations.
export {b} from "mod"
~~~~~
!!! error TS2307: Cannot find module 'mod'.
!!! error TS2307: Cannot find module 'mod' or its corresponding type declarations.
export default d;
@@ -2,7 +2,7 @@ tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(5,8):
tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(7,17): error TS1325: Specifier of dynamic import cannot be spread element.
tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(8,12): error TS1324: Dynamic import must have one specifier as an argument.
tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,12): error TS1324: Dynamic import must have one specifier as an argument.
tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,19): error TS2307: Cannot find module 'pathToModule'.
tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,19): error TS2307: Cannot find module 'pathToModule' or its corresponding type declarations.
==== tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts (5 errors) ====
@@ -24,4 +24,4 @@ tests/cases/conformance/dynamicImport/importCallExpressionGrammarError.ts(9,19):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1324: Dynamic import must have one specifier as an argument.
~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'pathToModule'.
!!! error TS2307: Cannot find module 'pathToModule' or its corresponding type declarations.
@@ -1,17 +1,17 @@
tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(1,20): error TS2307: Cannot find module 'externalModule'.
tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts(1,20): error TS2307: Cannot find module 'externalModule' or its corresponding type declarations.
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(3,26): error TS2307: Cannot find module 'externalModule' or its corresponding type declarations.
==== tests/cases/compiler/importDeclRefereingExternalModuleWithNoResolve.ts (3 errors) ====
import b = require("externalModule");
~~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'externalModule'.
!!! error TS2307: Cannot find module 'externalModule' or its corresponding type declarations.
declare module "m1" {
~~~~
!!! error TS2664: Invalid module name in augmentation, module 'm1' cannot be found.
import im2 = require("externalModule");
~~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'externalModule'.
!!! error TS2307: Cannot find module 'externalModule' or its corresponding type declarations.
}
@@ -1,8 +1,8 @@
tests/cases/conformance/es6/modules/importEmptyFromModuleNotExisted.ts(1,16): error TS2307: Cannot find module 'module-not-existed'.
tests/cases/conformance/es6/modules/importEmptyFromModuleNotExisted.ts(1,16): error TS2307: Cannot find module 'module-not-existed' or its corresponding type declarations.
==== tests/cases/conformance/es6/modules/importEmptyFromModuleNotExisted.ts (1 errors) ====
import {} from 'module-not-existed'
~~~~~~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'module-not-existed'.
!!! error TS2307: Cannot find module 'module-not-existed' or its corresponding type declarations.
@@ -1,5 +1,5 @@
tests/cases/compiler/importInsideModule_file2.ts(2,26): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/importInsideModule_file2.ts(2,26): error TS2307: Cannot find module 'importInsideModule_file1'.
tests/cases/compiler/importInsideModule_file2.ts(2,26): error TS2307: Cannot find module 'importInsideModule_file1' or its corresponding type declarations.
==== tests/cases/compiler/importInsideModule_file2.ts (2 errors) ====
@@ -8,7 +8,7 @@ tests/cases/compiler/importInsideModule_file2.ts(2,26): error TS2307: Cannot fin
~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'importInsideModule_file1'.
!!! error TS2307: Cannot find module 'importInsideModule_file1' or its corresponding type declarations.
var a = foo.x;
}
==== tests/cases/compiler/importInsideModule_file1.ts (0 errors) ====
@@ -1,16 +1,16 @@
tests/cases/compiler/importNotElidedWhenNotFound.ts(1,15): error TS2307: Cannot find module 'file'.
tests/cases/compiler/importNotElidedWhenNotFound.ts(2,15): error TS2307: Cannot find module 'other_file'.
tests/cases/compiler/importNotElidedWhenNotFound.ts(10,16): error TS2307: Cannot find module 'file2'.
tests/cases/compiler/importNotElidedWhenNotFound.ts(11,16): error TS2307: Cannot find module 'file3'.
tests/cases/compiler/importNotElidedWhenNotFound.ts(1,15): error TS2307: Cannot find module 'file' or its corresponding type declarations.
tests/cases/compiler/importNotElidedWhenNotFound.ts(2,15): error TS2307: Cannot find module 'other_file' or its corresponding type declarations.
tests/cases/compiler/importNotElidedWhenNotFound.ts(10,16): error TS2307: Cannot find module 'file2' or its corresponding type declarations.
tests/cases/compiler/importNotElidedWhenNotFound.ts(11,16): error TS2307: Cannot find module 'file3' or its corresponding type declarations.
==== tests/cases/compiler/importNotElidedWhenNotFound.ts (4 errors) ====
import X from 'file';
~~~~~~
!!! error TS2307: Cannot find module 'file'.
!!! error TS2307: Cannot find module 'file' or its corresponding type declarations.
import Z from 'other_file';
~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'other_file'.
!!! error TS2307: Cannot find module 'other_file' or its corresponding type declarations.
class Y extends Z {
constructor() {
@@ -20,10 +20,10 @@ tests/cases/compiler/importNotElidedWhenNotFound.ts(11,16): error TS2307: Cannot
import X2 from 'file2';
~~~~~~~
!!! error TS2307: Cannot find module 'file2'.
!!! error TS2307: Cannot find module 'file2' or its corresponding type declarations.
import X3 from 'file3';
~~~~~~~
!!! error TS2307: Cannot find module 'file3'.
!!! error TS2307: Cannot find module 'file3' or its corresponding type declarations.
class Q extends Z {
constructor() {
super(X2, X3);
@@ -1,4 +1,4 @@
tests/cases/conformance/types/import/importTypeAmbientMissing.ts(8,17): error TS2307: Cannot find module 'fo'.
tests/cases/conformance/types/import/importTypeAmbientMissing.ts(8,17): error TS2307: Cannot find module 'fo' or its corresponding type declarations.
==== tests/cases/conformance/types/import/importTypeAmbientMissing.ts (1 errors) ====
@@ -11,6 +11,6 @@ tests/cases/conformance/types/import/importTypeAmbientMissing.ts(8,17): error TS
}
const x: import("fo") = { x: 0, y: 0 }; // typo, error
~~~~
!!! error TS2307: Cannot find module 'fo'.
!!! error TS2307: Cannot find module 'fo' or its corresponding type declarations.
@@ -1,7 +1,7 @@
tests/cases/conformance/types/import/usage.ts(1,24): error TS2307: Cannot find module './fo'.
tests/cases/conformance/types/import/usage.ts(2,22): error TS2307: Cannot find module './fo2'.
tests/cases/conformance/types/import/usage.ts(1,24): error TS2307: Cannot find module './fo' or its corresponding type declarations.
tests/cases/conformance/types/import/usage.ts(2,22): error TS2307: Cannot find module './fo2' or its corresponding type declarations.
tests/cases/conformance/types/import/usage.ts(3,36): error TS2694: Namespace '"tests/cases/conformance/types/import/foo2".Bar' has no exported member 'Q'.
tests/cases/conformance/types/import/usage.ts(10,32): error TS2307: Cannot find module './fo2'.
tests/cases/conformance/types/import/usage.ts(10,32): error TS2307: Cannot find module './fo2' or its corresponding type declarations.
==== tests/cases/conformance/types/import/foo.ts (0 errors) ====
@@ -35,10 +35,10 @@ tests/cases/conformance/types/import/usage.ts(10,32): error TS2307: Cannot find
==== tests/cases/conformance/types/import/usage.ts (4 errors) ====
export const x: import("./fo") = { x: 0, y: 0 };
~~~~~~
!!! error TS2307: Cannot find module './fo'.
!!! error TS2307: Cannot find module './fo' or its corresponding type declarations.
export let y: import("./fo2").Bar.I = { a: "", b: 0 };
~~~~~~~
!!! error TS2307: Cannot find module './fo2'.
!!! error TS2307: Cannot find module './fo2' or its corresponding type declarations.
export let z: import("./foo2").Bar.Q = { a: "", b: 0 };
~
!!! error TS2694: Namespace '"tests/cases/conformance/types/import/foo2".Bar' has no exported member 'Q'.
@@ -50,7 +50,7 @@ tests/cases/conformance/types/import/usage.ts(10,32): error TS2307: Cannot find
export let shim: typeof import("./fo2") = {
~~~~~~~
!!! error TS2307: Cannot find module './fo2'.
!!! error TS2307: Cannot find module './fo2' or its corresponding type declarations.
Bar: Bar2
};
@@ -1,7 +1,7 @@
tests/cases/compiler/importTypeWithUnparenthesizedGenericFunctionParsed.ts(1,36): error TS2307: Cannot find module 'module'.
tests/cases/compiler/importTypeWithUnparenthesizedGenericFunctionParsed.ts(1,36): error TS2307: Cannot find module 'module' or its corresponding type declarations.
==== tests/cases/compiler/importTypeWithUnparenthesizedGenericFunctionParsed.ts (1 errors) ====
export declare const fail1: import("module").Modifier<<T>(x: T) => T>; // shouldn't be a parse error
~~~~~~~~
!!! error TS2307: Cannot find module 'module'.
!!! error TS2307: Cannot find module 'module' or its corresponding type declarations.
@@ -1,8 +1,8 @@
/a.ts(1,17): error TS2307: Cannot find module './foo/'.
/a.ts(1,17): error TS2307: Cannot find module './foo/' or its corresponding type declarations.
==== /a.ts (1 errors) ====
import foo from "./foo/";
~~~~~~~~
!!! error TS2307: Cannot find module './foo/'.
!!! error TS2307: Cannot find module './foo/' or its corresponding type declarations.
@@ -1,19 +1,19 @@
tests/cases/compiler/file1.ts(1,17): error TS2307: Cannot find module 'module'.
tests/cases/compiler/file1.ts(2,18): error TS2307: Cannot find module 'module'.
tests/cases/compiler/file1.ts(3,21): error TS2307: Cannot find module 'module'.
tests/cases/compiler/file1.ts(11,18): error TS2307: Cannot find module 'module'.
tests/cases/compiler/file1.ts(1,17): error TS2307: Cannot find module 'module' or its corresponding type declarations.
tests/cases/compiler/file1.ts(2,18): error TS2307: Cannot find module 'module' or its corresponding type declarations.
tests/cases/compiler/file1.ts(3,21): error TS2307: Cannot find module 'module' or its corresponding type declarations.
tests/cases/compiler/file1.ts(11,18): error TS2307: Cannot find module 'module' or its corresponding type declarations.
==== tests/cases/compiler/file1.ts (4 errors) ====
import {c} from "module"
~~~~~~~~
!!! error TS2307: Cannot find module 'module'.
!!! error TS2307: Cannot find module 'module' or its corresponding type declarations.
import {c2} from "module"
~~~~~~~~
!!! error TS2307: Cannot find module 'module'.
!!! error TS2307: Cannot find module 'module' or its corresponding type declarations.
import * as ns from "module"
~~~~~~~~
!!! error TS2307: Cannot find module 'module'.
!!! error TS2307: Cannot find module 'module' or its corresponding type declarations.
class C extends c2.C {
}
@@ -23,5 +23,5 @@ tests/cases/compiler/file1.ts(11,18): error TS2307: Cannot find module 'module'.
export {c1} from "module";
~~~~~~~~
!!! error TS2307: Cannot find module 'module'.
!!! error TS2307: Cannot find module 'module' or its corresponding type declarations.
export var z = x;
@@ -1,4 +1,4 @@
/a.ts(1,20): error TS2307: Cannot find module 'something'.
/a.ts(1,20): error TS2307: Cannot find module 'something' or its corresponding type declarations.
/b.ts(3,6): error TS2345: Argument of type '""' is not assignable to parameter of type '"x"'.
@@ -12,6 +12,6 @@
==== /a.ts (1 errors) ====
import x = require("something");
~~~~~~~~~~~
!!! error TS2307: Cannot find module 'something'.
!!! error TS2307: Cannot find module 'something' or its corresponding type declarations.
export { x };
@@ -1,5 +1,5 @@
tests/cases/compiler/metadataImportType.ts(2,6): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
tests/cases/compiler/metadataImportType.ts(3,15): error TS2307: Cannot find module './b'.
tests/cases/compiler/metadataImportType.ts(3,15): error TS2307: Cannot find module './b' or its corresponding type declarations.
==== tests/cases/compiler/metadataImportType.ts (2 errors) ====
@@ -9,5 +9,5 @@ tests/cases/compiler/metadataImportType.ts(3,15): error TS2307: Cannot find modu
!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
b: import('./b').B
~~~~~
!!! error TS2307: Cannot find module './b'.
!!! error TS2307: Cannot find module './b' or its corresponding type declarations.
}
@@ -1,11 +1,11 @@
tests/cases/compiler/x.ts(17,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
tests/cases/compiler/x.ts(17,26): error TS2307: Cannot find module './x0'.
tests/cases/compiler/x.ts(17,26): error TS2307: Cannot find module './x0' or its corresponding type declarations.
tests/cases/compiler/x.ts(18,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
tests/cases/compiler/x.ts(18,21): error TS2307: Cannot find module './x0'.
tests/cases/compiler/x.ts(18,21): error TS2307: Cannot find module './x0' or its corresponding type declarations.
tests/cases/compiler/x.ts(19,5): error TS2666: Exports and export assignments are not permitted in module augmentations.
tests/cases/compiler/x.ts(19,19): error TS2307: Cannot find module './x0'.
tests/cases/compiler/x.ts(19,19): error TS2307: Cannot find module './x0' or its corresponding type declarations.
tests/cases/compiler/x.ts(20,5): error TS2666: Exports and export assignments are not permitted in module augmentations.
tests/cases/compiler/x.ts(20,21): error TS2307: Cannot find module './x0'.
tests/cases/compiler/x.ts(20,21): error TS2307: Cannot find module './x0' or its corresponding type declarations.
tests/cases/compiler/x.ts(24,5): error TS2666: Exports and export assignments are not permitted in module augmentations.
@@ -33,22 +33,22 @@ tests/cases/compiler/x.ts(24,5): error TS2666: Exports and export assignments ar
~~~~~~
!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
~~~~~~
!!! error TS2307: Cannot find module './x0'.
!!! error TS2307: Cannot find module './x0' or its corresponding type declarations.
import {a} from "./x0";
~~~~~~
!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
~~~~~~
!!! error TS2307: Cannot find module './x0'.
!!! error TS2307: Cannot find module './x0' or its corresponding type declarations.
export * from "./x0";
~~~~~~
!!! error TS2666: Exports and export assignments are not permitted in module augmentations.
~~~~~~
!!! error TS2307: Cannot find module './x0'.
!!! error TS2307: Cannot find module './x0' or its corresponding type declarations.
export {a} from "./x0";
~~~~~~
!!! error TS2666: Exports and export assignments are not permitted in module augmentations.
~~~~~~
!!! error TS2307: Cannot find module './x0'.
!!! error TS2307: Cannot find module './x0' or its corresponding type declarations.
}
declare module "./test" {
@@ -1,8 +1,8 @@
tests/cases/compiler/f3.ts(3,13): error TS2339: Property 'foo' does not exist on type 'A'.
tests/cases/compiler/f3.ts(11,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
tests/cases/compiler/f3.ts(11,21): error TS2307: Cannot find module './f2'.
tests/cases/compiler/f3.ts(11,21): error TS2307: Cannot find module './f2' or its corresponding type declarations.
tests/cases/compiler/f3.ts(12,5): error TS2666: Exports and export assignments are not permitted in module augmentations.
tests/cases/compiler/f3.ts(12,21): error TS2307: Cannot find module './f2'.
tests/cases/compiler/f3.ts(12,21): error TS2307: Cannot find module './f2' or its corresponding type declarations.
tests/cases/compiler/f3.ts(13,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
tests/cases/compiler/f3.ts(14,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
tests/cases/compiler/f4.ts(5,11): error TS2339: Property 'foo' does not exist on type 'A'.
@@ -33,12 +33,12 @@ tests/cases/compiler/f4.ts(5,11): error TS2339: Property 'foo' does not exist on
~~~~~~
!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
~~~~~~
!!! error TS2307: Cannot find module './f2'.
!!! error TS2307: Cannot find module './f2' or its corresponding type declarations.
export {B} from "./f2";
~~~~~~
!!! error TS2666: Exports and export assignments are not permitted in module augmentations.
~~~~~~
!!! error TS2307: Cannot find module './f2'.
!!! error TS2307: Cannot find module './f2' or its corresponding type declarations.
import I = N.Ifc;
~~~~~~
!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
@@ -1,5 +1,5 @@
tests/cases/compiler/f3.ts(11,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
tests/cases/compiler/f3.ts(11,21): error TS2307: Cannot find module './f2'.
tests/cases/compiler/f3.ts(11,21): error TS2307: Cannot find module './f2' or its corresponding type declarations.
tests/cases/compiler/f3.ts(12,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
tests/cases/compiler/f3.ts(13,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
@@ -27,7 +27,7 @@ tests/cases/compiler/f3.ts(13,5): error TS2667: Imports are not permitted in mod
~~~~~~
!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
~~~~~~
!!! error TS2307: Cannot find module './f2'.
!!! error TS2307: Cannot find module './f2' or its corresponding type declarations.
import I = N.Ifc;
~~~~~~
!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.
@@ -1,9 +1,9 @@
tests/cases/conformance/jsdoc/bug26693.js(2,22): error TS2307: Cannot find module 'nope'.
tests/cases/conformance/jsdoc/bug26693.js(2,22): error TS2307: Cannot find module 'nope' or its corresponding type declarations.
==== tests/cases/conformance/jsdoc/bug26693.js (1 errors) ====
/** @typedef {module:locale} hi */
import { nope } from 'nope';
~~~~~~
!!! error TS2307: Cannot find module 'nope'.
!!! error TS2307: Cannot find module 'nope' or its corresponding type declarations.
@@ -1,10 +1,10 @@
/a.ts(1,22): error TS2307: Cannot find module 'foo'.
/a.ts(1,22): error TS2307: Cannot find module 'foo' or its corresponding type declarations.
==== /a.ts (1 errors) ====
import foo = require("foo");
~~~~~
!!! error TS2307: Cannot find module 'foo'.
!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations.
==== /node_modules/foo/package.json (0 errors) ====
{ "main": "oof" }
@@ -1,4 +1,4 @@
/a.ts(1,21): error TS2307: Cannot find module 'foo'.
/a.ts(1,21): error TS2307: Cannot find module 'foo' or its corresponding type declarations.
==== /tsconfig.json (0 errors) ====
@@ -14,5 +14,5 @@
==== /a.ts (1 errors) ====
import { foo } from "foo";
~~~~~
!!! error TS2307: Cannot find module 'foo'.
!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations.
@@ -2,9 +2,9 @@ tests/cases/compiler/privacyGloImportParseErrors.ts(22,5): error TS2668: 'export
tests/cases/compiler/privacyGloImportParseErrors.ts(22,27): error TS2435: Ambient modules cannot be nested in other modules or namespaces.
tests/cases/compiler/privacyGloImportParseErrors.ts(30,20): error TS2435: Ambient modules cannot be nested in other modules or namespaces.
tests/cases/compiler/privacyGloImportParseErrors.ts(59,37): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/privacyGloImportParseErrors.ts(59,37): error TS2307: Cannot find module 'm1_M3_public'.
tests/cases/compiler/privacyGloImportParseErrors.ts(59,37): error TS2307: Cannot find module 'm1_M3_public' or its corresponding type declarations.
tests/cases/compiler/privacyGloImportParseErrors.ts(69,37): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/privacyGloImportParseErrors.ts(69,37): error TS2307: Cannot find module 'm1_M4_private'.
tests/cases/compiler/privacyGloImportParseErrors.ts(69,37): error TS2307: Cannot find module 'm1_M4_private' or its corresponding type declarations.
tests/cases/compiler/privacyGloImportParseErrors.ts(81,43): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/privacyGloImportParseErrors.ts(82,43): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/privacyGloImportParseErrors.ts(121,38): error TS1147: Import declarations in a namespace cannot reference a module.
@@ -85,7 +85,7 @@ tests/cases/compiler/privacyGloImportParseErrors.ts(149,29): error TS1147: Impor
~~~~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'm1_M3_public'.
!!! error TS2307: Cannot find module 'm1_M3_public' or its corresponding type declarations.
export var m1_im3_private_v1_public = m1_im3_private.c1;
export var m1_im3_private_v2_public = new m1_im3_private.c1();
export var m1_im3_private_v3_public = m1_im3_private.f1;
@@ -99,7 +99,7 @@ tests/cases/compiler/privacyGloImportParseErrors.ts(149,29): error TS1147: Impor
~~~~~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'm1_M4_private'.
!!! error TS2307: Cannot find module 'm1_M4_private' or its corresponding type declarations.
export var m1_im4_private_v1_public = m1_im4_private.c1;
export var m1_im4_private_v2_public = new m1_im4_private.c1();
export var m1_im4_private_v3_public = m1_im4_private.f1;
@@ -2,39 +2,39 @@ tests/cases/compiler/privacyImportParseErrors.ts(22,5): error TS2668: 'export' m
tests/cases/compiler/privacyImportParseErrors.ts(22,27): error TS2435: Ambient modules cannot be nested in other modules or namespaces.
tests/cases/compiler/privacyImportParseErrors.ts(30,20): error TS2435: Ambient modules cannot be nested in other modules or namespaces.
tests/cases/compiler/privacyImportParseErrors.ts(59,37): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/privacyImportParseErrors.ts(59,37): error TS2307: Cannot find module 'm1_M3_public'.
tests/cases/compiler/privacyImportParseErrors.ts(59,37): error TS2307: Cannot find module 'm1_M3_public' or its corresponding type declarations.
tests/cases/compiler/privacyImportParseErrors.ts(69,37): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/privacyImportParseErrors.ts(69,37): error TS2307: Cannot find module 'm1_M4_private'.
tests/cases/compiler/privacyImportParseErrors.ts(69,37): error TS2307: Cannot find module 'm1_M4_private' or its corresponding type declarations.
tests/cases/compiler/privacyImportParseErrors.ts(81,43): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/privacyImportParseErrors.ts(82,43): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/privacyImportParseErrors.ts(106,5): error TS2668: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.
tests/cases/compiler/privacyImportParseErrors.ts(106,27): error TS2435: Ambient modules cannot be nested in other modules or namespaces.
tests/cases/compiler/privacyImportParseErrors.ts(114,20): error TS2435: Ambient modules cannot be nested in other modules or namespaces.
tests/cases/compiler/privacyImportParseErrors.ts(143,37): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/privacyImportParseErrors.ts(143,37): error TS2307: Cannot find module 'm2_M3_public'.
tests/cases/compiler/privacyImportParseErrors.ts(143,37): error TS2307: Cannot find module 'm2_M3_public' or its corresponding type declarations.
tests/cases/compiler/privacyImportParseErrors.ts(153,37): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/privacyImportParseErrors.ts(153,37): error TS2307: Cannot find module 'm2_M4_private'.
tests/cases/compiler/privacyImportParseErrors.ts(153,37): error TS2307: Cannot find module 'm2_M4_private' or its corresponding type declarations.
tests/cases/compiler/privacyImportParseErrors.ts(166,43): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/privacyImportParseErrors.ts(167,43): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/privacyImportParseErrors.ts(180,1): error TS2668: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.
tests/cases/compiler/privacyImportParseErrors.ts(180,23): error TS2664: Invalid module name in augmentation, module 'glo_M2_public' cannot be found.
tests/cases/compiler/privacyImportParseErrors.ts(198,1): error TS2668: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.
tests/cases/compiler/privacyImportParseErrors.ts(198,23): error TS2664: Invalid module name in augmentation, module 'glo_M4_private' cannot be found.
tests/cases/compiler/privacyImportParseErrors.ts(218,34): error TS2307: Cannot find module 'glo_M2_public'.
tests/cases/compiler/privacyImportParseErrors.ts(238,34): error TS2307: Cannot find module 'glo_M4_private'.
tests/cases/compiler/privacyImportParseErrors.ts(251,40): error TS2307: Cannot find module 'glo_M2_public'.
tests/cases/compiler/privacyImportParseErrors.ts(252,40): error TS2307: Cannot find module 'glo_M4_private'.
tests/cases/compiler/privacyImportParseErrors.ts(218,34): error TS2307: Cannot find module 'glo_M2_public' or its corresponding type declarations.
tests/cases/compiler/privacyImportParseErrors.ts(238,34): error TS2307: Cannot find module 'glo_M4_private' or its corresponding type declarations.
tests/cases/compiler/privacyImportParseErrors.ts(251,40): error TS2307: Cannot find module 'glo_M2_public' or its corresponding type declarations.
tests/cases/compiler/privacyImportParseErrors.ts(252,40): error TS2307: Cannot find module 'glo_M4_private' or its corresponding type declarations.
tests/cases/compiler/privacyImportParseErrors.ts(255,1): error TS2668: 'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.
tests/cases/compiler/privacyImportParseErrors.ts(255,23): error TS2664: Invalid module name in augmentation, module 'use_glo_M1_public' cannot be found.
tests/cases/compiler/privacyImportParseErrors.ts(258,45): error TS2709: Cannot use namespace 'use_glo_M1_public' as a type.
tests/cases/compiler/privacyImportParseErrors.ts(261,39): error TS2709: Cannot use namespace 'use_glo_M1_public' as a type.
tests/cases/compiler/privacyImportParseErrors.ts(264,40): error TS2307: Cannot find module 'glo_M2_public'.
tests/cases/compiler/privacyImportParseErrors.ts(264,40): error TS2307: Cannot find module 'glo_M2_public' or its corresponding type declarations.
tests/cases/compiler/privacyImportParseErrors.ts(273,38): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/privacyImportParseErrors.ts(277,45): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/privacyImportParseErrors.ts(284,16): error TS2664: Invalid module name in augmentation, module 'use_glo_M3_private' cannot be found.
tests/cases/compiler/privacyImportParseErrors.ts(287,46): error TS2709: Cannot use namespace 'use_glo_M3_private' as a type.
tests/cases/compiler/privacyImportParseErrors.ts(290,40): error TS2709: Cannot use namespace 'use_glo_M3_private' as a type.
tests/cases/compiler/privacyImportParseErrors.ts(293,41): error TS2307: Cannot find module 'glo_M4_private'.
tests/cases/compiler/privacyImportParseErrors.ts(293,41): error TS2307: Cannot find module 'glo_M4_private' or its corresponding type declarations.
tests/cases/compiler/privacyImportParseErrors.ts(302,38): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/privacyImportParseErrors.ts(306,45): error TS1147: Import declarations in a namespace cannot reference a module.
tests/cases/compiler/privacyImportParseErrors.ts(312,16): error TS2664: Invalid module name in augmentation, module 'anotherParseError' cannot be found.
@@ -124,7 +124,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d
~~~~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'm1_M3_public'.
!!! error TS2307: Cannot find module 'm1_M3_public' or its corresponding type declarations.
export var m1_im3_private_v1_public = m1_im3_private.c1;
export var m1_im3_private_v2_public = new m1_im3_private.c1();
export var m1_im3_private_v3_public = m1_im3_private.f1;
@@ -138,7 +138,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d
~~~~~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'm1_M4_private'.
!!! error TS2307: Cannot find module 'm1_M4_private' or its corresponding type declarations.
export var m1_im4_private_v1_public = m1_im4_private.c1;
export var m1_im4_private_v2_public = new m1_im4_private.c1();
export var m1_im4_private_v3_public = m1_im4_private.f1;
@@ -226,7 +226,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d
~~~~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'm2_M3_public'.
!!! error TS2307: Cannot find module 'm2_M3_public' or its corresponding type declarations.
export var m1_im3_private_v1_public = m1_im3_private.c1;
export var m1_im3_private_v2_public = new m1_im3_private.c1();
export var m1_im3_private_v3_public = m1_im3_private.f1;
@@ -240,7 +240,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d
~~~~~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'm2_M4_private'.
!!! error TS2307: Cannot find module 'm2_M4_private' or its corresponding type declarations.
export var m1_im4_private_v1_public = m1_im4_private.c1;
export var m1_im4_private_v2_public = new m1_im4_private.c1();
export var m1_im4_private_v3_public = m1_im4_private.f1;
@@ -319,7 +319,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d
import glo_im2_private = require("glo_M2_public");
~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'glo_M2_public'.
!!! error TS2307: Cannot find module 'glo_M2_public' or its corresponding type declarations.
export var glo_im2_private_v1_public = glo_im2_private.c1;
export var glo_im2_private_v2_public = new glo_im2_private.c1();
export var glo_im2_private_v3_public = glo_im2_private.f1;
@@ -341,7 +341,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d
import glo_im4_private = require("glo_M4_private");
~~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'glo_M4_private'.
!!! error TS2307: Cannot find module 'glo_M4_private' or its corresponding type declarations.
export var glo_im4_private_v1_public = glo_im4_private.c1;
export var glo_im4_private_v2_public = new glo_im4_private.c1();
export var glo_im4_private_v3_public = glo_im4_private.f1;
@@ -356,10 +356,10 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d
export import glo_im2_public = glo_M3_private;
export import glo_im3_public = require("glo_M2_public");
~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'glo_M2_public'.
!!! error TS2307: Cannot find module 'glo_M2_public' or its corresponding type declarations.
export import glo_im4_public = require("glo_M4_private");
~~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'glo_M4_private'.
!!! error TS2307: Cannot find module 'glo_M4_private' or its corresponding type declarations.
export declare module "use_glo_M1_public" {
@@ -381,7 +381,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d
import use_glo_M2_public = require("glo_M2_public");
~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'glo_M2_public'.
!!! error TS2307: Cannot find module 'glo_M2_public' or its corresponding type declarations.
export var use_glo_M2_public_v1_public: { new (): use_glo_M2_public.c1; };
export var use_glo_M2_public_v2_public: use_glo_M2_public;
export var use_glo_M2_public_v3_public: () => use_glo_M2_public.c1;
@@ -422,7 +422,7 @@ tests/cases/compiler/privacyImportParseErrors.ts(353,29): error TS1147: Import d
import use_glo_M4_private = require("glo_M4_private");
~~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'glo_M4_private'.
!!! error TS2307: Cannot find module 'glo_M4_private' or its corresponding type declarations.
export var use_glo_M4_private_v1_public: { new (): use_glo_M4_private.c1; };
export var use_glo_M4_private_v2_public: use_glo_M4_private;
export var use_glo_M4_private_v3_public: () => use_glo_M4_private.c1;
@@ -1,18 +1,18 @@
decl.ts(1,26): error TS2307: Cannot find module './foo/bar.tx'.
decl.ts(2,26): error TS2307: Cannot find module 'baz'.
decl.ts(3,26): error TS2307: Cannot find module './baz'.
decl.ts(1,26): error TS2307: Cannot find module './foo/bar.tx' or its corresponding type declarations.
decl.ts(2,26): error TS2307: Cannot find module 'baz' or its corresponding type declarations.
decl.ts(3,26): error TS2307: Cannot find module './baz' or its corresponding type declarations.
==== decl.ts (3 errors) ====
import modErr = require("./foo/bar.tx");
~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module './foo/bar.tx'.
!!! error TS2307: Cannot find module './foo/bar.tx' or its corresponding type declarations.
import modErr1 = require("baz");
~~~~~
!!! error TS2307: Cannot find module 'baz'.
!!! error TS2307: Cannot find module 'baz' or its corresponding type declarations.
import modErr2 = require("./baz");
~~~~~~~
!!! error TS2307: Cannot find module './baz'.
!!! error TS2307: Cannot find module './baz' or its corresponding type declarations.
//import modErr1 = require("\bar");
@@ -1,18 +1,18 @@
decl.ts(1,26): error TS2307: Cannot find module './foo/bar.tx'.
decl.ts(2,26): error TS2307: Cannot find module 'baz'.
decl.ts(3,26): error TS2307: Cannot find module './baz'.
decl.ts(1,26): error TS2307: Cannot find module './foo/bar.tx' or its corresponding type declarations.
decl.ts(2,26): error TS2307: Cannot find module 'baz' or its corresponding type declarations.
decl.ts(3,26): error TS2307: Cannot find module './baz' or its corresponding type declarations.
==== decl.ts (3 errors) ====
import modErr = require("./foo/bar.tx");
~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module './foo/bar.tx'.
!!! error TS2307: Cannot find module './foo/bar.tx' or its corresponding type declarations.
import modErr1 = require("baz");
~~~~~
!!! error TS2307: Cannot find module 'baz'.
!!! error TS2307: Cannot find module 'baz' or its corresponding type declarations.
import modErr2 = require("./baz");
~~~~~~~
!!! error TS2307: Cannot find module './baz'.
!!! error TS2307: Cannot find module './baz' or its corresponding type declarations.
//import modErr1 = require("\bar");
@@ -1,4 +1,4 @@
main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
==== tsconfig.json (0 errors) ====
@@ -18,7 +18,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
==== main.ts (1 errors) ====
import * as ng from "angular2/core";
~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'angular2/core'.
!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
declare function foo(...args: any[]);
@@ -1,4 +1,4 @@
main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
==== tsconfig.json (0 errors) ====
@@ -18,7 +18,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
==== main.ts (1 errors) ====
import * as ng from "angular2/core";
~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'angular2/core'.
!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
declare function foo(...args: any[]);
@@ -1,4 +1,4 @@
main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
==== tsconfig.json (0 errors) ====
@@ -19,7 +19,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
==== main.ts (1 errors) ====
import * as ng from "angular2/core";
~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'angular2/core'.
!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
declare function foo(...args: any[]);
@@ -1,4 +1,4 @@
main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
==== tsconfig.json (0 errors) ====
@@ -19,7 +19,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
==== main.ts (1 errors) ====
import * as ng from "angular2/core";
~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'angular2/core'.
!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
declare function foo(...args: any[]);
@@ -1,4 +1,4 @@
main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
==== tsconfig.json (0 errors) ====
@@ -17,7 +17,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
==== main.ts (1 errors) ====
import * as ng from "angular2/core";
~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'angular2/core'.
!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
declare function foo(...args: any[]);
@@ -1,4 +1,4 @@
main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
==== tsconfig.json (0 errors) ====
@@ -17,7 +17,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
==== main.ts (1 errors) ====
import * as ng from "angular2/core";
~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'angular2/core'.
!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
declare function foo(...args: any[]);
@@ -1,4 +1,4 @@
main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
==== tsconfig.json (0 errors) ====
@@ -19,7 +19,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
==== main.ts (1 errors) ====
import * as ng from "angular2/core";
~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'angular2/core'.
!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
declare function foo(...args: any[]);
@@ -1,4 +1,4 @@
main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
==== tsconfig.json (0 errors) ====
@@ -19,7 +19,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
==== main.ts (1 errors) ====
import * as ng from "angular2/core";
~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'angular2/core'.
!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
declare function foo(...args: any[]);
@@ -1,4 +1,4 @@
main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
==== tsconfig.json (0 errors) ====
@@ -20,7 +20,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
==== main.ts (1 errors) ====
import * as ng from "angular2/core";
~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'angular2/core'.
!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
declare function foo(...args: any[]);
@@ -1,4 +1,4 @@
main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
main.ts(1,21): error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
==== tsconfig.json (0 errors) ====
@@ -20,7 +20,7 @@ main.ts(1,21): error TS2307: Cannot find module 'angular2/core'.
==== main.ts (1 errors) ====
import * as ng from "angular2/core";
~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'angular2/core'.
!!! error TS2307: Cannot find module 'angular2/core' or its corresponding type declarations.
declare function foo(...args: any[]);
@@ -1,5 +1,5 @@
internal2.ts(2,21): error TS1147: Import declarations in a namespace cannot reference a module.
internal2.ts(2,21): error TS2307: Cannot find module 'external2'.
internal2.ts(2,21): error TS2307: Cannot find module 'external2' or its corresponding type declarations.
==== internal2.ts (2 errors) ====
@@ -8,7 +8,7 @@ internal2.ts(2,21): error TS2307: Cannot find module 'external2'.
~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~
!!! error TS2307: Cannot find module 'external2'.
!!! error TS2307: Cannot find module 'external2' or its corresponding type declarations.
export var a = g.square(5);
export var b = "foo";
}
@@ -1,5 +1,5 @@
internal2.ts(2,21): error TS1147: Import declarations in a namespace cannot reference a module.
internal2.ts(2,21): error TS2307: Cannot find module 'external2'.
internal2.ts(2,21): error TS2307: Cannot find module 'external2' or its corresponding type declarations.
==== internal2.ts (2 errors) ====
@@ -8,7 +8,7 @@ internal2.ts(2,21): error TS2307: Cannot find module 'external2'.
~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~
!!! error TS2307: Cannot find module 'external2'.
!!! error TS2307: Cannot find module 'external2' or its corresponding type declarations.
export var a = g.square(5);
export var b = "foo";
}
@@ -1,5 +1,5 @@
test1.ts(3,23): error TS1147: Import declarations in a namespace cannot reference a module.
test1.ts(3,23): error TS2307: Cannot find module 'test2'.
test1.ts(3,23): error TS2307: Cannot find module 'test2' or its corresponding type declarations.
==== test1.ts (2 errors) ====
@@ -9,7 +9,7 @@ test1.ts(3,23): error TS2307: Cannot find module 'test2'.
~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~
!!! error TS2307: Cannot find module 'test2'.
!!! error TS2307: Cannot find module 'test2' or its corresponding type declarations.
//console.log(foo.$);
@@ -1,5 +1,5 @@
test1.ts(3,23): error TS1147: Import declarations in a namespace cannot reference a module.
test1.ts(3,23): error TS2307: Cannot find module 'test2'.
test1.ts(3,23): error TS2307: Cannot find module 'test2' or its corresponding type declarations.
==== test1.ts (2 errors) ====
@@ -9,7 +9,7 @@ test1.ts(3,23): error TS2307: Cannot find module 'test2'.
~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~
!!! error TS2307: Cannot find module 'test2'.
!!! error TS2307: Cannot find module 'test2' or its corresponding type declarations.
//console.log(foo.$);
@@ -1,7 +1,7 @@
testGlo.ts(2,39): error TS1147: Import declarations in a namespace cannot reference a module.
testGlo.ts(2,39): error TS2307: Cannot find module 'mExported'.
testGlo.ts(2,39): error TS2307: Cannot find module 'mExported' or its corresponding type declarations.
testGlo.ts(21,35): error TS1147: Import declarations in a namespace cannot reference a module.
testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported'.
testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations.
==== testGlo.ts (4 errors) ====
@@ -10,7 +10,7 @@ testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported'.
~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~
!!! error TS2307: Cannot find module 'mExported'.
!!! error TS2307: Cannot find module 'mExported' or its corresponding type declarations.
export var c1 = new mExported.me.class1;
export function f1() {
return new mExported.me.class1();
@@ -33,7 +33,7 @@ testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported'.
~~~~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'mNonExported'.
!!! error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations.
export var c3 = new mNonExported.mne.class1;
export function f3() {
return new mNonExported.mne.class1();
@@ -1,7 +1,7 @@
testGlo.ts(2,39): error TS1147: Import declarations in a namespace cannot reference a module.
testGlo.ts(2,39): error TS2307: Cannot find module 'mExported'.
testGlo.ts(2,39): error TS2307: Cannot find module 'mExported' or its corresponding type declarations.
testGlo.ts(21,35): error TS1147: Import declarations in a namespace cannot reference a module.
testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported'.
testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations.
==== testGlo.ts (4 errors) ====
@@ -10,7 +10,7 @@ testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported'.
~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~
!!! error TS2307: Cannot find module 'mExported'.
!!! error TS2307: Cannot find module 'mExported' or its corresponding type declarations.
export var c1 = new mExported.me.class1;
export function f1() {
return new mExported.me.class1();
@@ -33,7 +33,7 @@ testGlo.ts(21,35): error TS2307: Cannot find module 'mNonExported'.
~~~~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'mNonExported'.
!!! error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations.
export var c3 = new mNonExported.mne.class1;
export function f3() {
return new mNonExported.mne.class1();
@@ -1,7 +1,7 @@
test.ts(5,39): error TS1147: Import declarations in a namespace cannot reference a module.
test.ts(5,39): error TS2307: Cannot find module 'mExported'.
test.ts(5,39): error TS2307: Cannot find module 'mExported' or its corresponding type declarations.
test.ts(24,35): error TS1147: Import declarations in a namespace cannot reference a module.
test.ts(24,35): error TS2307: Cannot find module 'mNonExported'.
test.ts(24,35): error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations.
==== test.ts (4 errors) ====
@@ -13,7 +13,7 @@ test.ts(24,35): error TS2307: Cannot find module 'mNonExported'.
~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~
!!! error TS2307: Cannot find module 'mExported'.
!!! error TS2307: Cannot find module 'mExported' or its corresponding type declarations.
export var c1 = new mExported.me.class1;
export function f1() {
return new mExported.me.class1();
@@ -36,7 +36,7 @@ test.ts(24,35): error TS2307: Cannot find module 'mNonExported'.
~~~~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'mNonExported'.
!!! error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations.
export var c3 = new mNonExported.mne.class1;
export function f3() {
return new mNonExported.mne.class1();
@@ -1,7 +1,7 @@
test.ts(5,39): error TS1147: Import declarations in a namespace cannot reference a module.
test.ts(5,39): error TS2307: Cannot find module 'mExported'.
test.ts(5,39): error TS2307: Cannot find module 'mExported' or its corresponding type declarations.
test.ts(24,35): error TS1147: Import declarations in a namespace cannot reference a module.
test.ts(24,35): error TS2307: Cannot find module 'mNonExported'.
test.ts(24,35): error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations.
==== test.ts (4 errors) ====
@@ -13,7 +13,7 @@ test.ts(24,35): error TS2307: Cannot find module 'mNonExported'.
~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~
!!! error TS2307: Cannot find module 'mExported'.
!!! error TS2307: Cannot find module 'mExported' or its corresponding type declarations.
export var c1 = new mExported.me.class1;
export function f1() {
return new mExported.me.class1();
@@ -36,7 +36,7 @@ test.ts(24,35): error TS2307: Cannot find module 'mNonExported'.
~~~~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'mNonExported'.
!!! error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations.
export var c3 = new mNonExported.mne.class1;
export function f3() {
return new mNonExported.mne.class1();
@@ -1,7 +1,7 @@
test.ts(2,39): error TS1147: Import declarations in a namespace cannot reference a module.
test.ts(2,39): error TS2307: Cannot find module 'mExported'.
test.ts(2,39): error TS2307: Cannot find module 'mExported' or its corresponding type declarations.
test.ts(42,35): error TS1147: Import declarations in a namespace cannot reference a module.
test.ts(42,35): error TS2307: Cannot find module 'mNonExported'.
test.ts(42,35): error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations.
==== test.ts (4 errors) ====
@@ -10,7 +10,7 @@ test.ts(42,35): error TS2307: Cannot find module 'mNonExported'.
~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~
!!! error TS2307: Cannot find module 'mExported'.
!!! error TS2307: Cannot find module 'mExported' or its corresponding type declarations.
module Internal_M1 {
export var c1 = new mExported.me.class1;
@@ -54,7 +54,7 @@ test.ts(42,35): error TS2307: Cannot find module 'mNonExported'.
~~~~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'mNonExported'.
!!! error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations.
module Internal_M3 {
export var c3 = new mNonExported.mne.class1;
export function f3() {
@@ -1,7 +1,7 @@
test.ts(2,39): error TS1147: Import declarations in a namespace cannot reference a module.
test.ts(2,39): error TS2307: Cannot find module 'mExported'.
test.ts(2,39): error TS2307: Cannot find module 'mExported' or its corresponding type declarations.
test.ts(42,35): error TS1147: Import declarations in a namespace cannot reference a module.
test.ts(42,35): error TS2307: Cannot find module 'mNonExported'.
test.ts(42,35): error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations.
==== test.ts (4 errors) ====
@@ -10,7 +10,7 @@ test.ts(42,35): error TS2307: Cannot find module 'mNonExported'.
~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~
!!! error TS2307: Cannot find module 'mExported'.
!!! error TS2307: Cannot find module 'mExported' or its corresponding type declarations.
module Internal_M1 {
export var c1 = new mExported.me.class1;
@@ -54,7 +54,7 @@ test.ts(42,35): error TS2307: Cannot find module 'mNonExported'.
~~~~~~~~~~~~~~
!!! error TS1147: Import declarations in a namespace cannot reference a module.
~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'mNonExported'.
!!! error TS2307: Cannot find module 'mNonExported' or its corresponding type declarations.
module Internal_M3 {
export var c3 = new mNonExported.mne.class1;
export function f3() {
@@ -1,10 +1,10 @@
tests/cases/conformance/salsa/bug28576.js(1,15): error TS2307: Cannot find module 'arglebaz'.
tests/cases/conformance/salsa/bug28576.js(1,15): error TS2307: Cannot find module 'arglebaz' or its corresponding type declarations.
==== tests/cases/conformance/salsa/bug28576.js (1 errors) ====
import x from 'arglebaz'
~~~~~~~~~~
!!! error TS2307: Cannot find module 'arglebaz'.
!!! error TS2307: Cannot find module 'arglebaz' or its corresponding type declarations.
{
x.bar = 1
}
@@ -1,10 +1,10 @@
tests/cases/compiler/somefolder/a.ts(1,17): error TS2307: Cannot find module './b'.
tests/cases/compiler/somefolder/a.ts(1,17): error TS2307: Cannot find module './b' or its corresponding type declarations.
==== tests/cases/compiler/somefolder/a.ts (1 errors) ====
import {x} from "./b"
~~~~~
!!! error TS2307: Cannot find module './b'.
!!! error TS2307: Cannot find module './b' or its corresponding type declarations.
==== tests/cases/compiler/b.ts (0 errors) ====
export let x = 1;
@@ -1,10 +1,10 @@
tests/cases/conformance/externalModules/foo_1.ts(1,22): error TS2307: Cannot find module './test/foo'.
tests/cases/conformance/externalModules/foo_1.ts(1,22): error TS2307: Cannot find module './test/foo' or its corresponding type declarations.
==== tests/cases/conformance/externalModules/foo_1.ts (1 errors) ====
import foo = require('./test/foo');
~~~~~~~~~~~~
!!! error TS2307: Cannot find module './test/foo'.
!!! error TS2307: Cannot find module './test/foo' or its corresponding type declarations.
var z = foo.x + 10;
==== tests/cases/conformance/externalModules/foo_0.ts (0 errors) ====
@@ -1,14 +1,14 @@
/src/projects/file1.ts(1,20): error TS2307: Cannot find module 'd.json'.
/src/projects/file1.ts(2,20): error TS2307: Cannot find module 'e'.
/src/projects/file1.ts(1,20): error TS2307: Cannot find module 'd.json' or its corresponding type declarations.
/src/projects/file1.ts(2,20): error TS2307: Cannot find module 'e' or its corresponding type declarations.
==== /src/projects/file1.ts (2 errors) ====
import d = require("d.json"); // Should fail
~~~~~~~~
!!! error TS2307: Cannot find module 'd.json'.
!!! error TS2307: Cannot find module 'd.json' or its corresponding type declarations.
import e = require("e"); // Should fail
~~~
!!! error TS2307: Cannot find module 'e'.
!!! error TS2307: Cannot find module 'e' or its corresponding type declarations.
==== /src/projects/node_modules/b.json (0 errors) ====
{
@@ -1,17 +1,17 @@
error TS5070: Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy.
tests/cases/compiler/file1.ts(1,21): error TS2307: Cannot find module './b'.
tests/cases/compiler/file1.ts(3,21): error TS2307: Cannot find module './b.json'.
tests/cases/compiler/file1.ts(1,21): error TS2307: Cannot find module './b' or its corresponding type declarations.
tests/cases/compiler/file1.ts(3,21): error TS2307: Cannot find module './b.json' or its corresponding type declarations.
!!! error TS5070: Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy.
==== tests/cases/compiler/file1.ts (2 errors) ====
import b1 = require('./b');
~~~~~
!!! error TS2307: Cannot find module './b'.
!!! error TS2307: Cannot find module './b' or its corresponding type declarations.
let x = b1.a;
import b2 = require('./b.json');
~~~~~~~~~~
!!! error TS2307: Cannot find module './b.json'.
!!! error TS2307: Cannot find module './b.json' or its corresponding type declarations.
if (x) {
let b = b2.b;
x = (b1.b === b);
@@ -1,6 +1,6 @@
error TS5070: Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy.
tests/cases/compiler/file1.ts(1,1): error TS1148: Cannot use imports, exports, or module augmentations when '--module' is 'none'.
tests/cases/compiler/file1.ts(1,20): error TS2307: Cannot find module './b.json'.
tests/cases/compiler/file1.ts(1,20): error TS2307: Cannot find module './b.json' or its corresponding type declarations.
!!! error TS5070: Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy.
@@ -9,7 +9,7 @@ tests/cases/compiler/file1.ts(1,20): error TS2307: Cannot find module './b.json'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1148: Cannot use imports, exports, or module augmentations when '--module' is 'none'.
~~~~~~~~~~
!!! error TS2307: Cannot find module './b.json'.
!!! error TS2307: Cannot find module './b.json' or its corresponding type declarations.
==== tests/cases/compiler/b.json (0 errors) ====
{
@@ -1,10 +1,10 @@
tests/cases/compiler/file1.ts(1,21): error TS2307: Cannot find module './b'.
tests/cases/compiler/file1.ts(1,21): error TS2307: Cannot find module './b' or its corresponding type declarations.
==== tests/cases/compiler/file1.ts (1 errors) ====
import b1 = require('./b'); // This should not resolve
~~~~~
!!! error TS2307: Cannot find module './b'.
!!! error TS2307: Cannot find module './b' or its corresponding type declarations.
let x = b1.a;
import b2 = require('./b.json');
if (x) {
@@ -1,10 +1,10 @@
tests/cases/compiler/test.ts(1,19): error TS2307: Cannot find module './foo'.
tests/cases/compiler/test.ts(1,19): error TS2307: Cannot find module './foo' or its corresponding type declarations.
==== tests/cases/compiler/test.ts (1 errors) ====
import {foo} from './foo';
~~~~~~~
!!! error TS2307: Cannot find module './foo'.
!!! error TS2307: Cannot find module './foo' or its corresponding type declarations.
const baz = 42;
const bar = { foo, baz };
@@ -1,10 +1,10 @@
tests/cases/compiler/test.ts(1,19): error TS2307: Cannot find module './foo'.
tests/cases/compiler/test.ts(1,19): error TS2307: Cannot find module './foo' or its corresponding type declarations.
==== tests/cases/compiler/test.ts (1 errors) ====
import {foo} from './foo';
~~~~~~~
!!! error TS2307: Cannot find module './foo'.
!!! error TS2307: Cannot find module './foo' or its corresponding type declarations.
const baz = 42;
const bar = { foo, baz };
@@ -1,10 +1,10 @@
tests/cases/compiler/test.ts(1,19): error TS2307: Cannot find module './foo'.
tests/cases/compiler/test.ts(1,19): error TS2307: Cannot find module './foo' or its corresponding type declarations.
==== tests/cases/compiler/test.ts (1 errors) ====
import {foo} from './foo';
~~~~~~~
!!! error TS2307: Cannot find module './foo'.
!!! error TS2307: Cannot find module './foo' or its corresponding type declarations.
const baz = 42;
const bar = { foo, baz };
@@ -1,4 +1,4 @@
tests/cases/compiler/test.ts(2,19): error TS2307: Cannot find module './missingModule'.
tests/cases/compiler/test.ts(2,19): error TS2307: Cannot find module './missingModule' or its corresponding type declarations.
==== tests/cases/compiler/existingModule.ts (0 errors) ====
@@ -8,7 +8,7 @@ tests/cases/compiler/test.ts(2,19): error TS2307: Cannot find module './missingM
import {x} from './existingModule';
import {foo} from './missingModule';
~~~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module './missingModule'.
!!! error TS2307: Cannot find module './missingModule' or its corresponding type declarations.
declare function use(a: any): void;
@@ -1,5 +1,5 @@
tests/cases/compiler/strictModeReservedWordInImportEqualDeclaration.ts(2,8): error TS1214: Identifier expected. 'public' is a reserved word in strict mode. Modules are automatically in strict mode.
tests/cases/compiler/strictModeReservedWordInImportEqualDeclaration.ts(2,25): error TS2307: Cannot find module '1'.
tests/cases/compiler/strictModeReservedWordInImportEqualDeclaration.ts(2,25): error TS2307: Cannot find module '1' or its corresponding type declarations.
==== tests/cases/compiler/strictModeReservedWordInImportEqualDeclaration.ts (2 errors) ====
@@ -8,4 +8,4 @@ tests/cases/compiler/strictModeReservedWordInImportEqualDeclaration.ts(2,25): er
~~~~~~
!!! error TS1214: Identifier expected. 'public' is a reserved word in strict mode. Modules are automatically in strict mode.
~~~
!!! error TS2307: Cannot find module '1'.
!!! error TS2307: Cannot find module '1' or its corresponding type declarations.
@@ -1,9 +1,9 @@
tests/cases/compiler/strictModeWordInImportDeclaration.ts(2,13): error TS1214: Identifier expected. 'package' is a reserved word in strict mode. Modules are automatically in strict mode.
tests/cases/compiler/strictModeWordInImportDeclaration.ts(2,26): error TS2307: Cannot find module './1'.
tests/cases/compiler/strictModeWordInImportDeclaration.ts(2,26): error TS2307: Cannot find module './1' or its corresponding type declarations.
tests/cases/compiler/strictModeWordInImportDeclaration.ts(3,16): error TS1214: Identifier expected. 'private' is a reserved word in strict mode. Modules are automatically in strict mode.
tests/cases/compiler/strictModeWordInImportDeclaration.ts(3,30): error TS2307: Cannot find module './1'.
tests/cases/compiler/strictModeWordInImportDeclaration.ts(3,30): error TS2307: Cannot find module './1' or its corresponding type declarations.
tests/cases/compiler/strictModeWordInImportDeclaration.ts(4,8): error TS1214: Identifier expected. 'public' is a reserved word in strict mode. Modules are automatically in strict mode.
tests/cases/compiler/strictModeWordInImportDeclaration.ts(4,20): error TS2307: Cannot find module './1'.
tests/cases/compiler/strictModeWordInImportDeclaration.ts(4,20): error TS2307: Cannot find module './1' or its corresponding type declarations.
==== tests/cases/compiler/strictModeWordInImportDeclaration.ts (6 errors) ====
@@ -12,14 +12,14 @@ tests/cases/compiler/strictModeWordInImportDeclaration.ts(4,20): error TS2307: C
~~~~~~~
!!! error TS1214: Identifier expected. 'package' is a reserved word in strict mode. Modules are automatically in strict mode.
~~~~~
!!! error TS2307: Cannot find module './1'.
!!! error TS2307: Cannot find module './1' or its corresponding type declarations.
import {foo as private} from "./1"
~~~~~~~
!!! error TS1214: Identifier expected. 'private' is a reserved word in strict mode. Modules are automatically in strict mode.
~~~~~
!!! error TS2307: Cannot find module './1'.
!!! error TS2307: Cannot find module './1' or its corresponding type declarations.
import public from "./1"
~~~~~~
!!! error TS1214: Identifier expected. 'public' is a reserved word in strict mode. Modules are automatically in strict mode.
~~~~~
!!! error TS2307: Cannot find module './1'.
!!! error TS2307: Cannot find module './1' or its corresponding type declarations.

Some files were not shown because too many files have changed in this diff Show More