Add --module node20 (#61805)

This commit is contained in:
Andrew Branch authored and GitHub committed 2025-06-09 14:20:00 -07:00
1 parent 97cfa26f2a
commit cb38d99d08
536 files changed
+35473 -583

No files matched your search

+72 -21
View File
@@ -3688,6 +3688,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
getExternalModuleRequireArgument(node) || getExternalModuleImportEqualsDeclarationExpression(node),
);
const resolved = resolveExternalModuleSymbol(immediate);
if (resolved && ModuleKind.Node20 <= moduleKind && moduleKind <= ModuleKind.NodeNext) {
const moduleExports = getExportOfModule(resolved, "module.exports" as __String, node, dontResolveAlias);
if (moduleExports) {
return moduleExports;
}
}
markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved, /*overwriteEmpty*/ false);
return resolved;
}
@@ -3803,16 +3809,44 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
function getTargetofModuleDefault(moduleSymbol: Symbol, node: ImportClause | ImportOrExportSpecifier, dontResolveAlias: boolean) {
const file = moduleSymbol.declarations?.find(isSourceFile);
const specifier = getModuleSpecifierForImportOrExport(node);
let exportDefaultSymbol: Symbol | undefined;
let exportModuleDotExportsSymbol: Symbol | undefined;
if (isShorthandAmbientModuleSymbol(moduleSymbol)) {
exportDefaultSymbol = moduleSymbol;
}
else if (
file && specifier &&
ModuleKind.Node20 <= moduleKind && moduleKind <= ModuleKind.NodeNext &&
getEmitSyntaxForModuleSpecifierExpression(specifier) === ModuleKind.CommonJS &&
host.getImpliedNodeFormatForEmit(file) === ModuleKind.ESNext &&
(exportModuleDotExportsSymbol = resolveExportByName(moduleSymbol, "module.exports" as __String, node, dontResolveAlias))
) {
// We have a transpiled default import where the `require` resolves to an ES module with a `module.exports` named
// export. If `esModuleInterop` is enabled, this will work:
//
// const dep_1 = __importDefault(require("./dep.mjs")); // wraps like { default: require("./dep.mjs") }
// dep_1.default; // require("./dep.mjs") -> the `module.exports` export value
//
// But without `esModuleInterop`, it will be broken:
//
// const dep_1 = require("./dep.mjs"); // the `module.exports` export value (could be primitive)
// dep_1.default; // `default` property access on the `module.exports` export value
//
// We could try to resolve the 'default' property in the latter case, but it's a mistake to run in this
// environment without `esModuleInterop`, so just error.
if (!getESModuleInterop(compilerOptions)) {
error(node.name, Diagnostics.Module_0_can_only_be_default_imported_using_the_1_flag, symbolToString(moduleSymbol), "esModuleInterop");
return undefined;
}
markSymbolOfAliasDeclarationIfTypeOnly(node, exportModuleDotExportsSymbol, /*finalTarget*/ undefined, /*overwriteEmpty*/ false);
return exportModuleDotExportsSymbol;
}
else {
exportDefaultSymbol = resolveExportByName(moduleSymbol, InternalSymbolName.Default, node, dontResolveAlias);
}
const file = moduleSymbol.declarations?.find(isSourceFile);
const specifier = getModuleSpecifierForImportOrExport(node);
if (!specifier) {
return exportDefaultSymbol;
}
@@ -4958,10 +4992,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
const referenceParent = referencingLocation.parent;
if (
(isImportDeclaration(referenceParent) && getNamespaceDeclarationNode(referenceParent)) ||
isImportCall(referenceParent)
) {
const namespaceImport = isImportDeclaration(referenceParent) && getNamespaceDeclarationNode(referenceParent);
if (namespaceImport || isImportCall(referenceParent)) {
const reference = isImportCall(referenceParent) ? referenceParent.arguments[0] : referenceParent.moduleSpecifier;
const type = getTypeOfSymbol(symbol);
const defaultOnlyType = getTypeWithSyntheticDefaultOnly(type, symbol, moduleSymbol!, reference);
@@ -4970,14 +5002,27 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
const targetFile = moduleSymbol?.declarations?.find(isSourceFile);
const isEsmCjsRef = targetFile && isESMFormatImportImportingCommonjsFormatFile(getEmitSyntaxForModuleSpecifierExpression(reference), host.getImpliedNodeFormatForEmit(targetFile));
if (getESModuleInterop(compilerOptions) || isEsmCjsRef) {
let sigs = getSignaturesOfStructuredType(type, SignatureKind.Call);
if (!sigs || !sigs.length) {
sigs = getSignaturesOfStructuredType(type, SignatureKind.Construct);
const usageMode = getEmitSyntaxForModuleSpecifierExpression(reference);
let exportModuleDotExportsSymbol: Symbol | undefined;
if (
namespaceImport && targetFile &&
ModuleKind.Node20 <= moduleKind && moduleKind <= ModuleKind.NodeNext &&
usageMode === ModuleKind.CommonJS && host.getImpliedNodeFormatForEmit(targetFile) === ModuleKind.ESNext &&
(exportModuleDotExportsSymbol = resolveExportByName(symbol, "module.exports" as __String, namespaceImport, dontResolveAlias))
) {
if (!suppressInteropError && !(symbol.flags & (SymbolFlags.Module | SymbolFlags.Variable))) {
error(referencingLocation, Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, "esModuleInterop");
}
if (getESModuleInterop(compilerOptions) && hasSignatures(type)) {
return cloneTypeAsModuleType(exportModuleDotExportsSymbol, type, referenceParent);
}
return exportModuleDotExportsSymbol;
}
const isEsmCjsRef = targetFile && isESMFormatImportImportingCommonjsFormatFile(usageMode, host.getImpliedNodeFormatForEmit(targetFile));
if (getESModuleInterop(compilerOptions) || isEsmCjsRef) {
if (
(sigs && sigs.length) ||
hasSignatures(type) ||
getPropertyOfType(type, InternalSymbolName.Default, /*skipObjectFunctionPropertyAugment*/ true) ||
isEsmCjsRef
) {
@@ -4992,6 +5037,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
return symbol;
}
function hasSignatures(type: Type): boolean {
return some(getSignaturesOfStructuredType(type, SignatureKind.Call)) || some(getSignaturesOfStructuredType(type, SignatureKind.Construct));
}
/**
* Create a new symbol which has the module's type less the call and construct signatures
*/
@@ -38117,7 +38166,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
}
else if (moduleKind < ModuleKind.ES2020 && moduleKind !== ModuleKind.System) {
error(node, Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_node18_or_nodenext);
error(node, Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_node18_node20_or_nodenext);
}
const file = getSourceFileOfNode(node);
Debug.assert(!!(file.flags & NodeFlags.PossiblyContainsImportMeta), "Containing file is missing import meta node flag.");
@@ -39699,6 +39748,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
switch (moduleKind) {
case ModuleKind.Node16:
case ModuleKind.Node18:
case ModuleKind.Node20:
case ModuleKind.NodeNext:
if (sourceFile.impliedNodeFormat === ModuleKind.CommonJS) {
span ??= getSpanOfTokenAtPosition(sourceFile, node.pos);
@@ -39719,8 +39769,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
// fallthrough
default:
span ??= getSpanOfTokenAtPosition(sourceFile, node.pos);
const message = isAwaitExpression(node) ? Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher :
Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher;
const message = isAwaitExpression(node) ? Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher :
Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher;
diagnostics.add(createFileDiagnostic(sourceFile, span.start, span.length, message));
hasError = true;
break;
@@ -48330,12 +48380,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
return grammarErrorOnNode(
node,
isImportAttributes
? Diagnostics.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_preserve
: Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_nodenext_or_preserve,
? Diagnostics.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext_or_preserve
: Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_node18_node20_nodenext_or_preserve,
);
}
if (moduleKind === ModuleKind.NodeNext && !isImportAttributes) {
if (ModuleKind.Node20 <= moduleKind && moduleKind <= ModuleKind.NodeNext && !isImportAttributes) {
return grammarErrorOnFirstToken(node, Diagnostics.Import_assertions_have_been_replaced_by_import_attributes_Use_with_instead_of_assert);
}
@@ -52383,6 +52433,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
switch (moduleKind) {
case ModuleKind.Node16:
case ModuleKind.Node18:
case ModuleKind.Node20:
case ModuleKind.NodeNext:
if (sourceFile.impliedNodeFormat === ModuleKind.CommonJS) {
diagnostics.add(
@@ -52401,7 +52452,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
// fallthrough
default:
diagnostics.add(
createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher),
createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher),
);
break;
}
@@ -53244,7 +53295,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
}
else if (moduleKind === ModuleKind.ES2015) {
return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_node18_or_nodenext);
return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_node18_node20_or_nodenext);
}
if (node.typeArguments) {
@@ -53258,7 +53309,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
if (nodeArguments.length > 1) {
const importAttributesArgument = nodeArguments[1];
return grammarErrorOnNode(importAttributesArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_nodenext_or_preserve);
return grammarErrorOnNode(importAttributesArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_node18_node20_nodenext_or_preserve);
}
}
+1
View File
@@ -603,6 +603,7 @@ export const moduleOptionDeclaration: CommandLineOptionOfCustomType = {
esnext: ModuleKind.ESNext,
node16: ModuleKind.Node16,
node18: ModuleKind.Node18,
node20: ModuleKind.Node20,
nodenext: ModuleKind.NodeNext,
preserve: ModuleKind.Preserve,
})),
+8 -8
View File
@@ -1031,11 +1031,11 @@
"category": "Error",
"code": 1322
},
"Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.": {
"Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.": {
"category": "Error",
"code": 1323
},
"Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.": {
"Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.": {
"category": "Error",
"code": 1324
},
@@ -1103,7 +1103,7 @@
"category": "Error",
"code": 1341
},
"The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.": {
"The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.": {
"category": "Error",
"code": 1343
},
@@ -1223,7 +1223,7 @@
"category": "Message",
"code": 1377
},
"Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.": {
"Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.": {
"category": "Error",
"code": 1378
},
@@ -1427,7 +1427,7 @@
"category": "Error",
"code": 1431
},
"Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.": {
"Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.": {
"category": "Error",
"code": 1432
},
@@ -3799,7 +3799,7 @@
"category": "Error",
"code": 2820
},
"Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.": {
"Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.": {
"category": "Error",
"code": 2821
},
@@ -3807,7 +3807,7 @@
"category": "Error",
"code": 2822
},
"Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.": {
"Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.": {
"category": "Error",
"code": 2823
},
@@ -3887,7 +3887,7 @@
"category": "Error",
"code": 2853
},
"Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.": {
"Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.": {
"category": "Error",
"code": 2854
},
+1
View File
@@ -87,6 +87,7 @@ function getModuleTransformer(moduleKind: ModuleKind): TransformerFactory<Source
case ModuleKind.ES2015:
case ModuleKind.Node16:
case ModuleKind.Node18:
case ModuleKind.Node20:
case ModuleKind.NodeNext:
case ModuleKind.CommonJS:
// Wraps `transformModule` and `transformECMAScriptModule` and
+1
View File
@@ -7606,6 +7606,7 @@ export enum ModuleKind {
// Node16+ is an amalgam of commonjs (albeit updated) and es2022+, and represents a distinct module system from es2020/esnext
Node16 = 100,
Node18 = 101,
Node20 = 102,
NodeNext = 199,
// Emit as written
+11
View File
@@ -8964,6 +8964,7 @@ const _computedOptions = createComputedCompilerOptions({
return target ??
((compilerOptions.module === ModuleKind.Node16 && ScriptTarget.ES2022) ||
(compilerOptions.module === ModuleKind.Node18 && ScriptTarget.ES2022) ||
(compilerOptions.module === ModuleKind.Node20 && ScriptTarget.ES2023) ||
(compilerOptions.module === ModuleKind.NodeNext && ScriptTarget.ESNext) ||
ScriptTarget.ES5);
},
@@ -8987,6 +8988,7 @@ const _computedOptions = createComputedCompilerOptions({
break;
case ModuleKind.Node16:
case ModuleKind.Node18:
case ModuleKind.Node20:
moduleResolution = ModuleResolutionKind.Node16;
break;
case ModuleKind.NodeNext:
@@ -9030,6 +9032,7 @@ const _computedOptions = createComputedCompilerOptions({
switch (_computedOptions.module.computeValue(compilerOptions)) {
case ModuleKind.Node16:
case ModuleKind.Node18:
case ModuleKind.Node20:
case ModuleKind.NodeNext:
case ModuleKind.Preserve:
return true;
@@ -9092,6 +9095,14 @@ const _computedOptions = createComputedCompilerOptions({
if (compilerOptions.resolveJsonModule !== undefined) {
return compilerOptions.resolveJsonModule;
}
switch (_computedOptions.module.computeValue(compilerOptions)) {
// TODO in 6.0: uncomment
// case ModuleKind.Node16:
// case ModuleKind.Node18:
case ModuleKind.Node20:
case ModuleKind.NodeNext:
return true;
}
return _computedOptions.moduleResolution.computeValue(compilerOptions) === ModuleResolutionKind.Bundler;
},
},
+1
View File
@@ -3258,6 +3258,7 @@ export const enum ModuleKind {
ESNext = "esnext",
Node16 = "node16",
Node18 = "node18",
Node20 = "node20",
NodeNext = "nodenext",
Preserve = "preserve",
}
@@ -19,9 +19,9 @@ import {
registerCodeFix({
errorCodes: [
Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,
Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,
Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,
Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,
Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,
Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_node18_node20_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code,
],
getCodeActions: function getCodeActionsToFixModuleAndTarget(context) {
const compilerOptions = context.program.getCompilerOptions();
+1
View File
@@ -1559,6 +1559,7 @@ function getUmdImportKind(importingFile: SourceFile | FutureSourceFile, program:
return ImportKind.Namespace;
case ModuleKind.Node16:
case ModuleKind.Node18:
case ModuleKind.Node20:
case ModuleKind.NodeNext:
return getImpliedNodeFormatForEmit(importingFile, program) === ModuleKind.ESNext ? ImportKind.Namespace : ImportKind.CommonJS;
default:
+2
View File
@@ -2520,6 +2520,7 @@ declare namespace ts {
ESNext = "esnext",
Node16 = "node16",
Node18 = "node18",
Node20 = "node20",
NodeNext = "nodenext",
Preserve = "preserve",
}
@@ -7159,6 +7160,7 @@ declare namespace ts {
ESNext = 99,
Node16 = 100,
Node18 = 101,
Node20 = 102,
NodeNext = 199,
Preserve = 200,
}
@@ -0,0 +1,42 @@
arbitraryModuleNamespaceIdentifiers_module.ts(20,7): error TS2322: Type '"expect error about someType"' is not assignable to type '"someType"'.
arbitraryModuleNamespaceIdentifiers_module.ts(24,7): error TS2322: Type '"expect error about someType"' is not assignable to type '"someType"'.
arbitraryModuleNamespaceIdentifiers_module.ts(29,7): error TS2322: Type '"expect error about otherType"' is not assignable to type '"otherType"'.
==== arbitraryModuleNamespaceIdentifiers_module.ts (3 errors) ====
const someValue = "someValue";
type someType = "someType";
export { someValue as "<X>" };
import { "<X>" as valueX } from "./arbitraryModuleNamespaceIdentifiers_module";
if (valueX !== "someValue") throw "should be someValue";
export { "<X>" as "<Y>" } from "./arbitraryModuleNamespaceIdentifiers_module";
import { "<Y>" as valueY } from "./arbitraryModuleNamespaceIdentifiers_module";
if (valueY !== "someValue") throw "should be someValue";
export * as "<Z>" from "./arbitraryModuleNamespaceIdentifiers_module";
import { "<Z>" as valueZ } from "./arbitraryModuleNamespaceIdentifiers_module";
if (valueZ["<X>"] !== "someValue") throw "should be someValue";
if (valueZ["<Y>"] !== "someValue") throw "should be someValue";
if (valueZ["<Z>"] !== valueZ) throw "should be export namespace";
export { type someType as "<A>" };
import { type "<A>" as typeA } from "./arbitraryModuleNamespaceIdentifiers_module";
const importTest: typeA = "expect error about someType";
~~~~~~~~~~
!!! error TS2322: Type '"expect error about someType"' is not assignable to type '"someType"'.
export { type "<A>" as "<B>" } from "./arbitraryModuleNamespaceIdentifiers_module";
import { type "<B>" as typeB } from "./arbitraryModuleNamespaceIdentifiers_module";
const reimportTest: typeB = "expect error about someType";
~~~~~~~~~~~~
!!! error TS2322: Type '"expect error about someType"' is not assignable to type '"someType"'.
export type * as "<C>" from "./arbitraryModuleNamespaceIdentifiers_module";
import { type "<C>" as typeC } from "./arbitraryModuleNamespaceIdentifiers_module";
export type otherType = "otherType";
const importStarTestA: typeC.otherType = "expect error about otherType";
~~~~~~~~~~~~~~~
!!! error TS2322: Type '"expect error about otherType"' is not assignable to type '"otherType"'.
@@ -0,0 +1,104 @@
//// [tests/cases/conformance/es2022/arbitraryModuleNamespaceIdentifiers/arbitraryModuleNamespaceIdentifiers_module.ts] ////
//// [arbitraryModuleNamespaceIdentifiers_module.ts]
const someValue = "someValue";
type someType = "someType";
export { someValue as "<X>" };
import { "<X>" as valueX } from "./arbitraryModuleNamespaceIdentifiers_module";
if (valueX !== "someValue") throw "should be someValue";
export { "<X>" as "<Y>" } from "./arbitraryModuleNamespaceIdentifiers_module";
import { "<Y>" as valueY } from "./arbitraryModuleNamespaceIdentifiers_module";
if (valueY !== "someValue") throw "should be someValue";
export * as "<Z>" from "./arbitraryModuleNamespaceIdentifiers_module";
import { "<Z>" as valueZ } from "./arbitraryModuleNamespaceIdentifiers_module";
if (valueZ["<X>"] !== "someValue") throw "should be someValue";
if (valueZ["<Y>"] !== "someValue") throw "should be someValue";
if (valueZ["<Z>"] !== valueZ) throw "should be export namespace";
export { type someType as "<A>" };
import { type "<A>" as typeA } from "./arbitraryModuleNamespaceIdentifiers_module";
const importTest: typeA = "expect error about someType";
export { type "<A>" as "<B>" } from "./arbitraryModuleNamespaceIdentifiers_module";
import { type "<B>" as typeB } from "./arbitraryModuleNamespaceIdentifiers_module";
const reimportTest: typeB = "expect error about someType";
export type * as "<C>" from "./arbitraryModuleNamespaceIdentifiers_module";
import { type "<C>" as typeC } from "./arbitraryModuleNamespaceIdentifiers_module";
export type otherType = "otherType";
const importStarTestA: typeC.otherType = "expect error about otherType";
//// [arbitraryModuleNamespaceIdentifiers_module.js]
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports["<Z>"] = exports["<Y>"] = exports["<X>"] = void 0;
const someValue = "someValue";
exports["<X>"] = someValue;
const arbitraryModuleNamespaceIdentifiers_module_1 = require("./arbitraryModuleNamespaceIdentifiers_module");
if (arbitraryModuleNamespaceIdentifiers_module_1["<X>"] !== "someValue")
throw "should be someValue";
var arbitraryModuleNamespaceIdentifiers_module_2 = require("./arbitraryModuleNamespaceIdentifiers_module");
Object.defineProperty(exports, "<Y>", { enumerable: true, get: function () { return arbitraryModuleNamespaceIdentifiers_module_2["<X>"]; } });
const arbitraryModuleNamespaceIdentifiers_module_3 = require("./arbitraryModuleNamespaceIdentifiers_module");
if (arbitraryModuleNamespaceIdentifiers_module_3["<Y>"] !== "someValue")
throw "should be someValue";
exports["<Z>"] = __importStar(require("./arbitraryModuleNamespaceIdentifiers_module"));
const arbitraryModuleNamespaceIdentifiers_module_4 = require("./arbitraryModuleNamespaceIdentifiers_module");
if (arbitraryModuleNamespaceIdentifiers_module_4["<Z>"]["<X>"] !== "someValue")
throw "should be someValue";
if (arbitraryModuleNamespaceIdentifiers_module_4["<Z>"]["<Y>"] !== "someValue")
throw "should be someValue";
if (arbitraryModuleNamespaceIdentifiers_module_4["<Z>"]["<Z>"] !== arbitraryModuleNamespaceIdentifiers_module_4["<Z>"])
throw "should be export namespace";
const importTest = "expect error about someType";
const reimportTest = "expect error about someType";
const importStarTestA = "expect error about otherType";
//// [arbitraryModuleNamespaceIdentifiers_module.d.ts]
declare const someValue = "someValue";
type someType = "someType";
export { someValue as "<X>" };
export { "<X>" as "<Y>" } from "./arbitraryModuleNamespaceIdentifiers_module";
export * as "<Z>" from "./arbitraryModuleNamespaceIdentifiers_module";
export { type someType as "<A>" };
export { type "<A>" as "<B>" } from "./arbitraryModuleNamespaceIdentifiers_module";
export type * as "<C>" from "./arbitraryModuleNamespaceIdentifiers_module";
export type otherType = "otherType";
@@ -0,0 +1,82 @@
//// [tests/cases/conformance/es2022/arbitraryModuleNamespaceIdentifiers/arbitraryModuleNamespaceIdentifiers_module.ts] ////
=== arbitraryModuleNamespaceIdentifiers_module.ts ===
const someValue = "someValue";
>someValue : Symbol(someValue, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 0, 5))
type someType = "someType";
>someType : Symbol(someType, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 0, 30))
export { someValue as "<X>" };
>someValue : Symbol(someValue, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 0, 5))
>"<X>" : Symbol(valueZ["<X>"], Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 3, 8))
import { "<X>" as valueX } from "./arbitraryModuleNamespaceIdentifiers_module";
>valueX : Symbol(valueX, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 4, 8))
if (valueX !== "someValue") throw "should be someValue";
>valueX : Symbol(valueX, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 4, 8))
export { "<X>" as "<Y>" } from "./arbitraryModuleNamespaceIdentifiers_module";
>"<Y>" : Symbol(valueZ["<Y>"], Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 7, 8))
import { "<Y>" as valueY } from "./arbitraryModuleNamespaceIdentifiers_module";
>valueY : Symbol(valueY, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 8, 8))
if (valueY !== "someValue") throw "should be someValue";
>valueY : Symbol(valueY, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 8, 8))
export * as "<Z>" from "./arbitraryModuleNamespaceIdentifiers_module";
>"<Z>" : Symbol(valueZ["<Z>"], Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 11, 6))
import { "<Z>" as valueZ } from "./arbitraryModuleNamespaceIdentifiers_module";
>valueZ : Symbol(valueZ, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 12, 8))
if (valueZ["<X>"] !== "someValue") throw "should be someValue";
>valueZ : Symbol(valueZ, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 12, 8))
>"<X>" : Symbol(valueZ["<X>"], Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 3, 8))
if (valueZ["<Y>"] !== "someValue") throw "should be someValue";
>valueZ : Symbol(valueZ, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 12, 8))
>"<Y>" : Symbol(valueZ["<Y>"], Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 7, 8))
if (valueZ["<Z>"] !== valueZ) throw "should be export namespace";
>valueZ : Symbol(valueZ, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 12, 8))
>"<Z>" : Symbol(valueZ["<Z>"], Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 11, 6))
>valueZ : Symbol(valueZ, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 12, 8))
export { type someType as "<A>" };
>someType : Symbol(someType, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 0, 30))
>"<A>" : Symbol(valueZ["<A>"], Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 17, 8))
import { type "<A>" as typeA } from "./arbitraryModuleNamespaceIdentifiers_module";
>typeA : Symbol(typeA, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 18, 8))
const importTest: typeA = "expect error about someType";
>importTest : Symbol(importTest, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 19, 5))
>typeA : Symbol(typeA, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 18, 8))
export { type "<A>" as "<B>" } from "./arbitraryModuleNamespaceIdentifiers_module";
>"<B>" : Symbol(valueZ["<B>"], Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 21, 8))
import { type "<B>" as typeB } from "./arbitraryModuleNamespaceIdentifiers_module";
>typeB : Symbol(typeB, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 22, 8))
const reimportTest: typeB = "expect error about someType";
>reimportTest : Symbol(reimportTest, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 23, 5))
>typeB : Symbol(typeB, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 22, 8))
export type * as "<C>" from "./arbitraryModuleNamespaceIdentifiers_module";
>"<C>" : Symbol(valueZ["<C>"], Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 25, 11))
import { type "<C>" as typeC } from "./arbitraryModuleNamespaceIdentifiers_module";
>typeC : Symbol(typeC, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 26, 8))
export type otherType = "otherType";
>otherType : Symbol(valueZ.otherType, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 26, 83))
const importStarTestA: typeC.otherType = "expect error about otherType";
>importStarTestA : Symbol(importStarTestA, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 28, 5))
>typeC : Symbol(typeC, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 26, 8))
>otherType : Symbol(valueZ.otherType, Decl(arbitraryModuleNamespaceIdentifiers_module.ts, 26, 83))
@@ -0,0 +1,151 @@
//// [tests/cases/conformance/es2022/arbitraryModuleNamespaceIdentifiers/arbitraryModuleNamespaceIdentifiers_module.ts] ////
=== arbitraryModuleNamespaceIdentifiers_module.ts ===
const someValue = "someValue";
>someValue : "someValue"
> : ^^^^^^^^^^^
>"someValue" : "someValue"
> : ^^^^^^^^^^^
type someType = "someType";
>someType : "someType"
> : ^^^^^^^^^^
export { someValue as "<X>" };
>someValue : "someValue"
> : ^^^^^^^^^^^
>"<X>" : "someValue"
> : ^^^^^^^^^^^
import { "<X>" as valueX } from "./arbitraryModuleNamespaceIdentifiers_module";
>valueX : "someValue"
> : ^^^^^^^^^^^
if (valueX !== "someValue") throw "should be someValue";
>valueX !== "someValue" : boolean
> : ^^^^^^^
>valueX : "someValue"
> : ^^^^^^^^^^^
>"someValue" : "someValue"
> : ^^^^^^^^^^^
>"should be someValue" : "should be someValue"
> : ^^^^^^^^^^^^^^^^^^^^^
export { "<X>" as "<Y>" } from "./arbitraryModuleNamespaceIdentifiers_module";
>"<Y>" : "someValue"
> : ^^^^^^^^^^^
import { "<Y>" as valueY } from "./arbitraryModuleNamespaceIdentifiers_module";
>valueY : "someValue"
> : ^^^^^^^^^^^
if (valueY !== "someValue") throw "should be someValue";
>valueY !== "someValue" : boolean
> : ^^^^^^^
>valueY : "someValue"
> : ^^^^^^^^^^^
>"someValue" : "someValue"
> : ^^^^^^^^^^^
>"should be someValue" : "should be someValue"
> : ^^^^^^^^^^^^^^^^^^^^^
export * as "<Z>" from "./arbitraryModuleNamespaceIdentifiers_module";
>"<Z>" : typeof valueZ
> : ^^^^^^^^^^^^^
import { "<Z>" as valueZ } from "./arbitraryModuleNamespaceIdentifiers_module";
>valueZ : typeof valueZ
> : ^^^^^^^^^^^^^
if (valueZ["<X>"] !== "someValue") throw "should be someValue";
>valueZ["<X>"] !== "someValue" : boolean
> : ^^^^^^^
>valueZ["<X>"] : "someValue"
> : ^^^^^^^^^^^
>valueZ : typeof valueZ
> : ^^^^^^^^^^^^^
>"<X>" : "<X>"
> : ^^^^^
>"someValue" : "someValue"
> : ^^^^^^^^^^^
>"should be someValue" : "should be someValue"
> : ^^^^^^^^^^^^^^^^^^^^^
if (valueZ["<Y>"] !== "someValue") throw "should be someValue";
>valueZ["<Y>"] !== "someValue" : boolean
> : ^^^^^^^
>valueZ["<Y>"] : "someValue"
> : ^^^^^^^^^^^
>valueZ : typeof valueZ
> : ^^^^^^^^^^^^^
>"<Y>" : "<Y>"
> : ^^^^^
>"someValue" : "someValue"
> : ^^^^^^^^^^^
>"should be someValue" : "should be someValue"
> : ^^^^^^^^^^^^^^^^^^^^^
if (valueZ["<Z>"] !== valueZ) throw "should be export namespace";
>valueZ["<Z>"] !== valueZ : boolean
> : ^^^^^^^
>valueZ["<Z>"] : typeof valueZ
> : ^^^^^^^^^^^^^
>valueZ : typeof valueZ
> : ^^^^^^^^^^^^^
>"<Z>" : "<Z>"
> : ^^^^^
>valueZ : typeof valueZ
> : ^^^^^^^^^^^^^
>"should be export namespace" : "should be export namespace"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
export { type someType as "<A>" };
>someType : any
> : ^^^
>"<A>" : any
> : ^^^
import { type "<A>" as typeA } from "./arbitraryModuleNamespaceIdentifiers_module";
>typeA : any
> : ^^^
const importTest: typeA = "expect error about someType";
>importTest : "someType"
> : ^^^^^^^^^^
>"expect error about someType" : "expect error about someType"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
export { type "<A>" as "<B>" } from "./arbitraryModuleNamespaceIdentifiers_module";
>"<B>" : any
> : ^^^
import { type "<B>" as typeB } from "./arbitraryModuleNamespaceIdentifiers_module";
>typeB : any
> : ^^^
const reimportTest: typeB = "expect error about someType";
>reimportTest : "someType"
> : ^^^^^^^^^^
>"expect error about someType" : "expect error about someType"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
export type * as "<C>" from "./arbitraryModuleNamespaceIdentifiers_module";
>"<C>" : typeof valueZ
> : ^^^^^^^^^^^^^
import { type "<C>" as typeC } from "./arbitraryModuleNamespaceIdentifiers_module";
>typeC : typeof valueZ
> : ^^^^^^^^^^^^^
export type otherType = "otherType";
>otherType : "otherType"
> : ^^^^^^^^^^^
const importStarTestA: typeC.otherType = "expect error about otherType";
>importStarTestA : "otherType"
> : ^^^^^^^^^^^
>typeC : any
> : ^^^
>"expect error about otherType" : "expect error about otherType"
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -12,8 +12,8 @@ awaitInNonAsyncFunction.ts(30,9): error TS1103: 'for await' loops are only allow
awaitInNonAsyncFunction.ts(31,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules.
awaitInNonAsyncFunction.ts(34,7): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules.
awaitInNonAsyncFunction.ts(35,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules.
awaitInNonAsyncFunction.ts(39,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitInNonAsyncFunction.ts(40,1): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitInNonAsyncFunction.ts(39,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitInNonAsyncFunction.ts(40,1): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
==== awaitInNonAsyncFunction.ts (16 errors) ====
@@ -97,7 +97,7 @@ awaitInNonAsyncFunction.ts(40,1): error TS1378: Top-level 'await' expressions ar
for await (const _ of []);
~~~~~
!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
await null;
~~~~~
!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
@@ -1,24 +1,24 @@
awaitUsingDeclarations.1.ts(1,1): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(36,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(41,9): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(45,9): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(52,13): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(57,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(60,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(63,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(67,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(70,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(74,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(79,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(85,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(90,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(94,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(1,1): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(36,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(41,9): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(45,9): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(52,13): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(57,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(60,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(63,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(67,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(70,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(74,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(79,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(85,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(90,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(94,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
==== awaitUsingDeclarations.1.ts (15 errors) ====
await using d1 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
async function af() {
await using d3 = { async [Symbol.asyncDispose]() {} };
@@ -55,20 +55,20 @@ awaitUsingDeclarations.1.ts(94,5): error TS2854: Top-level 'await using' stateme
{
await using d19 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
}
switch (Math.random()) {
case 0:
await using d20 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
break;
case 1:
await using d21 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
break;
}
@@ -77,48 +77,48 @@ awaitUsingDeclarations.1.ts(94,5): error TS2854: Top-level 'await using' stateme
case 0:
await using d22 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
break;
}
try {
await using d23 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
}
catch {
await using d24 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
}
finally {
await using d25 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
}
if (true) {
await using d26 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
}
else {
await using d27 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
}
while (true) {
await using d28 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
break;
}
do {
await using d29 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
break;
}
while (true);
@@ -126,20 +126,20 @@ awaitUsingDeclarations.1.ts(94,5): error TS2854: Top-level 'await using' stateme
for (;;) {
await using d30 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
break;
}
for (const x in {}) {
await using d31 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
}
for (const x of []) {
await using d32 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
}
export {};
@@ -1,24 +1,24 @@
awaitUsingDeclarations.1.ts(1,1): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(36,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(41,9): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(45,9): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(52,13): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(57,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(60,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(63,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(67,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(70,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(74,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(79,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(85,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(90,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(94,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(1,1): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(36,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(41,9): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(45,9): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(52,13): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(57,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(60,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(63,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(67,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(70,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(74,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(79,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(85,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(90,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.1.ts(94,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
==== awaitUsingDeclarations.1.ts (15 errors) ====
await using d1 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
async function af() {
await using d3 = { async [Symbol.asyncDispose]() {} };
@@ -55,20 +55,20 @@ awaitUsingDeclarations.1.ts(94,5): error TS2854: Top-level 'await using' stateme
{
await using d19 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
}
switch (Math.random()) {
case 0:
await using d20 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
break;
case 1:
await using d21 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
break;
}
@@ -77,48 +77,48 @@ awaitUsingDeclarations.1.ts(94,5): error TS2854: Top-level 'await using' stateme
case 0:
await using d22 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
break;
}
try {
await using d23 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
}
catch {
await using d24 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
}
finally {
await using d25 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
}
if (true) {
await using d26 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
}
else {
await using d27 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
}
while (true) {
await using d28 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
break;
}
do {
await using d29 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
break;
}
while (true);
@@ -126,20 +126,20 @@ awaitUsingDeclarations.1.ts(94,5): error TS2854: Top-level 'await using' stateme
for (;;) {
await using d30 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
break;
}
for (const x in {}) {
await using d31 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
}
for (const x of []) {
await using d32 = { async [Symbol.asyncDispose]() {} };
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
}
export {};
@@ -1,11 +1,11 @@
awaitUsingDeclarations.2.ts(2,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.2.ts(2,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
==== awaitUsingDeclarations.2.ts (1 errors) ====
{
await using d1 = { async [Symbol.asyncDispose]() {} },
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
d2 = { async [Symbol.asyncDispose]() {} };
}
@@ -1,11 +1,11 @@
awaitUsingDeclarations.2.ts(2,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.2.ts(2,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
==== awaitUsingDeclarations.2.ts (1 errors) ====
{
await using d1 = { async [Symbol.asyncDispose]() {} },
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
d2 = { async [Symbol.asyncDispose]() {} };
}
@@ -1,11 +1,11 @@
awaitUsingDeclarations.3.ts(2,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.3.ts(2,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
==== awaitUsingDeclarations.3.ts (1 errors) ====
{
await using d1 = { async [Symbol.asyncDispose]() {} },
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
d2 = null,
d3 = undefined,
d4 = { [Symbol.dispose]() {} };
@@ -1,11 +1,11 @@
awaitUsingDeclarations.3.ts(2,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarations.3.ts(2,5): error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
==== awaitUsingDeclarations.3.ts (1 errors) ====
{
await using d1 = { async [Symbol.asyncDispose]() {} },
~~~~~
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS2854: Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
d2 = null,
d3 = undefined,
d4 = { [Symbol.dispose]() {} };
@@ -1,4 +1,4 @@
awaitUsingDeclarationsInForAwaitOf.3.ts(5,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarationsInForAwaitOf.3.ts(5,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
awaitUsingDeclarationsInForAwaitOf.3.ts(5,23): error TS1123: Variable declaration list cannot be empty.
awaitUsingDeclarationsInForAwaitOf.3.ts(8,25): error TS1123: Variable declaration list cannot be empty.
@@ -10,7 +10,7 @@ awaitUsingDeclarationsInForAwaitOf.3.ts(8,25): error TS1123: Variable declaratio
for await (await using of x);
~~~~~
!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS1123: Variable declaration list cannot be empty.
@@ -0,0 +1,20 @@
error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node20'.
!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
!!! error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node20'.
==== /app/test.ts (0 errors) ====
import { test } from '../lib';
==== /lib/package.json (0 errors) ====
{
"main": "./cjs/index.js"
}
==== /lib/cjs/index.js (0 errors) ====
export function test() {}
==== /lib/cjs/index.d.ts (0 errors) ====
export function test(): void;
@@ -0,0 +1,879 @@
[
"======== Resolving module '../lib' from '/app/test.ts'. ========",
"Explicitly specified module resolution kind: 'Bundler'.",
"Resolving in CJS mode with conditions 'import', 'types'.",
"Loading module as file / folder, candidate module location '/lib', target file types: TypeScript, JavaScript, Declaration, JSON.",
"File '/lib.ts' does not exist.",
"File '/lib.tsx' does not exist.",
"File '/lib.d.ts' does not exist.",
"File '/lib.js' does not exist.",
"File '/lib.jsx' does not exist.",
"Found 'package.json' at '/lib/package.json'.",
"'package.json' does not have a 'typesVersions' field.",
"'package.json' does not have a 'typings' field.",
"'package.json' does not have a 'types' field.",
"'package.json' has 'main' field './cjs/index.js' that references '/lib/cjs/index.js'.",
"File name '/lib/cjs/index.js' has a '.js' extension - stripping it.",
"File '/lib/cjs/index.ts' does not exist.",
"File '/lib/cjs/index.tsx' does not exist.",
"File '/lib/cjs/index.d.ts' exists - use it as a name resolution result.",
"======== Module name '../lib' was successfully resolved to '/lib/cjs/index.d.ts'. ========",
"======== Resolving module '@typescript/lib-es2023' from '/.src/__lib_node_modules_lookup_lib.es2023.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2023' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2023'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2023'",
"Loading module '@typescript/lib-es2023' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2023' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2022' from '/.src/__lib_node_modules_lookup_lib.es2022.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2022' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2022'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2022'",
"Loading module '@typescript/lib-es2022' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2022' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2021' from '/.src/__lib_node_modules_lookup_lib.es2021.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2021' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2021'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2021'",
"Loading module '@typescript/lib-es2021' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2021' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2020' from '/.src/__lib_node_modules_lookup_lib.es2020.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2020' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2020'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2020'",
"Loading module '@typescript/lib-es2020' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2020' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2019' from '/.src/__lib_node_modules_lookup_lib.es2019.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2019' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2019'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2019'",
"Loading module '@typescript/lib-es2019' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2019' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2018' from '/.src/__lib_node_modules_lookup_lib.es2018.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2018' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2018'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2018'",
"Loading module '@typescript/lib-es2018' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2018' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2017' from '/.src/__lib_node_modules_lookup_lib.es2017.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2017' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2017'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2017'",
"Loading module '@typescript/lib-es2017' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2017' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2016' from '/.src/__lib_node_modules_lookup_lib.es2016.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2016' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2016'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2016'",
"Loading module '@typescript/lib-es2016' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2016' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2015' from '/.src/__lib_node_modules_lookup_lib.es2015.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2015' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015'",
"Loading module '@typescript/lib-es2015' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2015' was not resolved. ========",
"======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es5'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es5'",
"Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es5' was not resolved. ========",
"======== Resolving module '@typescript/lib-decorators' from '/.src/__lib_node_modules_lookup_lib.decorators.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-decorators'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-decorators'",
"Loading module '@typescript/lib-decorators' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-decorators' was not resolved. ========",
"======== Resolving module '@typescript/lib-decorators/legacy' from '/.src/__lib_node_modules_lookup_lib.decorators.legacy.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-decorators/legacy'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-decorators/legacy'",
"Loading module '@typescript/lib-decorators/legacy' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-decorators/legacy' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2015/core' from '/.src/__lib_node_modules_lookup_lib.es2015.core.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2015/core' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015/core'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015/core'",
"Loading module '@typescript/lib-es2015/core' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2015/core' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2015/collection' from '/.src/__lib_node_modules_lookup_lib.es2015.collection.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2015/collection' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015/collection'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015/collection'",
"Loading module '@typescript/lib-es2015/collection' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2015/collection' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2015/iterable' from '/.src/__lib_node_modules_lookup_lib.es2015.iterable.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2015/iterable' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015/iterable'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015/iterable'",
"Loading module '@typescript/lib-es2015/iterable' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2015/iterable' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2015/symbol' from '/.src/__lib_node_modules_lookup_lib.es2015.symbol.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2015/symbol' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015/symbol'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015/symbol'",
"Loading module '@typescript/lib-es2015/symbol' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2015/symbol' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2015/generator' from '/.src/__lib_node_modules_lookup_lib.es2015.generator.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2015/generator' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015/generator'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015/generator'",
"Loading module '@typescript/lib-es2015/generator' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2015/generator' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2015/promise' from '/.src/__lib_node_modules_lookup_lib.es2015.promise.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2015/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015/promise'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015/promise'",
"Loading module '@typescript/lib-es2015/promise' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2015/promise' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2015/proxy' from '/.src/__lib_node_modules_lookup_lib.es2015.proxy.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2015/proxy' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015/proxy'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015/proxy'",
"Loading module '@typescript/lib-es2015/proxy' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2015/proxy' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2015/reflect' from '/.src/__lib_node_modules_lookup_lib.es2015.reflect.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2015/reflect' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015/reflect'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015/reflect'",
"Loading module '@typescript/lib-es2015/reflect' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2015/reflect' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2015/symbol-wellknown' from '/.src/__lib_node_modules_lookup_lib.es2015.symbol.wellknown.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2015/symbol-wellknown' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015/symbol-wellknown'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2015/symbol-wellknown'",
"Loading module '@typescript/lib-es2015/symbol-wellknown' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2015/symbol-wellknown' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2016/array-include' from '/.src/__lib_node_modules_lookup_lib.es2016.array.include.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2016/array-include' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2016/array-include'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2016/array-include'",
"Loading module '@typescript/lib-es2016/array-include' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2016/array-include' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2016/intl' from '/.src/__lib_node_modules_lookup_lib.es2016.intl.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2016/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2016/intl'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2016/intl'",
"Loading module '@typescript/lib-es2016/intl' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2016/intl' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2017/arraybuffer' from '/.src/__lib_node_modules_lookup_lib.es2017.arraybuffer.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2017/arraybuffer' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2017/arraybuffer'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2017/arraybuffer'",
"Loading module '@typescript/lib-es2017/arraybuffer' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2017/arraybuffer' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2017/date' from '/.src/__lib_node_modules_lookup_lib.es2017.date.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2017/date' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2017/date'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2017/date'",
"Loading module '@typescript/lib-es2017/date' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2017/date' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2017/intl' from '/.src/__lib_node_modules_lookup_lib.es2017.intl.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2017/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2017/intl'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2017/intl'",
"Loading module '@typescript/lib-es2017/intl' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2017/intl' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2017/object' from '/.src/__lib_node_modules_lookup_lib.es2017.object.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2017/object' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2017/object'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2017/object'",
"Loading module '@typescript/lib-es2017/object' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2017/object' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2017/sharedmemory' from '/.src/__lib_node_modules_lookup_lib.es2017.sharedmemory.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2017/sharedmemory' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2017/sharedmemory'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2017/sharedmemory'",
"Loading module '@typescript/lib-es2017/sharedmemory' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2017/sharedmemory' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2017/string' from '/.src/__lib_node_modules_lookup_lib.es2017.string.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2017/string' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2017/string'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2017/string'",
"Loading module '@typescript/lib-es2017/string' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2017/string' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2017/typedarrays' from '/.src/__lib_node_modules_lookup_lib.es2017.typedarrays.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2017/typedarrays' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2017/typedarrays'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2017/typedarrays'",
"Loading module '@typescript/lib-es2017/typedarrays' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2017/typedarrays' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2018/asynciterable' from '/.src/__lib_node_modules_lookup_lib.es2018.asynciterable.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2018/asynciterable' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2018/asynciterable'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2018/asynciterable'",
"Loading module '@typescript/lib-es2018/asynciterable' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2018/asynciterable' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2018/asyncgenerator' from '/.src/__lib_node_modules_lookup_lib.es2018.asyncgenerator.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2018/asyncgenerator' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2018/asyncgenerator'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2018/asyncgenerator'",
"Loading module '@typescript/lib-es2018/asyncgenerator' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2018/asyncgenerator' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2018/promise' from '/.src/__lib_node_modules_lookup_lib.es2018.promise.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2018/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2018/promise'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2018/promise'",
"Loading module '@typescript/lib-es2018/promise' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2018/promise' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2018/regexp' from '/.src/__lib_node_modules_lookup_lib.es2018.regexp.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2018/regexp' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2018/regexp'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2018/regexp'",
"Loading module '@typescript/lib-es2018/regexp' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2018/regexp' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2018/intl' from '/.src/__lib_node_modules_lookup_lib.es2018.intl.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2018/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2018/intl'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2018/intl'",
"Loading module '@typescript/lib-es2018/intl' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2018/intl' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2019/array' from '/.src/__lib_node_modules_lookup_lib.es2019.array.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2019/array' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2019/array'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2019/array'",
"Loading module '@typescript/lib-es2019/array' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2019/array' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2019/object' from '/.src/__lib_node_modules_lookup_lib.es2019.object.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2019/object' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2019/object'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2019/object'",
"Loading module '@typescript/lib-es2019/object' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2019/object' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2019/string' from '/.src/__lib_node_modules_lookup_lib.es2019.string.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2019/string' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2019/string'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2019/string'",
"Loading module '@typescript/lib-es2019/string' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2019/string' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2019/symbol' from '/.src/__lib_node_modules_lookup_lib.es2019.symbol.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2019/symbol' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2019/symbol'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2019/symbol'",
"Loading module '@typescript/lib-es2019/symbol' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2019/symbol' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2019/intl' from '/.src/__lib_node_modules_lookup_lib.es2019.intl.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2019/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2019/intl'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2019/intl'",
"Loading module '@typescript/lib-es2019/intl' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2019/intl' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2020/bigint' from '/.src/__lib_node_modules_lookup_lib.es2020.bigint.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2020/bigint' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2020/bigint'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2020/bigint'",
"Loading module '@typescript/lib-es2020/bigint' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2020/bigint' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2020/intl' from '/.src/__lib_node_modules_lookup_lib.es2020.intl.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2020/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2020/intl'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2020/intl'",
"Loading module '@typescript/lib-es2020/intl' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2020/intl' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2020/date' from '/.src/__lib_node_modules_lookup_lib.es2020.date.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2020/date' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2020/date'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2020/date'",
"Loading module '@typescript/lib-es2020/date' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2020/date' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2020/number' from '/.src/__lib_node_modules_lookup_lib.es2020.number.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2020/number' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2020/number'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2020/number'",
"Loading module '@typescript/lib-es2020/number' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2020/number' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2020/promise' from '/.src/__lib_node_modules_lookup_lib.es2020.promise.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2020/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2020/promise'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2020/promise'",
"Loading module '@typescript/lib-es2020/promise' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2020/promise' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2020/sharedmemory' from '/.src/__lib_node_modules_lookup_lib.es2020.sharedmemory.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2020/sharedmemory' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2020/sharedmemory'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2020/sharedmemory'",
"Loading module '@typescript/lib-es2020/sharedmemory' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2020/sharedmemory' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2020/string' from '/.src/__lib_node_modules_lookup_lib.es2020.string.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2020/string' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2020/string'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2020/string'",
"Loading module '@typescript/lib-es2020/string' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2020/string' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2020/symbol-wellknown' from '/.src/__lib_node_modules_lookup_lib.es2020.symbol.wellknown.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2020/symbol-wellknown' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2020/symbol-wellknown'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2020/symbol-wellknown'",
"Loading module '@typescript/lib-es2020/symbol-wellknown' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2020/symbol-wellknown' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2021/promise' from '/.src/__lib_node_modules_lookup_lib.es2021.promise.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2021/promise' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2021/promise'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2021/promise'",
"Loading module '@typescript/lib-es2021/promise' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2021/promise' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2021/string' from '/.src/__lib_node_modules_lookup_lib.es2021.string.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2021/string' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2021/string'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2021/string'",
"Loading module '@typescript/lib-es2021/string' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2021/string' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2021/weakref' from '/.src/__lib_node_modules_lookup_lib.es2021.weakref.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2021/weakref' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2021/weakref'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2021/weakref'",
"Loading module '@typescript/lib-es2021/weakref' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2021/weakref' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2021/intl' from '/.src/__lib_node_modules_lookup_lib.es2021.intl.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2021/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2021/intl'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2021/intl'",
"Loading module '@typescript/lib-es2021/intl' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2021/intl' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2022/array' from '/.src/__lib_node_modules_lookup_lib.es2022.array.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2022/array' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2022/array'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2022/array'",
"Loading module '@typescript/lib-es2022/array' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2022/array' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2022/error' from '/.src/__lib_node_modules_lookup_lib.es2022.error.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2022/error' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2022/error'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2022/error'",
"Loading module '@typescript/lib-es2022/error' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2022/error' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2022/intl' from '/.src/__lib_node_modules_lookup_lib.es2022.intl.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2022/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2022/intl'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2022/intl'",
"Loading module '@typescript/lib-es2022/intl' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2022/intl' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2022/object' from '/.src/__lib_node_modules_lookup_lib.es2022.object.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2022/object' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2022/object'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2022/object'",
"Loading module '@typescript/lib-es2022/object' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2022/object' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2022/regexp' from '/.src/__lib_node_modules_lookup_lib.es2022.regexp.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2022/regexp' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2022/regexp'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2022/regexp'",
"Loading module '@typescript/lib-es2022/regexp' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2022/regexp' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2022/string' from '/.src/__lib_node_modules_lookup_lib.es2022.string.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2022/string' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2022/string'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2022/string'",
"Loading module '@typescript/lib-es2022/string' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2022/string' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2023/array' from '/.src/__lib_node_modules_lookup_lib.es2023.array.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2023/array' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2023/array'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2023/array'",
"Loading module '@typescript/lib-es2023/array' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2023/array' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2023/collection' from '/.src/__lib_node_modules_lookup_lib.es2023.collection.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2023/collection' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2023/collection'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2023/collection'",
"Loading module '@typescript/lib-es2023/collection' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2023/collection' was not resolved. ========",
"======== Resolving module '@typescript/lib-es2023/intl' from '/.src/__lib_node_modules_lookup_lib.es2023.intl.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-es2023/intl' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2023/intl'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-es2023/intl'",
"Loading module '@typescript/lib-es2023/intl' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-es2023/intl' was not resolved. ========",
"======== Resolving module '@typescript/lib-dom' from '/.src/__lib_node_modules_lookup_lib.dom.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-dom'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-dom'",
"Loading module '@typescript/lib-dom' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-dom' was not resolved. ========",
"======== Resolving module '@typescript/lib-webworker/importscripts' from '/.src/__lib_node_modules_lookup_lib.webworker.importscripts.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-webworker/importscripts'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-webworker/importscripts'",
"Loading module '@typescript/lib-webworker/importscripts' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-webworker/importscripts' was not resolved. ========",
"======== Resolving module '@typescript/lib-scripthost' from '/.src/__lib_node_modules_lookup_lib.scripthost.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-scripthost'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-scripthost'",
"Loading module '@typescript/lib-scripthost' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-scripthost' was not resolved. ========",
"======== Resolving module '@typescript/lib-dom/iterable' from '/.src/__lib_node_modules_lookup_lib.dom.iterable.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-dom/iterable' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-dom/iterable'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-dom/iterable'",
"Loading module '@typescript/lib-dom/iterable' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-dom/iterable' was not resolved. ========",
"======== Resolving module '@typescript/lib-dom/asynciterable' from '/.src/__lib_node_modules_lookup_lib.dom.asynciterable.d.ts__.ts'. ========",
"Explicitly specified module resolution kind: 'Node10'.",
"Loading module '@typescript/lib-dom/asynciterable' from 'node_modules' folder, target file types: TypeScript, Declaration.",
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-dom/asynciterable'",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"Scoped package detected, looking in 'typescript__lib-dom/asynciterable'",
"Loading module '@typescript/lib-dom/asynciterable' from 'node_modules' folder, target file types: JavaScript.",
"Searching all ancestor node_modules directories for fallback extensions: JavaScript.",
"Directory '/.src/node_modules' does not exist, skipping all lookups in it.",
"Directory '/node_modules' does not exist, skipping all lookups in it.",
"======== Module name '@typescript/lib-dom/asynciterable' was not resolved. ========"
]
@@ -4,7 +4,7 @@
"======== Resolving module '../lib' from '/app/test.ts'. ========",
"Explicitly specified module resolution kind: 'NodeNext'.",
"Resolving in CJS mode with conditions 'require', 'types', 'node'.",
"Loading module as file / folder, candidate module location '/lib', target file types: TypeScript, JavaScript, Declaration.",
"Loading module as file / folder, candidate module location '/lib', target file types: TypeScript, JavaScript, Declaration, JSON.",
"File '/lib.ts' does not exist.",
"File '/lib.tsx' does not exist.",
"File '/lib.d.ts' does not exist.",
@@ -0,0 +1,12 @@
index.ts(1,22): error TS2876: This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "./foo.ts/index.ts".
==== index.ts (1 errors) ====
import foo = require("./foo.ts"); // Error
~~~~~~~~~~
!!! error TS2876: This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "./foo.ts/index.ts".
import type _foo = require("./foo.ts"); // Ok
==== foo.ts/index.ts (0 errors) ====
export = {};
@@ -0,0 +1,17 @@
//// [tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/cjsErrors.ts] ////
//// [index.ts]
export = {};
//// [index.ts]
import foo = require("./foo.ts"); // Error
import type _foo = require("./foo.ts"); // Ok
//// [index.js]
"use strict";
module.exports = {};
//// [index.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const foo = require("./foo.js"); // Error
@@ -7,4 +7,4 @@ FileNames::
0.ts
Errors::
error TS6044: Compiler option 'module' expects an argument.
error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'node18', 'nodenext', 'preserve'.
error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'node18', 'node20', 'nodenext', 'preserve'.
@@ -25,5 +25,5 @@ CompilerOptions::
"configFilePath": "/apath/tsconfig.json"
}
Errors::
error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'node18', 'nodenext', 'preserve'.
error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'node18', 'node20', 'nodenext', 'preserve'.
@@ -25,7 +25,7 @@ CompilerOptions::
"configFilePath": "/apath/tsconfig.json"
}
Errors::
tsconfig.json:3:15 - error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'node18', 'nodenext', 'preserve'.
tsconfig.json:3:15 - error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'node18', 'node20', 'nodenext', 'preserve'.
3 "module": "",
   ~~
@@ -8,6 +8,7 @@
"allowSyntheticDefaultImports": true,
"resolvePackageJsonExports": true,
"resolvePackageJsonImports": true,
"resolveJsonModule": true,
"useDefineForClassFields": true
}
}
@@ -0,0 +1,89 @@
main.ts(1,18): error TS2307: Cannot find module './file.js' or its corresponding type declarations.
main.ts(2,18): error TS2307: Cannot find module './file.jsx' or its corresponding type declarations.
main.ts(3,18): error TS2307: Cannot find module './file.ts' or its corresponding type declarations.
main.ts(4,18): error TS2307: Cannot find module './file.tsx' or its corresponding type declarations.
main.ts(5,18): error TS2307: Cannot find module './file.mjs' or its corresponding type declarations.
main.ts(6,18): error TS2307: Cannot find module './file.cjs' or its corresponding type declarations.
main.ts(7,18): error TS2307: Cannot find module './file.mts' or its corresponding type declarations.
main.ts(8,18): error TS2307: Cannot find module './file.cts' or its corresponding type declarations.
main.ts(9,18): error TS2307: Cannot find module './file.d.ts' or its corresponding type declarations.
main.ts(10,19): error TS2307: Cannot find module './file.d.cts' or its corresponding type declarations.
main.ts(11,19): error TS2307: Cannot find module './file.d.mts' or its corresponding type declarations.
main.ts(12,19): error TS2307: Cannot find module './file.d.json.ts' or its corresponding type declarations.
==== package.json (0 errors) ====
{"type": "module"}
==== main.ts (12 errors) ====
import def1 from "./file.js";
~~~~~~~~~~~
!!! error TS2307: Cannot find module './file.js' or its corresponding type declarations.
import def2 from "./file.jsx";
~~~~~~~~~~~~
!!! error TS2307: Cannot find module './file.jsx' or its corresponding type declarations.
import def3 from "./file.ts";
~~~~~~~~~~~
!!! error TS2307: Cannot find module './file.ts' or its corresponding type declarations.
import def4 from "./file.tsx";
~~~~~~~~~~~~
!!! error TS2307: Cannot find module './file.tsx' or its corresponding type declarations.
import def5 from "./file.mjs";
~~~~~~~~~~~~
!!! error TS2307: Cannot find module './file.mjs' or its corresponding type declarations.
import def6 from "./file.cjs";
~~~~~~~~~~~~
!!! error TS2307: Cannot find module './file.cjs' or its corresponding type declarations.
import def7 from "./file.mts";
~~~~~~~~~~~~
!!! error TS2307: Cannot find module './file.mts' or its corresponding type declarations.
import def8 from "./file.cts";
~~~~~~~~~~~~
!!! error TS2307: Cannot find module './file.cts' or its corresponding type declarations.
import def9 from "./file.d.ts";
~~~~~~~~~~~~~
!!! error TS2307: Cannot find module './file.d.ts' or its corresponding type declarations.
import def10 from "./file.d.cts";
~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module './file.d.cts' or its corresponding type declarations.
import def11 from "./file.d.mts";
~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module './file.d.mts' or its corresponding type declarations.
import def12 from "./file.d.json.ts";
~~~~~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module './file.d.json.ts' or its corresponding type declarations.
==== file.d.js.ts (0 errors) ====
declare var bad: "bad1";
export default bad;
==== file.d.jsx.ts (0 errors) ====
declare var bad: "bad2";
export default bad;
==== file.d.ts.ts (0 errors) ====
declare var bad: "bad3";
export default bad;
==== file.d.tsx.ts (0 errors) ====
declare var bad: "bad4";
export default bad;
==== file.d.mjs.ts (0 errors) ====
declare var bad: "bad5";
export default bad;
==== file.d.cjs.ts (0 errors) ====
declare var bad: "bad6";
export default bad;
==== file.d.mts.ts (0 errors) ====
declare var bad: "bad7";
export default bad;
==== file.d.cts.ts (0 errors) ====
declare var bad: "bad8";
export default bad;
==== file.d.d.ts.ts (0 errors) ====
declare var bad: "bad9";
export default bad;
==== file.d.d.mts.ts (0 errors) ====
declare var bad: "bad10";
export default bad;
==== file.d.d.cts.ts (0 errors) ====
declare var bad: "bad11";
export default bad;
==== file.d.d.json.ts (0 errors) ====
declare var bad: "bad12";
export default bad;
@@ -0,0 +1,56 @@
//// [tests/cases/conformance/nonjsExtensions/declarationFileForTsJsImport.ts] ////
//// [package.json]
{"type": "module"}
//// [main.ts]
import def1 from "./file.js";
import def2 from "./file.jsx";
import def3 from "./file.ts";
import def4 from "./file.tsx";
import def5 from "./file.mjs";
import def6 from "./file.cjs";
import def7 from "./file.mts";
import def8 from "./file.cts";
import def9 from "./file.d.ts";
import def10 from "./file.d.cts";
import def11 from "./file.d.mts";
import def12 from "./file.d.json.ts";
//// [file.d.js.ts]
declare var bad: "bad1";
export default bad;
//// [file.d.jsx.ts]
declare var bad: "bad2";
export default bad;
//// [file.d.ts.ts]
declare var bad: "bad3";
export default bad;
//// [file.d.tsx.ts]
declare var bad: "bad4";
export default bad;
//// [file.d.mjs.ts]
declare var bad: "bad5";
export default bad;
//// [file.d.cjs.ts]
declare var bad: "bad6";
export default bad;
//// [file.d.mts.ts]
declare var bad: "bad7";
export default bad;
//// [file.d.cts.ts]
declare var bad: "bad8";
export default bad;
//// [file.d.d.ts.ts]
declare var bad: "bad9";
export default bad;
//// [file.d.d.mts.ts]
declare var bad: "bad10";
export default bad;
//// [file.d.d.cts.ts]
declare var bad: "bad11";
export default bad;
//// [file.d.d.json.ts]
declare var bad: "bad12";
export default bad;
//// [main.js]
export {};
@@ -0,0 +1,123 @@
//// [tests/cases/conformance/nonjsExtensions/declarationFileForTsJsImport.ts] ////
=== main.ts ===
import def1 from "./file.js";
>def1 : Symbol(def1, Decl(main.ts, 0, 6))
import def2 from "./file.jsx";
>def2 : Symbol(def2, Decl(main.ts, 1, 6))
import def3 from "./file.ts";
>def3 : Symbol(def3, Decl(main.ts, 2, 6))
import def4 from "./file.tsx";
>def4 : Symbol(def4, Decl(main.ts, 3, 6))
import def5 from "./file.mjs";
>def5 : Symbol(def5, Decl(main.ts, 4, 6))
import def6 from "./file.cjs";
>def6 : Symbol(def6, Decl(main.ts, 5, 6))
import def7 from "./file.mts";
>def7 : Symbol(def7, Decl(main.ts, 6, 6))
import def8 from "./file.cts";
>def8 : Symbol(def8, Decl(main.ts, 7, 6))
import def9 from "./file.d.ts";
>def9 : Symbol(def9, Decl(main.ts, 8, 6))
import def10 from "./file.d.cts";
>def10 : Symbol(def10, Decl(main.ts, 9, 6))
import def11 from "./file.d.mts";
>def11 : Symbol(def11, Decl(main.ts, 10, 6))
import def12 from "./file.d.json.ts";
>def12 : Symbol(def12, Decl(main.ts, 11, 6))
=== file.d.js.ts ===
declare var bad: "bad1";
>bad : Symbol(bad, Decl(file.d.js.ts, 0, 11))
export default bad;
>bad : Symbol(bad, Decl(file.d.js.ts, 0, 11))
=== file.d.jsx.ts ===
declare var bad: "bad2";
>bad : Symbol(bad, Decl(file.d.jsx.ts, 0, 11))
export default bad;
>bad : Symbol(bad, Decl(file.d.jsx.ts, 0, 11))
=== file.d.ts.ts ===
declare var bad: "bad3";
>bad : Symbol(bad, Decl(file.d.ts.ts, 0, 11))
export default bad;
>bad : Symbol(bad, Decl(file.d.ts.ts, 0, 11))
=== file.d.tsx.ts ===
declare var bad: "bad4";
>bad : Symbol(bad, Decl(file.d.tsx.ts, 0, 11))
export default bad;
>bad : Symbol(bad, Decl(file.d.tsx.ts, 0, 11))
=== file.d.mjs.ts ===
declare var bad: "bad5";
>bad : Symbol(bad, Decl(file.d.mjs.ts, 0, 11))
export default bad;
>bad : Symbol(bad, Decl(file.d.mjs.ts, 0, 11))
=== file.d.cjs.ts ===
declare var bad: "bad6";
>bad : Symbol(bad, Decl(file.d.cjs.ts, 0, 11))
export default bad;
>bad : Symbol(bad, Decl(file.d.cjs.ts, 0, 11))
=== file.d.mts.ts ===
declare var bad: "bad7";
>bad : Symbol(bad, Decl(file.d.mts.ts, 0, 11))
export default bad;
>bad : Symbol(bad, Decl(file.d.mts.ts, 0, 11))
=== file.d.cts.ts ===
declare var bad: "bad8";
>bad : Symbol(bad, Decl(file.d.cts.ts, 0, 11))
export default bad;
>bad : Symbol(bad, Decl(file.d.cts.ts, 0, 11))
=== file.d.d.ts.ts ===
declare var bad: "bad9";
>bad : Symbol(bad, Decl(file.d.d.ts.ts, 0, 11))
export default bad;
>bad : Symbol(bad, Decl(file.d.d.ts.ts, 0, 11))
=== file.d.d.mts.ts ===
declare var bad: "bad10";
>bad : Symbol(bad, Decl(file.d.d.mts.ts, 0, 11))
export default bad;
>bad : Symbol(bad, Decl(file.d.d.mts.ts, 0, 11))
=== file.d.d.cts.ts ===
declare var bad: "bad11";
>bad : Symbol(bad, Decl(file.d.d.cts.ts, 0, 11))
export default bad;
>bad : Symbol(bad, Decl(file.d.d.cts.ts, 0, 11))
=== file.d.d.json.ts ===
declare var bad: "bad12";
>bad : Symbol(bad, Decl(file.d.d.json.ts, 0, 11))
export default bad;
>bad : Symbol(bad, Decl(file.d.d.json.ts, 0, 11))
@@ -0,0 +1,159 @@
//// [tests/cases/conformance/nonjsExtensions/declarationFileForTsJsImport.ts] ////
=== main.ts ===
import def1 from "./file.js";
>def1 : any
> : ^^^
import def2 from "./file.jsx";
>def2 : any
> : ^^^
import def3 from "./file.ts";
>def3 : any
> : ^^^
import def4 from "./file.tsx";
>def4 : any
> : ^^^
import def5 from "./file.mjs";
>def5 : any
> : ^^^
import def6 from "./file.cjs";
>def6 : any
> : ^^^
import def7 from "./file.mts";
>def7 : any
> : ^^^
import def8 from "./file.cts";
>def8 : any
> : ^^^
import def9 from "./file.d.ts";
>def9 : any
> : ^^^
import def10 from "./file.d.cts";
>def10 : any
> : ^^^
import def11 from "./file.d.mts";
>def11 : any
> : ^^^
import def12 from "./file.d.json.ts";
>def12 : any
> : ^^^
=== file.d.js.ts ===
declare var bad: "bad1";
>bad : "bad1"
> : ^^^^^^
export default bad;
>bad : "bad1"
> : ^^^^^^
=== file.d.jsx.ts ===
declare var bad: "bad2";
>bad : "bad2"
> : ^^^^^^
export default bad;
>bad : "bad2"
> : ^^^^^^
=== file.d.ts.ts ===
declare var bad: "bad3";
>bad : "bad3"
> : ^^^^^^
export default bad;
>bad : "bad3"
> : ^^^^^^
=== file.d.tsx.ts ===
declare var bad: "bad4";
>bad : "bad4"
> : ^^^^^^
export default bad;
>bad : "bad4"
> : ^^^^^^
=== file.d.mjs.ts ===
declare var bad: "bad5";
>bad : "bad5"
> : ^^^^^^
export default bad;
>bad : "bad5"
> : ^^^^^^
=== file.d.cjs.ts ===
declare var bad: "bad6";
>bad : "bad6"
> : ^^^^^^
export default bad;
>bad : "bad6"
> : ^^^^^^
=== file.d.mts.ts ===
declare var bad: "bad7";
>bad : "bad7"
> : ^^^^^^
export default bad;
>bad : "bad7"
> : ^^^^^^
=== file.d.cts.ts ===
declare var bad: "bad8";
>bad : "bad8"
> : ^^^^^^
export default bad;
>bad : "bad8"
> : ^^^^^^
=== file.d.d.ts.ts ===
declare var bad: "bad9";
>bad : "bad9"
> : ^^^^^^
export default bad;
>bad : "bad9"
> : ^^^^^^
=== file.d.d.mts.ts ===
declare var bad: "bad10";
>bad : "bad10"
> : ^^^^^^^
export default bad;
>bad : "bad10"
> : ^^^^^^^
=== file.d.d.cts.ts ===
declare var bad: "bad11";
>bad : "bad11"
> : ^^^^^^^
export default bad;
>bad : "bad11"
> : ^^^^^^^
=== file.d.d.json.ts ===
declare var bad: "bad12";
>bad : "bad12"
> : ^^^^^^^
export default bad;
>bad : "bad12"
> : ^^^^^^^
@@ -0,0 +1,15 @@
main.ts(1,22): error TS6263: Module './dir/native.node' was resolved to 'dir/native.d.node.ts', but '--allowArbitraryExtensions' is not set.
==== main.ts (1 errors) ====
import mod = require("./dir/native.node");
~~~~~~~~~~~~~~~~~~~
!!! error TS6263: Module './dir/native.node' was resolved to 'dir/native.d.node.ts', but '--allowArbitraryExtensions' is not set.
mod.doNativeThing("good");
==== package.json (0 errors) ====
{"type": "module"}
==== dir/package.json (0 errors) ====
{"type": "commonjs"}
==== dir/native.d.node.ts (0 errors) ====
export function doNativeThing(flag: string): unknown;
@@ -0,0 +1,18 @@
//// [tests/cases/conformance/nonjsExtensions/declarationFilesForNodeNativeModules.ts] ////
//// [package.json]
{"type": "module"}
//// [package.json]
{"type": "commonjs"}
//// [native.d.node.ts]
export function doNativeThing(flag: string): unknown;
//// [main.ts]
import mod = require("./dir/native.node");
mod.doNativeThing("good");
//// [main.js]
import { createRequire as _createRequire } from "module";
const __require = _createRequire(import.meta.url);
const mod = __require("./dir/native.node");
mod.doNativeThing("good");
@@ -0,0 +1,9 @@
//// [tests/cases/conformance/nonjsExtensions/declarationFilesForNodeNativeModules.ts] ////
=== main.ts ===
import mod = require("./dir/native.node");
>mod : Symbol(mod, Decl(main.ts, 0, 0))
mod.doNativeThing("good");
>mod : Symbol(mod, Decl(main.ts, 0, 0))
@@ -0,0 +1,19 @@
//// [tests/cases/conformance/nonjsExtensions/declarationFilesForNodeNativeModules.ts] ////
=== main.ts ===
import mod = require("./dir/native.node");
>mod : any
> : ^^^
mod.doNativeThing("good");
>mod.doNativeThing("good") : any
> : ^^^
>mod.doNativeThing : any
> : ^^^
>mod : any
> : ^^^
>doNativeThing : any
> : ^^^
>"good" : "good"
> : ^^^^^^
@@ -0,0 +1,18 @@
//// [tests/cases/conformance/nonjsExtensions/declarationFilesForNodeNativeModules.ts] ////
//// [package.json]
{"type": "module"}
//// [package.json]
{"type": "commonjs"}
//// [native.d.node.ts]
export function doNativeThing(flag: string): unknown;
//// [main.ts]
import mod = require("./dir/native.node");
mod.doNativeThing("good");
//// [main.js]
import { createRequire as _createRequire } from "module";
const __require = _createRequire(import.meta.url);
const mod = __require("./dir/native.node");
mod.doNativeThing("good");
@@ -0,0 +1,16 @@
//// [tests/cases/conformance/nonjsExtensions/declarationFilesForNodeNativeModules.ts] ////
=== main.ts ===
import mod = require("./dir/native.node");
>mod : Symbol(mod, Decl(main.ts, 0, 0))
mod.doNativeThing("good");
>mod.doNativeThing : Symbol(mod.doNativeThing, Decl(native.d.node.ts, 0, 0))
>mod : Symbol(mod, Decl(main.ts, 0, 0))
>doNativeThing : Symbol(mod.doNativeThing, Decl(native.d.node.ts, 0, 0))
=== dir/native.d.node.ts ===
export function doNativeThing(flag: string): unknown;
>doNativeThing : Symbol(doNativeThing, Decl(native.d.node.ts, 0, 0))
>flag : Symbol(flag, Decl(native.d.node.ts, 0, 30))
@@ -0,0 +1,26 @@
//// [tests/cases/conformance/nonjsExtensions/declarationFilesForNodeNativeModules.ts] ////
=== main.ts ===
import mod = require("./dir/native.node");
>mod : typeof mod
> : ^^^^^^^^^^
mod.doNativeThing("good");
>mod.doNativeThing("good") : unknown
> : ^^^^^^^
>mod.doNativeThing : (flag: string) => unknown
> : ^ ^^ ^^^^^
>mod : typeof mod
> : ^^^^^^^^^^
>doNativeThing : (flag: string) => unknown
> : ^ ^^ ^^^^^
>"good" : "good"
> : ^^^^^^
=== dir/native.d.node.ts ===
export function doNativeThing(flag: string): unknown;
>doNativeThing : (flag: string) => unknown
> : ^ ^^ ^^^^^
>flag : string
> : ^^^^^^
@@ -0,0 +1,14 @@
error TS5070: Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'.
error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node20'.
!!! error TS5070: Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'.
!!! error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node20'.
==== a.ts (0 errors) ====
declare var dec: any, __decorate: any;
@dec export class A {
}
const o = { a: 1 };
const y = { ...o };
@@ -0,0 +1,26 @@
//// [tests/cases/compiler/emitHelpersWithLocalCollisions.ts] ////
//// [a.ts]
declare var dec: any, __decorate: any;
@dec export class A {
}
const o = { a: 1 };
const y = { ...o };
//// [a.js]
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
let A = class A {
};
A = __decorate([
dec
], A);
export { A };
const o = { a: 1 };
const y = Object.assign({}, o);
@@ -1,6 +1,8 @@
error TS5070: Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'.
error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'.
!!! error TS5070: Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'.
!!! error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'.
==== a.ts (0 errors) ====
declare var dec: any, __decorate: any;
@@ -0,0 +1,24 @@
/importer-cts.cts(10,10): error TS2614: Module '"./exporter.mjs"' has no exported member 'Oops'. Did you mean to use 'import Oops from "./exporter.mjs"' instead?
==== /importer-cjs.cjs (0 errors) ====
const Foo = require("./exporter.mjs");
new Foo();
==== /importer-cts.cts (1 errors) ====
import Foo = require("./exporter.mjs");
new Foo();
import Foo2 from "./exporter.mjs";
new Foo2();
import * as Foo3 from "./exporter.mjs";
new Foo3();
import { Oops } from "./exporter.mjs";
~~~~
!!! error TS2614: Module '"./exporter.mjs"' has no exported member 'Oops'. Did you mean to use 'import Oops from "./exporter.mjs"' instead?
==== /exporter.mts (0 errors) ====
export default class Foo {}
export { Foo as "module.exports" };
@@ -0,0 +1,41 @@
//// [tests/cases/conformance/node/esmModuleExports1.ts] ////
=== /importer-cjs.cjs ===
const Foo = require("./exporter.mjs");
>Foo : Symbol(Foo, Decl(importer-cjs.cjs, 0, 5))
>require : Symbol(require)
>"./exporter.mjs" : Symbol("/exporter", Decl(exporter.mts, 0, 0))
new Foo();
>Foo : Symbol(Foo, Decl(importer-cjs.cjs, 0, 5))
=== /importer-cts.cts ===
import Foo = require("./exporter.mjs");
>Foo : Symbol(Foo, Decl(importer-cts.cts, 0, 0))
new Foo();
>Foo : Symbol(Foo, Decl(importer-cts.cts, 0, 0))
import Foo2 from "./exporter.mjs";
>Foo2 : Symbol(Foo2, Decl(importer-cts.cts, 3, 6))
new Foo2();
>Foo2 : Symbol(Foo2, Decl(importer-cts.cts, 3, 6))
import * as Foo3 from "./exporter.mjs";
>Foo3 : Symbol(Foo3, Decl(importer-cts.cts, 6, 6))
new Foo3();
>Foo3 : Symbol(Foo3, Decl(importer-cts.cts, 6, 6))
import { Oops } from "./exporter.mjs";
>Oops : Symbol(Oops, Decl(importer-cts.cts, 9, 8))
=== /exporter.mts ===
export default class Foo {}
>Foo : Symbol(Foo, Decl(exporter.mts, 0, 0))
export { Foo as "module.exports" };
>Foo : Symbol(Foo, Decl(exporter.mts, 0, 0))
>"module.exports" : Symbol("module.exports", Decl(exporter.mts, 1, 8))
@@ -0,0 +1,65 @@
//// [tests/cases/conformance/node/esmModuleExports1.ts] ////
=== /importer-cjs.cjs ===
const Foo = require("./exporter.mjs");
>Foo : typeof Foo
> : ^^^^^^^^^^
>require("./exporter.mjs") : typeof import("/exporter", { with: { "resolution-mode": "import" } })
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>require : any
> : ^^^
>"./exporter.mjs" : "./exporter.mjs"
> : ^^^^^^^^^^^^^^^^
new Foo();
>new Foo() : Foo
> : ^^^
>Foo : typeof Foo
> : ^^^^^^^^^^
=== /importer-cts.cts ===
import Foo = require("./exporter.mjs");
>Foo : typeof Foo
> : ^^^^^^^^^^
new Foo();
>new Foo() : Foo
> : ^^^
>Foo : typeof Foo
> : ^^^^^^^^^^
import Foo2 from "./exporter.mjs";
>Foo2 : typeof Foo
> : ^^^^^^^^^^
new Foo2();
>new Foo2() : Foo
> : ^^^
>Foo2 : typeof Foo
> : ^^^^^^^^^^
import * as Foo3 from "./exporter.mjs";
>Foo3 : typeof Foo
> : ^^^^^^^^^^
new Foo3();
>new Foo3() : Foo
> : ^^^
>Foo3 : typeof Foo
> : ^^^^^^^^^^
import { Oops } from "./exporter.mjs";
>Oops : any
> : ^^^
=== /exporter.mts ===
export default class Foo {}
>Foo : Foo
> : ^^^
export { Foo as "module.exports" };
>Foo : typeof Foo
> : ^^^^^^^^^^
>"module.exports" : typeof Foo
> : ^^^^^^^^^^
@@ -0,0 +1,43 @@
/importer-cjs.cjs(2,5): error TS2351: This expression is not constructable.
Type 'String' has no construct signatures.
/importer-cts.cts(2,5): error TS2351: This expression is not constructable.
Type 'String' has no construct signatures.
/importer-cts.cts(4,8): error TS1259: Module '"/exporter"' can only be default-imported using the 'esModuleInterop' flag
/importer-cts.cts(8,5): error TS2351: This expression is not constructable.
Type 'String' has no construct signatures.
/importer-cts.cts(10,10): error TS2614: Module '"./exporter.mjs"' has no exported member 'Oops'. Did you mean to use 'import Oops from "./exporter.mjs"' instead?
==== /importer-cjs.cjs (1 errors) ====
const Foo = require("./exporter.mjs");
new Foo();
~~~
!!! error TS2351: This expression is not constructable.
!!! error TS2351: Type 'String' has no construct signatures.
==== /importer-cts.cts (4 errors) ====
import Foo = require("./exporter.mjs");
new Foo();
~~~
!!! error TS2351: This expression is not constructable.
!!! error TS2351: Type 'String' has no construct signatures.
import Foo2 from "./exporter.mjs";
~~~~
!!! error TS1259: Module '"/exporter"' can only be default-imported using the 'esModuleInterop' flag
new Foo2();
import * as Foo3 from "./exporter.mjs";
new Foo3();
~~~~
!!! error TS2351: This expression is not constructable.
!!! error TS2351: Type 'String' has no construct signatures.
import { Oops } from "./exporter.mjs";
~~~~
!!! error TS2614: Module '"./exporter.mjs"' has no exported member 'Oops'. Did you mean to use 'import Oops from "./exporter.mjs"' instead?
==== /exporter.mts (0 errors) ====
export default class Foo {}
const oops = "oops";
export { oops as "module.exports" };
@@ -0,0 +1,44 @@
//// [tests/cases/conformance/node/esmModuleExports2.ts] ////
=== /importer-cjs.cjs ===
const Foo = require("./exporter.mjs");
>Foo : Symbol(Foo, Decl(importer-cjs.cjs, 0, 5))
>require : Symbol(require)
>"./exporter.mjs" : Symbol("/exporter", Decl(exporter.mts, 0, 0))
new Foo();
>Foo : Symbol(Foo, Decl(importer-cjs.cjs, 0, 5))
=== /importer-cts.cts ===
import Foo = require("./exporter.mjs");
>Foo : Symbol(Foo, Decl(importer-cts.cts, 0, 0))
new Foo();
>Foo : Symbol(Foo, Decl(importer-cts.cts, 0, 0))
import Foo2 from "./exporter.mjs";
>Foo2 : Symbol(Foo2, Decl(importer-cts.cts, 3, 6))
new Foo2();
>Foo2 : Symbol(Foo2, Decl(importer-cts.cts, 3, 6))
import * as Foo3 from "./exporter.mjs";
>Foo3 : Symbol(Foo3, Decl(importer-cts.cts, 6, 6))
new Foo3();
>Foo3 : Symbol(Foo3, Decl(importer-cts.cts, 6, 6))
import { Oops } from "./exporter.mjs";
>Oops : Symbol(Oops, Decl(importer-cts.cts, 9, 8))
=== /exporter.mts ===
export default class Foo {}
>Foo : Symbol(Foo, Decl(exporter.mts, 0, 0))
const oops = "oops";
>oops : Symbol(oops, Decl(exporter.mts, 1, 5))
export { oops as "module.exports" };
>oops : Symbol(oops, Decl(exporter.mts, 1, 5))
>"module.exports" : Symbol("module.exports", Decl(exporter.mts, 2, 8))
@@ -0,0 +1,71 @@
//// [tests/cases/conformance/node/esmModuleExports2.ts] ////
=== /importer-cjs.cjs ===
const Foo = require("./exporter.mjs");
>Foo : "oops"
> : ^^^^^^
>require("./exporter.mjs") : typeof import("/exporter", { with: { "resolution-mode": "import" } })
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>require : any
> : ^^^
>"./exporter.mjs" : "./exporter.mjs"
> : ^^^^^^^^^^^^^^^^
new Foo();
>new Foo() : any
> : ^^^
>Foo : "oops"
> : ^^^^^^
=== /importer-cts.cts ===
import Foo = require("./exporter.mjs");
>Foo : "oops"
> : ^^^^^^
new Foo();
>new Foo() : any
> : ^^^
>Foo : "oops"
> : ^^^^^^
import Foo2 from "./exporter.mjs";
>Foo2 : any
> : ^^^
new Foo2();
>new Foo2() : any
> : ^^^
>Foo2 : any
> : ^^^
import * as Foo3 from "./exporter.mjs";
>Foo3 : "oops"
> : ^^^^^^
new Foo3();
>new Foo3() : any
> : ^^^
>Foo3 : "oops"
> : ^^^^^^
import { Oops } from "./exporter.mjs";
>Oops : any
> : ^^^
=== /exporter.mts ===
export default class Foo {}
>Foo : Foo
> : ^^^
const oops = "oops";
>oops : "oops"
> : ^^^^^^
>"oops" : "oops"
> : ^^^^^^
export { oops as "module.exports" };
>oops : "oops"
> : ^^^^^^
>"module.exports" : "oops"
> : ^^^^^^
@@ -0,0 +1,45 @@
/importer-cjs.cjs(2,5): error TS2351: This expression is not constructable.
Type 'String' has no construct signatures.
/importer-cts.cts(2,5): error TS2351: This expression is not constructable.
Type 'String' has no construct signatures.
/importer-cts.cts(5,5): error TS2351: This expression is not constructable.
Type 'String' has no construct signatures.
/importer-cts.cts(8,5): error TS2351: This expression is not constructable.
Type 'String' has no construct signatures.
/importer-cts.cts(10,10): error TS2614: Module '"./exporter.mjs"' has no exported member 'Oops'. Did you mean to use 'import Oops from "./exporter.mjs"' instead?
==== /importer-cjs.cjs (1 errors) ====
const Foo = require("./exporter.mjs");
new Foo();
~~~
!!! error TS2351: This expression is not constructable.
!!! error TS2351: Type 'String' has no construct signatures.
==== /importer-cts.cts (4 errors) ====
import Foo = require("./exporter.mjs");
new Foo();
~~~
!!! error TS2351: This expression is not constructable.
!!! error TS2351: Type 'String' has no construct signatures.
import Foo2 from "./exporter.mjs";
new Foo2();
~~~~
!!! error TS2351: This expression is not constructable.
!!! error TS2351: Type 'String' has no construct signatures.
import * as Foo3 from "./exporter.mjs";
new Foo3();
~~~~
!!! error TS2351: This expression is not constructable.
!!! error TS2351: Type 'String' has no construct signatures.
import { Oops } from "./exporter.mjs";
~~~~
!!! error TS2614: Module '"./exporter.mjs"' has no exported member 'Oops'. Did you mean to use 'import Oops from "./exporter.mjs"' instead?
==== /exporter.mts (0 errors) ====
export default class Foo {}
const oops = "oops";
export { oops as "module.exports" };
@@ -0,0 +1,44 @@
//// [tests/cases/conformance/node/esmModuleExports2.ts] ////
=== /importer-cjs.cjs ===
const Foo = require("./exporter.mjs");
>Foo : Symbol(Foo, Decl(importer-cjs.cjs, 0, 5))
>require : Symbol(require)
>"./exporter.mjs" : Symbol("/exporter", Decl(exporter.mts, 0, 0))
new Foo();
>Foo : Symbol(Foo, Decl(importer-cjs.cjs, 0, 5))
=== /importer-cts.cts ===
import Foo = require("./exporter.mjs");
>Foo : Symbol(Foo, Decl(importer-cts.cts, 0, 0))
new Foo();
>Foo : Symbol(Foo, Decl(importer-cts.cts, 0, 0))
import Foo2 from "./exporter.mjs";
>Foo2 : Symbol(Foo2, Decl(importer-cts.cts, 3, 6))
new Foo2();
>Foo2 : Symbol(Foo2, Decl(importer-cts.cts, 3, 6))
import * as Foo3 from "./exporter.mjs";
>Foo3 : Symbol(Foo3, Decl(importer-cts.cts, 6, 6))
new Foo3();
>Foo3 : Symbol(Foo3, Decl(importer-cts.cts, 6, 6))
import { Oops } from "./exporter.mjs";
>Oops : Symbol(Oops, Decl(importer-cts.cts, 9, 8))
=== /exporter.mts ===
export default class Foo {}
>Foo : Symbol(Foo, Decl(exporter.mts, 0, 0))
const oops = "oops";
>oops : Symbol(oops, Decl(exporter.mts, 1, 5))
export { oops as "module.exports" };
>oops : Symbol(oops, Decl(exporter.mts, 1, 5))
>"module.exports" : Symbol("module.exports", Decl(exporter.mts, 2, 8))
@@ -0,0 +1,71 @@
//// [tests/cases/conformance/node/esmModuleExports2.ts] ////
=== /importer-cjs.cjs ===
const Foo = require("./exporter.mjs");
>Foo : "oops"
> : ^^^^^^
>require("./exporter.mjs") : typeof import("/exporter", { with: { "resolution-mode": "import" } })
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>require : any
> : ^^^
>"./exporter.mjs" : "./exporter.mjs"
> : ^^^^^^^^^^^^^^^^
new Foo();
>new Foo() : any
> : ^^^
>Foo : "oops"
> : ^^^^^^
=== /importer-cts.cts ===
import Foo = require("./exporter.mjs");
>Foo : "oops"
> : ^^^^^^
new Foo();
>new Foo() : any
> : ^^^
>Foo : "oops"
> : ^^^^^^
import Foo2 from "./exporter.mjs";
>Foo2 : "oops"
> : ^^^^^^
new Foo2();
>new Foo2() : any
> : ^^^
>Foo2 : "oops"
> : ^^^^^^
import * as Foo3 from "./exporter.mjs";
>Foo3 : "oops"
> : ^^^^^^
new Foo3();
>new Foo3() : any
> : ^^^
>Foo3 : "oops"
> : ^^^^^^
import { Oops } from "./exporter.mjs";
>Oops : any
> : ^^^
=== /exporter.mts ===
export default class Foo {}
>Foo : Foo
> : ^^^
const oops = "oops";
>oops : "oops"
> : ^^^^^^
>"oops" : "oops"
> : ^^^^^^
export { oops as "module.exports" };
>oops : "oops"
> : ^^^^^^
>"module.exports" : "oops"
> : ^^^^^^
@@ -0,0 +1,41 @@
/importer-cjs.cjs(2,5): error TS1362: 'Foo' cannot be used as a value because it was exported using 'export type'.
/importer-cts.cts(2,5): error TS1362: 'Foo' cannot be used as a value because it was exported using 'export type'.
/importer-cts.cts(5,5): error TS1362: 'Foo2' cannot be used as a value because it was exported using 'export type'.
/importer-cts.cts(8,5): error TS1362: 'Foo3' cannot be used as a value because it was exported using 'export type'.
/importer-cts.cts(10,10): error TS2614: Module '"./exporter.mjs"' has no exported member 'Oops'. Did you mean to use 'import Oops from "./exporter.mjs"' instead?
==== /importer-cjs.cjs (1 errors) ====
const Foo = require("./exporter.mjs");
new Foo();
~~~
!!! error TS1362: 'Foo' cannot be used as a value because it was exported using 'export type'.
!!! related TS1377 /exporter.mts:2:15: 'Foo' was exported here.
==== /importer-cts.cts (4 errors) ====
import Foo = require("./exporter.mjs");
new Foo();
~~~
!!! error TS1362: 'Foo' cannot be used as a value because it was exported using 'export type'.
!!! related TS1377 /exporter.mts:2:15: 'Foo' was exported here.
import Foo2 from "./exporter.mjs";
new Foo2();
~~~~
!!! error TS1362: 'Foo2' cannot be used as a value because it was exported using 'export type'.
!!! related TS1377 /exporter.mts:2:15: 'Foo2' was exported here.
import * as Foo3 from "./exporter.mjs";
new Foo3();
~~~~
!!! error TS1362: 'Foo3' cannot be used as a value because it was exported using 'export type'.
!!! related TS1377 /exporter.mts:2:15: 'Foo3' was exported here.
import { Oops } from "./exporter.mjs";
~~~~
!!! error TS2614: Module '"./exporter.mjs"' has no exported member 'Oops'. Did you mean to use 'import Oops from "./exporter.mjs"' instead?
==== /exporter.mts (0 errors) ====
export default class Foo {}
export type { Foo as "module.exports" }
@@ -0,0 +1,41 @@
//// [tests/cases/conformance/node/esmModuleExports3.ts] ////
=== /importer-cjs.cjs ===
const Foo = require("./exporter.mjs");
>Foo : Symbol(Foo, Decl(importer-cjs.cjs, 0, 5))
>require : Symbol(require)
>"./exporter.mjs" : Symbol("/exporter", Decl(exporter.mts, 0, 0))
new Foo();
>Foo : Symbol(Foo, Decl(importer-cjs.cjs, 0, 5))
=== /importer-cts.cts ===
import Foo = require("./exporter.mjs");
>Foo : Symbol(Foo, Decl(importer-cts.cts, 0, 0))
new Foo();
>Foo : Symbol(Foo, Decl(importer-cts.cts, 0, 0))
import Foo2 from "./exporter.mjs";
>Foo2 : Symbol(Foo2, Decl(importer-cts.cts, 3, 6))
new Foo2();
>Foo2 : Symbol(Foo2, Decl(importer-cts.cts, 3, 6))
import * as Foo3 from "./exporter.mjs";
>Foo3 : Symbol(Foo3, Decl(importer-cts.cts, 6, 6))
new Foo3();
>Foo3 : Symbol(Foo3, Decl(importer-cts.cts, 6, 6))
import { Oops } from "./exporter.mjs";
>Oops : Symbol(Oops, Decl(importer-cts.cts, 9, 8))
=== /exporter.mts ===
export default class Foo {}
>Foo : Symbol(Foo, Decl(exporter.mts, 0, 0))
export type { Foo as "module.exports" }
>Foo : Symbol(Foo, Decl(exporter.mts, 0, 0))
>"module.exports" : Symbol("module.exports", Decl(exporter.mts, 1, 13))
@@ -0,0 +1,65 @@
//// [tests/cases/conformance/node/esmModuleExports3.ts] ////
=== /importer-cjs.cjs ===
const Foo = require("./exporter.mjs");
>Foo : typeof Foo
> : ^^^^^^^^^^
>require("./exporter.mjs") : typeof import("/exporter", { with: { "resolution-mode": "import" } })
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>require : any
> : ^^^
>"./exporter.mjs" : "./exporter.mjs"
> : ^^^^^^^^^^^^^^^^
new Foo();
>new Foo() : Foo
> : ^^^
>Foo : typeof Foo
> : ^^^^^^^^^^
=== /importer-cts.cts ===
import Foo = require("./exporter.mjs");
>Foo : typeof Foo
> : ^^^^^^^^^^
new Foo();
>new Foo() : Foo
> : ^^^
>Foo : typeof Foo
> : ^^^^^^^^^^
import Foo2 from "./exporter.mjs";
>Foo2 : typeof Foo
> : ^^^^^^^^^^
new Foo2();
>new Foo2() : Foo
> : ^^^
>Foo2 : typeof Foo
> : ^^^^^^^^^^
import * as Foo3 from "./exporter.mjs";
>Foo3 : typeof Foo
> : ^^^^^^^^^^
new Foo3();
>new Foo3() : Foo
> : ^^^
>Foo3 : typeof Foo
> : ^^^^^^^^^^
import { Oops } from "./exporter.mjs";
>Oops : any
> : ^^^
=== /exporter.mts ===
export default class Foo {}
>Foo : Foo
> : ^^^
export type { Foo as "module.exports" }
>Foo : typeof Foo
> : ^^^^^^^^^^
>"module.exports" : typeof Foo
> : ^^^^^^^^^^
@@ -1,16 +1,16 @@
1.ts(1,14): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(2,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(3,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(1,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(2,38): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
3.ts(2,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
3.ts(3,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
3.ts(4,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
3.ts(5,26): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
3.ts(7,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
1.ts(1,14): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(2,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(3,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(1,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(2,38): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
3.ts(2,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
3.ts(3,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
3.ts(4,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
3.ts(5,26): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
3.ts(7,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
3.ts(8,11): message TS1450: Dynamic imports can only accept a module specifier and an optional set of attributes as arguments
3.ts(9,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
3.ts(10,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
3.ts(9,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
3.ts(10,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
3.ts(10,52): error TS1009: Trailing comma not allowed.
@@ -21,13 +21,13 @@
==== 1.ts (3 errors) ====
import './0' assert { type: "json" }
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
import { a, b } from './0' assert { "type": "json" }
~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
import * as foo from './0' assert { type: "json" }
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
a;
b;
foo.a;
@@ -36,10 +36,10 @@
==== 2.ts (2 errors) ====
import { a, b } from './0' assert {}
~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
import { a as c, b as d } from './0' assert { a: "a", b: "b", c: "c" }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
a;
b;
c;
@@ -49,29 +49,29 @@
const a = import('./0')
const b = import('./0', { assert: { type: "json" } })
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
const c = import('./0', { assert: { type: "json", ttype: "typo" } })
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
const d = import('./0', { assert: {} })
~~~~~~~~~~~~~~
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
const dd = import('./0', {})
~~
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
declare function foo(): any;
const e = import('./0', foo())
~~~~~
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
const f = import()
~~~~~~~~
!!! message TS1450: Dynamic imports can only accept a module specifier and an optional set of attributes as arguments
const g = import('./0', {}, {})
~~
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
const h = import('./0', { assert: { type: "json" }},)
~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
~
!!! error TS1009: Trailing comma not allowed.
@@ -1,17 +1,17 @@
1.ts(1,14): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(2,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(3,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(1,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(2,38): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
3.ts(1,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
3.ts(2,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
3.ts(3,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
3.ts(4,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
3.ts(5,12): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
3.ts(7,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
3.ts(8,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
3.ts(9,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
3.ts(10,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
1.ts(1,14): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(2,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(3,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(1,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(2,38): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
3.ts(1,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
3.ts(2,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
3.ts(3,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
3.ts(4,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
3.ts(5,12): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
3.ts(7,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
3.ts(8,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
3.ts(9,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
3.ts(10,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
==== 0.ts (0 errors) ====
@@ -21,13 +21,13 @@
==== 1.ts (3 errors) ====
import './0' assert { type: "json" }
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
import { a, b } from './0' assert { "type": "json" }
~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
import * as foo from './0' assert { type: "json" }
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
a;
b;
foo.a;
@@ -36,10 +36,10 @@
==== 2.ts (2 errors) ====
import { a, b } from './0' assert {}
~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
import { a as c, b as d } from './0' assert { a: "a", b: "b", c: "c" }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
a;
b;
c;
@@ -48,31 +48,31 @@
==== 3.ts (9 errors) ====
const a = import('./0')
~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
const b = import('./0', { assert: { type: "json" } })
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
const c = import('./0', { assert: { type: "json", ttype: "typo" } })
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
const d = import('./0', { assert: {} })
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
const dd = import('./0', {})
~~~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
declare function foo(): any;
const e = import('./0', foo())
~~~~~~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
const f = import()
~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
const g = import('./0', {}, {})
~~~~~~~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
const h = import('./0', { assert: { type: "json" }},)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
@@ -1,9 +1,9 @@
1.ts(1,22): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(2,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(3,21): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(4,27): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(1,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(2,38): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(1,22): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(2,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(3,21): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(4,27): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(1,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(2,38): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
==== 0.ts (0 errors) ====
@@ -13,22 +13,22 @@
==== 1.ts (4 errors) ====
export {} from './0' assert { type: "json" }
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
export { a, b } from './0' assert { type: "json" }
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
export * from './0' assert { type: "json" }
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
export * as ns from './0' assert { type: "json" }
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
==== 2.ts (2 errors) ====
export { a, b } from './0' assert {}
~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
export { a as c, b as d } from './0' assert { a: "a", b: "b", c: "c" }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
@@ -1,9 +1,9 @@
1.ts(1,22): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(2,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(3,21): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(4,27): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(1,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(2,38): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(1,22): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(2,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(3,21): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(4,27): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(1,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(2,38): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
==== 0.ts (0 errors) ====
@@ -13,22 +13,22 @@
==== 1.ts (4 errors) ====
export {} from './0' assert { type: "json" }
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
export { a, b } from './0' assert { type: "json" }
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
export * from './0' assert { type: "json" }
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
export * as ns from './0' assert { type: "json" }
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
==== 2.ts (2 errors) ====
export { a, b } from './0' assert {}
~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
export { a as c, b as d } from './0' assert { a: "a", b: "b", c: "c" }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
@@ -1,7 +1,7 @@
1.ts(1,27): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(2,30): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(1,31): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(2,33): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(1,27): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(2,30): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(1,31): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(2,33): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
==== 0.ts (0 errors) ====
@@ -10,17 +10,17 @@
==== 1.ts (2 errors) ====
export type {} from './0' assert { type: "json" }
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
export type { I } from './0' assert { type: "json" }
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
==== 2.ts (2 errors) ====
import type { I } from './0' assert { type: "json" }
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
import type * as foo from './0' assert { type: "json" }
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
@@ -1,16 +1,16 @@
1.ts(1,14): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(2,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(3,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(1,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(2,38): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
3.ts(2,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
3.ts(3,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
3.ts(4,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
3.ts(5,26): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
3.ts(7,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
1.ts(1,14): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(2,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(3,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(1,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(2,38): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
3.ts(2,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
3.ts(3,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
3.ts(4,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
3.ts(5,26): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
3.ts(7,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
3.ts(8,11): message TS1450: Dynamic imports can only accept a module specifier and an optional set of attributes as arguments
3.ts(9,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
3.ts(10,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
3.ts(9,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
3.ts(10,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
3.ts(10,50): error TS1009: Trailing comma not allowed.
@@ -21,13 +21,13 @@
==== 1.ts (3 errors) ====
import './0' with { type: "json" }
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
import { a, b } from './0' with { "type": "json" }
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
import * as foo from './0' with { type: "json" }
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
a;
b;
foo.a;
@@ -35,10 +35,10 @@
==== 2.ts (2 errors) ====
import { a, b } from './0' with {}
~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
import { a as c, b as d } from './0' with { a: "a", b: "b", c: "c" }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
a;
b;
c;
@@ -47,29 +47,29 @@
const a = import('./0')
const b = import('./0', { with: { type: "json" } })
~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
const c = import('./0', { with: { type: "json", ttype: "typo" } })
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
const d = import('./0', { with: {} })
~~~~~~~~~~~~
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
const dd = import('./0', {})
~~
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
declare function foo(): any;
const e = import('./0', foo())
~~~~~
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
const f = import()
~~~~~~~~
!!! message TS1450: Dynamic imports can only accept a module specifier and an optional set of attributes as arguments
const g = import('./0', {}, {})
~~
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
const h = import('./0', { with: { type: "json" }},)
~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
~
!!! error TS1009: Trailing comma not allowed.
@@ -1,17 +1,17 @@
1.ts(1,14): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(2,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(3,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(1,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(2,38): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
3.ts(1,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
3.ts(2,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
3.ts(3,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
3.ts(4,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
3.ts(5,12): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
3.ts(7,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
3.ts(8,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
3.ts(9,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
3.ts(10,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
1.ts(1,14): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(2,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(3,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(1,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(2,38): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
3.ts(1,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
3.ts(2,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
3.ts(3,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
3.ts(4,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
3.ts(5,12): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
3.ts(7,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
3.ts(8,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
3.ts(9,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
3.ts(10,11): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
==== 0.ts (0 errors) ====
@@ -21,13 +21,13 @@
==== 1.ts (3 errors) ====
import './0' with { type: "json" }
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
import { a, b } from './0' with { "type": "json" }
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
import * as foo from './0' with { type: "json" }
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
a;
b;
foo.a;
@@ -35,10 +35,10 @@
==== 2.ts (2 errors) ====
import { a, b } from './0' with {}
~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
import { a as c, b as d } from './0' with { a: "a", b: "b", c: "c" }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
a;
b;
c;
@@ -46,30 +46,30 @@
==== 3.ts (9 errors) ====
const a = import('./0')
~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
const b = import('./0', { with: { type: "json" } })
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
const c = import('./0', { with: { type: "json", ttype: "typo" } })
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
const d = import('./0', { with: {} })
~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
const dd = import('./0', {})
~~~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
declare function foo(): any;
const e = import('./0', foo())
~~~~~~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
const f = import()
~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
const g = import('./0', {}, {})
~~~~~~~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
const h = import('./0', { with: { type: "json" }},)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
@@ -1,9 +1,9 @@
1.ts(1,22): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(2,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(3,21): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(4,27): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(1,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(2,38): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(1,22): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(2,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(3,21): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(4,27): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(1,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(2,38): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
==== 0.ts (0 errors) ====
@@ -13,22 +13,22 @@
==== 1.ts (4 errors) ====
export {} from './0' with { type: "json" }
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
export { a, b } from './0' with { type: "json" }
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
export * from './0' with { type: "json" }
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
export * as ns from './0' with { type: "json" }
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
==== 2.ts (2 errors) ====
export { a, b } from './0' with {}
~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
export { a as c, b as d } from './0' with { a: "a", b: "b", c: "c" }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
@@ -1,9 +1,9 @@
1.ts(1,22): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(2,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(3,21): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(4,27): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(1,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(2,38): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(1,22): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(2,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(3,21): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(4,27): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(1,28): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(2,38): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
==== 0.ts (0 errors) ====
@@ -13,22 +13,22 @@
==== 1.ts (4 errors) ====
export {} from './0' with { type: "json" }
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
export { a, b } from './0' with { type: "json" }
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
export * from './0' with { type: "json" }
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
export * as ns from './0' with { type: "json" }
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
==== 2.ts (2 errors) ====
export { a, b } from './0' with {}
~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
export { a as c, b as d } from './0' with { a: "a", b: "b", c: "c" }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
@@ -1,7 +1,7 @@
1.ts(1,27): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(2,30): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(1,31): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
2.ts(2,33): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.ts(1,27): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.ts(2,30): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(1,31): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
2.ts(2,33): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
==== 0.ts (0 errors) ====
@@ -10,16 +10,16 @@
==== 1.ts (2 errors) ====
export type {} from './0' with { type: "json" }
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
export type { I } from './0' with { type: "json" }
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
==== 2.ts (2 errors) ====
import type { I } from './0' with { type: "json" }
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
import type * as foo from './0' with { type: "json" }
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
@@ -0,0 +1,56 @@
mod.mts(1,37): error TS2322: Type '{ field: 0; }' is not assignable to type 'ImportAttributes'.
Property 'field' is incompatible with index signature.
Type 'number' is not assignable to type 'string'.
mod.mts(1,51): error TS2858: Import attribute values must be string literal expressions.
mod.mts(2,51): error TS2858: Import attribute values must be string literal expressions.
mod.mts(3,37): error TS2322: Type '{ field: RegExp; }' is not assignable to type 'ImportAttributes'.
Property 'field' is incompatible with index signature.
Type 'RegExp' is not assignable to type 'string'.
mod.mts(3,51): error TS2858: Import attribute values must be string literal expressions.
mod.mts(4,37): error TS2322: Type '{ field: string[]; }' is not assignable to type 'ImportAttributes'.
Property 'field' is incompatible with index signature.
Type 'string[]' is not assignable to type 'string'.
mod.mts(4,51): error TS2858: Import attribute values must be string literal expressions.
mod.mts(5,37): error TS2322: Type '{ field: { a: number; }; }' is not assignable to type 'ImportAttributes'.
Property 'field' is incompatible with index signature.
Type '{ a: number; }' is not assignable to type 'string'.
mod.mts(5,51): error TS2858: Import attribute values must be string literal expressions.
mod.mts(6,65): error TS2858: Import attribute values must be string literal expressions.
==== mod.mts (10 errors) ====
import * as thing1 from "./mod.mjs" with { field: 0 };
~~~~~~~~~~~~~~~~~
!!! error TS2322: Type '{ field: 0; }' is not assignable to type 'ImportAttributes'.
!!! error TS2322: Property 'field' is incompatible with index signature.
!!! error TS2322: Type 'number' is not assignable to type 'string'.
~
!!! error TS2858: Import attribute values must be string literal expressions.
import * as thing2 from "./mod.mjs" with { field: `a` };
~~~
!!! error TS2858: Import attribute values must be string literal expressions.
import * as thing3 from "./mod.mjs" with { field: /a/g };
~~~~~~~~~~~~~~~~~~~~
!!! error TS2322: Type '{ field: RegExp; }' is not assignable to type 'ImportAttributes'.
!!! error TS2322: Property 'field' is incompatible with index signature.
!!! error TS2322: Type 'RegExp' is not assignable to type 'string'.
~~~~
!!! error TS2858: Import attribute values must be string literal expressions.
import * as thing4 from "./mod.mjs" with { field: ["a"] };
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2322: Type '{ field: string[]; }' is not assignable to type 'ImportAttributes'.
!!! error TS2322: Property 'field' is incompatible with index signature.
!!! error TS2322: Type 'string[]' is not assignable to type 'string'.
~~~~~
!!! error TS2858: Import attribute values must be string literal expressions.
import * as thing5 from "./mod.mjs" with { field: { a: 0 } };
~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2322: Type '{ field: { a: number; }; }' is not assignable to type 'ImportAttributes'.
!!! error TS2322: Property 'field' is incompatible with index signature.
!!! error TS2322: Type '{ a: number; }' is not assignable to type 'string'.
~~~~~~~~
!!! error TS2858: Import attribute values must be string literal expressions.
import * as thing6 from "./mod.mjs" with { type: "json", field: 0..toString() };
~~~~~~~~~~~~~
!!! error TS2858: Import attribute values must be string literal expressions.
@@ -0,0 +1,13 @@
//// [tests/cases/conformance/importAttributes/importAttributes6.ts] ////
//// [mod.mts]
import * as thing1 from "./mod.mjs" with { field: 0 };
import * as thing2 from "./mod.mjs" with { field: `a` };
import * as thing3 from "./mod.mjs" with { field: /a/g };
import * as thing4 from "./mod.mjs" with { field: ["a"] };
import * as thing5 from "./mod.mjs" with { field: { a: 0 } };
import * as thing6 from "./mod.mjs" with { type: "json", field: 0..toString() };
//// [mod.mjs]
export {};
@@ -0,0 +1,24 @@
//// [tests/cases/conformance/importAttributes/importAttributes6.ts] ////
=== mod.mts ===
import * as thing1 from "./mod.mjs" with { field: 0 };
>thing1 : Symbol(thing1, Decl(mod.mts, 0, 6))
import * as thing2 from "./mod.mjs" with { field: `a` };
>thing2 : Symbol(thing2, Decl(mod.mts, 1, 6))
import * as thing3 from "./mod.mjs" with { field: /a/g };
>thing3 : Symbol(thing3, Decl(mod.mts, 2, 6))
import * as thing4 from "./mod.mjs" with { field: ["a"] };
>thing4 : Symbol(thing4, Decl(mod.mts, 3, 6))
import * as thing5 from "./mod.mjs" with { field: { a: 0 } };
>thing5 : Symbol(thing5, Decl(mod.mts, 4, 6))
>a : Symbol(a, Decl(mod.mts, 4, 51))
import * as thing6 from "./mod.mjs" with { type: "json", field: 0..toString() };
>thing6 : Symbol(thing6, Decl(mod.mts, 5, 6))
>0..toString : Symbol(Number.toString, Decl(lib.es5.d.ts, --, --))
>toString : Symbol(Number.toString, Decl(lib.es5.d.ts, --, --))
@@ -0,0 +1,61 @@
//// [tests/cases/conformance/importAttributes/importAttributes6.ts] ////
=== mod.mts ===
import * as thing1 from "./mod.mjs" with { field: 0 };
>thing1 : typeof thing1
> : ^^^^^^^^^^^^^
>field : any
> : ^^^
import * as thing2 from "./mod.mjs" with { field: `a` };
>thing2 : typeof thing1
> : ^^^^^^^^^^^^^
>field : any
> : ^^^
import * as thing3 from "./mod.mjs" with { field: /a/g };
>thing3 : typeof thing1
> : ^^^^^^^^^^^^^
>field : any
> : ^^^
>/a/g : RegExp
> : ^^^^^^
import * as thing4 from "./mod.mjs" with { field: ["a"] };
>thing4 : typeof thing1
> : ^^^^^^^^^^^^^
>field : any
> : ^^^
>["a"] : string[]
> : ^^^^^^^^
>"a" : "a"
> : ^^^
import * as thing5 from "./mod.mjs" with { field: { a: 0 } };
>thing5 : typeof thing1
> : ^^^^^^^^^^^^^
>field : any
> : ^^^
>{ a: 0 } : { a: number; }
> : ^^^^^^^^^^^^^^
>a : number
> : ^^^^^^
>0 : 0
> : ^
import * as thing6 from "./mod.mjs" with { type: "json", field: 0..toString() };
>thing6 : typeof thing1
> : ^^^^^^^^^^^^^
>type : any
> : ^^^
>field : any
> : ^^^
>0..toString() : string
> : ^^^^^^
>0..toString : (radix?: number) => string
> : ^ ^^^ ^^^^^
>0. : 0
> : ^
>toString : (radix?: number) => string
> : ^ ^^^ ^^^^^
@@ -1,6 +1,6 @@
1.ts(1,1): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
1.ts(2,10): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
1.ts(8,16): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
1.ts(1,1): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
1.ts(2,10): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
1.ts(8,16): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
==== 0.ts (0 errors) ====
@@ -9,10 +9,10 @@
==== 1.ts (3 errors) ====
import("./0");
~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
var p1 = import("./0");
~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
p1.then(zero => {
return zero.foo();
})
@@ -20,5 +20,5 @@
function foo() {
const p2 = import("./0");
~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
}
@@ -2,7 +2,7 @@ importCallExpressionGrammarError.ts(5,8): error TS1325: Argument of dynamic impo
importCallExpressionGrammarError.ts(7,17): error TS1325: Argument of dynamic import cannot be spread element.
importCallExpressionGrammarError.ts(8,12): message TS1450: Dynamic imports can only accept a module specifier and an optional set of attributes as arguments
importCallExpressionGrammarError.ts(9,19): error TS2307: Cannot find module 'pathToModule' or its corresponding type declarations.
importCallExpressionGrammarError.ts(9,35): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
importCallExpressionGrammarError.ts(9,35): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
importCallExpressionGrammarError.ts(9,35): error TS2559: Type '"secondModule"' has no properties in common with type 'ImportCallOptions'.
@@ -25,6 +25,6 @@ importCallExpressionGrammarError.ts(9,35): error TS2559: Type '"secondModule"' h
~~~~~~~~~~~~~~
!!! error TS2307: Cannot find module 'pathToModule' or its corresponding type declarations.
~~~~~~~~~~~~~~
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'nodenext', or 'preserve'.
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', 'node18', 'node20', 'nodenext', or 'preserve'.
~~~~~~~~~~~~~~
!!! error TS2559: Type '"secondModule"' has no properties in common with type 'ImportCallOptions'.
@@ -1,5 +1,5 @@
index.ts(2,18): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
index.ts(2,32): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
index.ts(2,18): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
index.ts(2,32): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
==== foo.ts (0 errors) ====
@@ -9,7 +9,7 @@ index.ts(2,32): error TS1323: Dynamic imports are only supported when the '--mod
async function foo() {
return await import((await import("./foo")).default);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
}
@@ -1,5 +1,5 @@
index.ts(2,18): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
index.ts(2,32): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
index.ts(2,18): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
index.ts(2,32): error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
==== foo.ts (0 errors) ====
@@ -9,7 +9,7 @@ index.ts(2,32): error TS1323: Dynamic imports are only supported when the '--mod
async function foo() {
return await import((await import("./foo")).default);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
~~~~~~~~~~~~~~~
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', or 'nodenext'.
!!! error TS1323: Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', 'node18', 'node20', or 'nodenext'.
}
@@ -1,25 +1,25 @@
error TS2468: Cannot find global value 'Promise'.
assignmentTargets.ts(1,32): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
assignmentTargets.ts(1,32): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
assignmentTargets.ts(1,44): error TS2339: Property 'blah' does not exist on type 'ImportMeta'.
assignmentTargets.ts(1,51): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
assignmentTargets.ts(1,51): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
assignmentTargets.ts(1,63): error TS2339: Property 'blue' does not exist on type 'ImportMeta'.
assignmentTargets.ts(1,70): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
assignmentTargets.ts(2,1): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
assignmentTargets.ts(1,70): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
assignmentTargets.ts(2,1): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
assignmentTargets.ts(2,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
assignmentTargets.ts(11,21): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
assignmentTargets.ts(11,21): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
example.ts(2,2): error TS2705: An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
example.ts(3,59): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
example.ts(6,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
example.ts(3,59): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
example.ts(6,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
example.ts(6,28): error TS2339: Property 'scriptElement' does not exist on type 'ImportMeta'.
moduleLookingFile01.ts(1,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
moduleLookingFile01.ts(2,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
moduleLookingFile01.ts(1,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
moduleLookingFile01.ts(2,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
moduleLookingFile01.ts(2,23): error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
moduleLookingFile01.ts(3,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
moduleLookingFile01.ts(3,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
moduleLookingFile01.ts(3,23): error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
scriptLookingFile01.ts(1,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
scriptLookingFile01.ts(2,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
scriptLookingFile01.ts(1,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
scriptLookingFile01.ts(2,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
scriptLookingFile01.ts(2,22): error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
scriptLookingFile01.ts(3,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
scriptLookingFile01.ts(3,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
scriptLookingFile01.ts(3,22): error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
@@ -31,12 +31,12 @@ scriptLookingFile01.ts(3,22): error TS17012: 'import' is not a valid meta-proper
!!! error TS2705: An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString());
~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
const blob = await response.blob();
const size = import.meta.scriptElement.dataset.size || 300;
~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
~~~~~~~~~~~~~
!!! error TS2339: Property 'scriptElement' does not exist on type 'ImportMeta'.
@@ -50,48 +50,48 @@ scriptLookingFile01.ts(3,22): error TS17012: 'import' is not a valid meta-proper
==== moduleLookingFile01.ts (5 errors) ====
export let x = import.meta;
~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
export let y = import.metal;
~~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
~~~~~
!!! error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
export let z = import.import.import.malkovich;
~~~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
~~~~~~
!!! error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
==== scriptLookingFile01.ts (5 errors) ====
let globalA = import.meta;
~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
let globalB = import.metal;
~~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
~~~~~
!!! error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
let globalC = import.import.import.malkovich;
~~~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
~~~~~~
!!! error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
==== assignmentTargets.ts (8 errors) ====
export const foo: ImportMeta = import.meta.blah = import.meta.blue = import.meta;
~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
~~~~
!!! error TS2339: Property 'blah' does not exist on type 'ImportMeta'.
~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
~~~~
!!! error TS2339: Property 'blue' does not exist on type 'ImportMeta'.
~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
import.meta = foo;
~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
~~~~~~~~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
@@ -104,4 +104,4 @@ scriptLookingFile01.ts(3,22): error TS17012: 'import' is not a valid meta-proper
const { a, b, c } = import.meta.wellKnownProperty;
~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
@@ -1,25 +1,25 @@
error TS2468: Cannot find global value 'Promise'.
assignmentTargets.ts(1,32): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
assignmentTargets.ts(1,32): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
assignmentTargets.ts(1,44): error TS2339: Property 'blah' does not exist on type 'ImportMeta'.
assignmentTargets.ts(1,51): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
assignmentTargets.ts(1,51): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
assignmentTargets.ts(1,63): error TS2339: Property 'blue' does not exist on type 'ImportMeta'.
assignmentTargets.ts(1,70): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
assignmentTargets.ts(2,1): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
assignmentTargets.ts(1,70): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
assignmentTargets.ts(2,1): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
assignmentTargets.ts(2,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
assignmentTargets.ts(11,21): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
assignmentTargets.ts(11,21): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
example.ts(2,2): error TS2705: An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
example.ts(3,59): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
example.ts(6,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
example.ts(3,59): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
example.ts(6,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
example.ts(6,28): error TS2339: Property 'scriptElement' does not exist on type 'ImportMeta'.
moduleLookingFile01.ts(1,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
moduleLookingFile01.ts(2,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
moduleLookingFile01.ts(1,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
moduleLookingFile01.ts(2,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
moduleLookingFile01.ts(2,23): error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
moduleLookingFile01.ts(3,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
moduleLookingFile01.ts(3,16): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
moduleLookingFile01.ts(3,23): error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
scriptLookingFile01.ts(1,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
scriptLookingFile01.ts(2,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
scriptLookingFile01.ts(1,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
scriptLookingFile01.ts(2,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
scriptLookingFile01.ts(2,22): error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
scriptLookingFile01.ts(3,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
scriptLookingFile01.ts(3,15): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
scriptLookingFile01.ts(3,22): error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
@@ -31,12 +31,12 @@ scriptLookingFile01.ts(3,22): error TS17012: 'import' is not a valid meta-proper
!!! error TS2705: An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option.
const response = await fetch(new URL("../hamsters.jpg", import.meta.url).toString());
~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
const blob = await response.blob();
const size = import.meta.scriptElement.dataset.size || 300;
~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
~~~~~~~~~~~~~
!!! error TS2339: Property 'scriptElement' does not exist on type 'ImportMeta'.
@@ -50,48 +50,48 @@ scriptLookingFile01.ts(3,22): error TS17012: 'import' is not a valid meta-proper
==== moduleLookingFile01.ts (5 errors) ====
export let x = import.meta;
~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
export let y = import.metal;
~~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
~~~~~
!!! error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
export let z = import.import.import.malkovich;
~~~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
~~~~~~
!!! error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
==== scriptLookingFile01.ts (5 errors) ====
let globalA = import.meta;
~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
let globalB = import.metal;
~~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
~~~~~
!!! error TS17012: 'metal' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
let globalC = import.import.import.malkovich;
~~~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
~~~~~~
!!! error TS17012: 'import' is not a valid meta-property for keyword 'import'. Did you mean 'meta'?
==== assignmentTargets.ts (8 errors) ====
export const foo: ImportMeta = import.meta.blah = import.meta.blue = import.meta;
~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
~~~~
!!! error TS2339: Property 'blah' does not exist on type 'ImportMeta'.
~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
~~~~
!!! error TS2339: Property 'blue' does not exist on type 'ImportMeta'.
~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
import.meta = foo;
~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
~~~~~~~~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
@@ -104,4 +104,4 @@ scriptLookingFile01.ts(3,22): error TS17012: 'import' is not a valid meta-proper
const { a, b, c } = import.meta.wellKnownProperty;
~~~~~~~~~~~
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', or 'nodenext'.
!!! error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'.
@@ -1,5 +1,5 @@
/foo.js(1,33): error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'.
/foo.js(1,33): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
/foo.js(1,33): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
/foo.js(1,38): error TS1005: '{' expected.
@@ -8,7 +8,7 @@
~~~~
!!! error TS1464: Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'.
~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
!!! error TS1005: '{' expected.
@@ -1,5 +1,5 @@
1.js(1,30): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.js(2,33): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
1.js(1,30): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
1.js(2,33): error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
==== 0.ts (0 errors) ====
@@ -8,10 +8,10 @@
==== 1.js (2 errors) ====
/** @import { I } from './0' with { type: "json" } */
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
/** @import * as foo from './0' with { type: "json" } */
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'nodenext', or 'preserve'.
!!! error TS2823: Import attributes are only supported when the '--module' option is set to 'esnext', 'node18', 'node20', 'nodenext', or 'preserve'.
/** @param {I} a */
function f(a) {}
@@ -0,0 +1,64 @@
b.mts(15,1): error TS2349: This expression is not callable.
Type 'typeof import("mod")' has no call signatures.
b.mts(16,1): error TS2349: This expression is not callable.
Type 'typeof import("mod")' has no call signatures.
b.mts(17,1): error TS2349: This expression is not callable.
Type 'typeof import("mod")' has no call signatures.
b.mts(18,1): error TS2349: This expression is not callable.
Type 'typeof import("mod")' has no call signatures.
b.mts(19,6): error TS2349: This expression is not callable.
Type 'typeof import("mod")' has no call signatures.
b.mts(20,6): error TS2349: This expression is not callable.
Type 'typeof import("mod")' has no call signatures.
==== mod.cts (0 errors) ====
declare function fun(): void;
export default fun;
==== b.mts (6 errors) ====
import a from "./mod.cjs";
import { default as b } from "./mod.cjs";
import c, { default as d } from "./mod.cjs";
import * as self from "./b.mjs";
export { default } from "./mod.cjs";
export { default as def } from "./mod.cjs";
a === b;
b === c;
c === d;
d === self.default;
self.default === self.def;
// should all fail
a();
~
!!! error TS2349: This expression is not callable.
!!! error TS2349: Type 'typeof import("mod")' has no call signatures.
b();
~
!!! error TS2349: This expression is not callable.
!!! error TS2349: Type 'typeof import("mod")' has no call signatures.
c();
~
!!! error TS2349: This expression is not callable.
!!! error TS2349: Type 'typeof import("mod")' has no call signatures.
d();
~
!!! error TS2349: This expression is not callable.
!!! error TS2349: Type 'typeof import("mod")' has no call signatures.
self.default();
~~~~~~~
!!! error TS2349: This expression is not callable.
!!! error TS2349: Type 'typeof import("mod")' has no call signatures.
self.def();
~~~
!!! error TS2349: This expression is not callable.
!!! error TS2349: Type 'typeof import("mod")' has no call signatures.
// should all work
a.default();
b.default();
c.default();
d.default();
self.default.default();
self.def.default();
@@ -0,0 +1,65 @@
//// [tests/cases/compiler/moduleNodeDefaultImports.ts] ////
//// [mod.cts]
declare function fun(): void;
export default fun;
//// [b.mts]
import a from "./mod.cjs";
import { default as b } from "./mod.cjs";
import c, { default as d } from "./mod.cjs";
import * as self from "./b.mjs";
export { default } from "./mod.cjs";
export { default as def } from "./mod.cjs";
a === b;
b === c;
c === d;
d === self.default;
self.default === self.def;
// should all fail
a();
b();
c();
d();
self.default();
self.def();
// should all work
a.default();
b.default();
c.default();
d.default();
self.default.default();
self.def.default();
//// [mod.cjs]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = fun;
//// [b.mjs]
import a from "./mod.cjs";
import { default as b } from "./mod.cjs";
import c, { default as d } from "./mod.cjs";
import * as self from "./b.mjs";
export { default } from "./mod.cjs";
export { default as def } from "./mod.cjs";
a === b;
b === c;
c === d;
d === self.default;
self.default === self.def;
// should all fail
a();
b();
c();
d();
self.default();
self.def();
// should all work
a.default();
b.default();
c.default();
d.default();
self.default.default();
self.def.default();
@@ -0,0 +1,116 @@
//// [tests/cases/compiler/moduleNodeDefaultImports.ts] ////
=== mod.cts ===
declare function fun(): void;
>fun : Symbol(fun, Decl(mod.cts, 0, 0))
export default fun;
>fun : Symbol(fun, Decl(mod.cts, 0, 0))
=== b.mts ===
import a from "./mod.cjs";
>a : Symbol(a, Decl(b.mts, 0, 6))
import { default as b } from "./mod.cjs";
>default : Symbol(a, Decl(mod.cts, 0, 0))
>b : Symbol(b, Decl(b.mts, 1, 8))
import c, { default as d } from "./mod.cjs";
>c : Symbol(c, Decl(b.mts, 2, 6))
>default : Symbol(a, Decl(mod.cts, 0, 0))
>d : Symbol(d, Decl(b.mts, 2, 11))
import * as self from "./b.mjs";
>self : Symbol(self, Decl(b.mts, 3, 6))
export { default } from "./mod.cjs";
>default : Symbol(self.default, Decl(b.mts, 4, 8))
export { default as def } from "./mod.cjs";
>default : Symbol(a, Decl(mod.cts, 0, 0))
>def : Symbol(self.def, Decl(b.mts, 5, 8))
a === b;
>a : Symbol(a, Decl(b.mts, 0, 6))
>b : Symbol(b, Decl(b.mts, 1, 8))
b === c;
>b : Symbol(b, Decl(b.mts, 1, 8))
>c : Symbol(c, Decl(b.mts, 2, 6))
c === d;
>c : Symbol(c, Decl(b.mts, 2, 6))
>d : Symbol(d, Decl(b.mts, 2, 11))
d === self.default;
>d : Symbol(d, Decl(b.mts, 2, 11))
>self.default : Symbol(self.default, Decl(b.mts, 4, 8))
>self : Symbol(self, Decl(b.mts, 3, 6))
>default : Symbol(self.default, Decl(b.mts, 4, 8))
self.default === self.def;
>self.default : Symbol(self.default, Decl(b.mts, 4, 8))
>self : Symbol(self, Decl(b.mts, 3, 6))
>default : Symbol(self.default, Decl(b.mts, 4, 8))
>self.def : Symbol(self.def, Decl(b.mts, 5, 8))
>self : Symbol(self, Decl(b.mts, 3, 6))
>def : Symbol(self.def, Decl(b.mts, 5, 8))
// should all fail
a();
>a : Symbol(a, Decl(b.mts, 0, 6))
b();
>b : Symbol(b, Decl(b.mts, 1, 8))
c();
>c : Symbol(c, Decl(b.mts, 2, 6))
d();
>d : Symbol(d, Decl(b.mts, 2, 11))
self.default();
>self.default : Symbol(self.default, Decl(b.mts, 4, 8))
>self : Symbol(self, Decl(b.mts, 3, 6))
>default : Symbol(self.default, Decl(b.mts, 4, 8))
self.def();
>self.def : Symbol(self.def, Decl(b.mts, 5, 8))
>self : Symbol(self, Decl(b.mts, 3, 6))
>def : Symbol(self.def, Decl(b.mts, 5, 8))
// should all work
a.default();
>a.default : Symbol(a.default, Decl(mod.cts, 0, 29))
>a : Symbol(a, Decl(b.mts, 0, 6))
>default : Symbol(a.default, Decl(mod.cts, 0, 29))
b.default();
>b.default : Symbol(a.default, Decl(mod.cts, 0, 29))
>b : Symbol(b, Decl(b.mts, 1, 8))
>default : Symbol(a.default, Decl(mod.cts, 0, 29))
c.default();
>c.default : Symbol(a.default, Decl(mod.cts, 0, 29))
>c : Symbol(c, Decl(b.mts, 2, 6))
>default : Symbol(a.default, Decl(mod.cts, 0, 29))
d.default();
>d.default : Symbol(a.default, Decl(mod.cts, 0, 29))
>d : Symbol(d, Decl(b.mts, 2, 11))
>default : Symbol(a.default, Decl(mod.cts, 0, 29))
self.default.default();
>self.default.default : Symbol(a.default, Decl(mod.cts, 0, 29))
>self.default : Symbol(self.default, Decl(b.mts, 4, 8))
>self : Symbol(self, Decl(b.mts, 3, 6))
>default : Symbol(self.default, Decl(b.mts, 4, 8))
>default : Symbol(a.default, Decl(mod.cts, 0, 29))
self.def.default();
>self.def.default : Symbol(a.default, Decl(mod.cts, 0, 29))
>self.def : Symbol(self.def, Decl(b.mts, 5, 8))
>self : Symbol(self, Decl(b.mts, 3, 6))
>def : Symbol(self.def, Decl(b.mts, 5, 8))
>default : Symbol(a.default, Decl(mod.cts, 0, 29))
@@ -0,0 +1,210 @@
//// [tests/cases/compiler/moduleNodeDefaultImports.ts] ////
=== mod.cts ===
declare function fun(): void;
>fun : () => void
> : ^^^^^^
export default fun;
>fun : () => void
> : ^^^^^^
=== b.mts ===
import a from "./mod.cjs";
>a : typeof a
> : ^^^^^^^^
import { default as b } from "./mod.cjs";
>default : typeof a
> : ^^^^^^^^
>b : typeof a
> : ^^^^^^^^
import c, { default as d } from "./mod.cjs";
>c : typeof a
> : ^^^^^^^^
>default : typeof a
> : ^^^^^^^^
>d : typeof a
> : ^^^^^^^^
import * as self from "./b.mjs";
>self : typeof self
> : ^^^^^^^^^^^
export { default } from "./mod.cjs";
>default : typeof a
> : ^^^^^^^^
export { default as def } from "./mod.cjs";
>default : typeof a
> : ^^^^^^^^
>def : typeof a
> : ^^^^^^^^
a === b;
>a === b : boolean
> : ^^^^^^^
>a : typeof a
> : ^^^^^^^^
>b : typeof a
> : ^^^^^^^^
b === c;
>b === c : boolean
> : ^^^^^^^
>b : typeof a
> : ^^^^^^^^
>c : typeof a
> : ^^^^^^^^
c === d;
>c === d : boolean
> : ^^^^^^^
>c : typeof a
> : ^^^^^^^^
>d : typeof a
> : ^^^^^^^^
d === self.default;
>d === self.default : boolean
> : ^^^^^^^
>d : typeof a
> : ^^^^^^^^
>self.default : typeof a
> : ^^^^^^^^
>self : typeof self
> : ^^^^^^^^^^^
>default : typeof a
> : ^^^^^^^^
self.default === self.def;
>self.default === self.def : boolean
> : ^^^^^^^
>self.default : typeof a
> : ^^^^^^^^
>self : typeof self
> : ^^^^^^^^^^^
>default : typeof a
> : ^^^^^^^^
>self.def : typeof a
> : ^^^^^^^^
>self : typeof self
> : ^^^^^^^^^^^
>def : typeof a
> : ^^^^^^^^
// should all fail
a();
>a() : any
> : ^^^
>a : typeof a
> : ^^^^^^^^
b();
>b() : any
> : ^^^
>b : typeof a
> : ^^^^^^^^
c();
>c() : any
> : ^^^
>c : typeof a
> : ^^^^^^^^
d();
>d() : any
> : ^^^
>d : typeof a
> : ^^^^^^^^
self.default();
>self.default() : any
> : ^^^
>self.default : typeof a
> : ^^^^^^^^
>self : typeof self
> : ^^^^^^^^^^^
>default : typeof a
> : ^^^^^^^^
self.def();
>self.def() : any
> : ^^^
>self.def : typeof a
> : ^^^^^^^^
>self : typeof self
> : ^^^^^^^^^^^
>def : typeof a
> : ^^^^^^^^
// should all work
a.default();
>a.default() : void
> : ^^^^
>a.default : () => void
> : ^^^^^^
>a : typeof a
> : ^^^^^^^^
>default : () => void
> : ^^^^^^
b.default();
>b.default() : void
> : ^^^^
>b.default : () => void
> : ^^^^^^
>b : typeof a
> : ^^^^^^^^
>default : () => void
> : ^^^^^^
c.default();
>c.default() : void
> : ^^^^
>c.default : () => void
> : ^^^^^^
>c : typeof a
> : ^^^^^^^^
>default : () => void
> : ^^^^^^
d.default();
>d.default() : void
> : ^^^^
>d.default : () => void
> : ^^^^^^
>d : typeof a
> : ^^^^^^^^
>default : () => void
> : ^^^^^^
self.default.default();
>self.default.default() : void
> : ^^^^
>self.default.default : () => void
> : ^^^^^^
>self.default : typeof a
> : ^^^^^^^^
>self : typeof self
> : ^^^^^^^^^^^
>default : typeof a
> : ^^^^^^^^
>default : () => void
> : ^^^^^^
self.def.default();
>self.def.default() : void
> : ^^^^
>self.def.default : () => void
> : ^^^^^^
>self.def : typeof a
> : ^^^^^^^^
>self : typeof self
> : ^^^^^^^^^^^
>def : typeof a
> : ^^^^^^^^
>default : () => void
> : ^^^^^^
@@ -1,14 +1,14 @@
modulePreserveTopLevelAwait1.ts(1,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
modulePreserveTopLevelAwait1.ts(2,1): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
modulePreserveTopLevelAwait1.ts(1,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
modulePreserveTopLevelAwait1.ts(2,1): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
==== modulePreserveTopLevelAwait1.ts (2 errors) ====
for await (const x of []) {}
~~~~~
!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
await Promise.resolve();
~~~~~
!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher.
export {};
@@ -0,0 +1,52 @@
//// [tests/cases/compiler/moduleResolutionWithModule.ts] ////
//// [package.json]
{
"name": "pkg",
"version": "0.0.1",
"exports": "./entrypoint.js"
}
//// [entrypoint.d.ts]
export declare function thing(): void;
//// [index.ts]
import * as p from "pkg";
p.thing();
//// [index.js]
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const p = __importStar(require("pkg"));
p.thing();
@@ -0,0 +1,15 @@
//// [tests/cases/compiler/moduleResolutionWithModule.ts] ////
=== node_modules/pkg/entrypoint.d.ts ===
export declare function thing(): void;
>thing : Symbol(thing, Decl(entrypoint.d.ts, 0, 0))
=== index.ts ===
import * as p from "pkg";
>p : Symbol(p, Decl(index.ts, 0, 6))
p.thing();
>p.thing : Symbol(p.thing, Decl(entrypoint.d.ts, 0, 0))
>p : Symbol(p, Decl(index.ts, 0, 6))
>thing : Symbol(p.thing, Decl(entrypoint.d.ts, 0, 0))
@@ -0,0 +1,22 @@
//// [tests/cases/compiler/moduleResolutionWithModule.ts] ////
=== node_modules/pkg/entrypoint.d.ts ===
export declare function thing(): void;
>thing : () => void
> : ^^^^^^
=== index.ts ===
import * as p from "pkg";
>p : typeof p
> : ^^^^^^^^
p.thing();
>p.thing() : void
> : ^^^^
>p.thing : () => void
> : ^^^^^^
>p : typeof p
> : ^^^^^^^^
>thing : () => void
> : ^^^^^^
@@ -0,0 +1,52 @@
//// [tests/cases/compiler/moduleResolutionWithModule.ts] ////
//// [package.json]
{
"name": "pkg",
"version": "0.0.1",
"exports": "./entrypoint.js"
}
//// [entrypoint.d.ts]
export declare function thing(): void;
//// [index.ts]
import * as p from "pkg";
p.thing();
//// [index.js]
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const p = __importStar(require("pkg"));
p.thing();
@@ -0,0 +1,15 @@
//// [tests/cases/compiler/moduleResolutionWithModule.ts] ////
=== node_modules/pkg/entrypoint.d.ts ===
export declare function thing(): void;
>thing : Symbol(thing, Decl(entrypoint.d.ts, 0, 0))
=== index.ts ===
import * as p from "pkg";
>p : Symbol(p, Decl(index.ts, 0, 6))
p.thing();
>p.thing : Symbol(p.thing, Decl(entrypoint.d.ts, 0, 0))
>p : Symbol(p, Decl(index.ts, 0, 6))
>thing : Symbol(p.thing, Decl(entrypoint.d.ts, 0, 0))
@@ -0,0 +1,22 @@
//// [tests/cases/compiler/moduleResolutionWithModule.ts] ////
=== node_modules/pkg/entrypoint.d.ts ===
export declare function thing(): void;
>thing : () => void
> : ^^^^^^
=== index.ts ===
import * as p from "pkg";
>p : typeof p
> : ^^^^^^^^
p.thing();
>p.thing() : void
> : ^^^^
>p.thing : () => void
> : ^^^^^^
>p : typeof p
> : ^^^^^^^^
>thing : () => void
> : ^^^^^^
@@ -0,0 +1,14 @@
/src/bar.mts(2,21): error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './foo.jsx'?
==== /src/foo.tsx (0 errors) ====
export function foo() {
return "";
}
==== /src/bar.mts (1 errors) ====
// Extensionless relative path ES import in an ES module
import { foo } from "./foo"; // should error, suggest adding ".jsx"
~~~~~~~
!!! error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './foo.jsx'?
@@ -0,0 +1,21 @@
//// [tests/cases/conformance/externalModules/moduleResolutionWithoutExtension3.ts] ////
//// [foo.tsx]
export function foo() {
return "";
}
//// [bar.mts]
// Extensionless relative path ES import in an ES module
import { foo } from "./foo"; // should error, suggest adding ".jsx"
//// [foo.jsx]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.foo = foo;
function foo() {
return "";
}
//// [bar.mjs]
export {};
@@ -0,0 +1,14 @@
//// [tests/cases/conformance/externalModules/moduleResolutionWithoutExtension3.ts] ////
=== /src/foo.tsx ===
export function foo() {
>foo : Symbol(foo, Decl(foo.tsx, 0, 0))
return "";
}
=== /src/bar.mts ===
// Extensionless relative path ES import in an ES module
import { foo } from "./foo"; // should error, suggest adding ".jsx"
>foo : Symbol(foo, Decl(bar.mts, 1, 8))
@@ -0,0 +1,18 @@
//// [tests/cases/conformance/externalModules/moduleResolutionWithoutExtension3.ts] ////
=== /src/foo.tsx ===
export function foo() {
>foo : () => string
> : ^^^^^^^^^^^^
return "";
>"" : ""
> : ^^
}
=== /src/bar.mts ===
// Extensionless relative path ES import in an ES module
import { foo } from "./foo"; // should error, suggest adding ".jsx"
>foo : any
> : ^^^
@@ -0,0 +1,14 @@
/src/bar.mts(2,21): error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './foo.js'?
==== /src/foo.tsx (0 errors) ====
export function foo() {
return "";
}
==== /src/bar.mts (1 errors) ====
// Extensionless relative path ES import in an ES module
import { foo } from "./foo"; // should error, suggest adding ".js"
~~~~~~~
!!! error TS2835: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean './foo.js'?
@@ -0,0 +1,21 @@
//// [tests/cases/conformance/externalModules/moduleResolutionWithoutExtension4.ts] ////
//// [foo.tsx]
export function foo() {
return "";
}
//// [bar.mts]
// Extensionless relative path ES import in an ES module
import { foo } from "./foo"; // should error, suggest adding ".js"
//// [foo.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.foo = foo;
function foo() {
return "";
}
//// [bar.mjs]
export {};
@@ -0,0 +1,14 @@
//// [tests/cases/conformance/externalModules/moduleResolutionWithoutExtension4.ts] ////
=== /src/foo.tsx ===
export function foo() {
>foo : Symbol(foo, Decl(foo.tsx, 0, 0))
return "";
}
=== /src/bar.mts ===
// Extensionless relative path ES import in an ES module
import { foo } from "./foo"; // should error, suggest adding ".js"
>foo : Symbol(foo, Decl(bar.mts, 1, 8))
@@ -0,0 +1,18 @@
//// [tests/cases/conformance/externalModules/moduleResolutionWithoutExtension4.ts] ////
=== /src/foo.tsx ===
export function foo() {
>foo : () => string
> : ^^^^^^^^^^^^
return "";
>"" : ""
> : ^^
}
=== /src/bar.mts ===
// Extensionless relative path ES import in an ES module
import { foo } from "./foo"; // should error, suggest adding ".js"
>foo : any
> : ^^^
@@ -0,0 +1,23 @@
error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'package.json'. Supply the `rootDir` compiler option to disambiguate.
!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'package.json'. Supply the `rootDir` compiler option to disambiguate.
==== index.js (0 errors) ====
// esm format file
import * as self from "package";
self;
==== index.mjs (0 errors) ====
// esm format file
import * as self from "package";
self;
==== index.cjs (0 errors) ====
// esm format file
import * as self from "package";
self;
==== package.json (0 errors) ====
{
"name": "package",
"private": true,
"type": "module",
"exports": "./index.js"
}
Loaded 100 of 536 files, more files were not shown because too many files have changed in this diff. Show more