Module or import types (#22592)

* Type side of import types

* Value side of import types

* Accept library changes

* Refined implementation, more tests

* Allow resolutions to be performed late if the resolution still results in a file already in the build

* Add another test case

* Add some jsdoc usages

* Allow nodebuilder to use import types where appropriate

* Parse & check generic instantiations

* use import types in nodebuilder for typeof module symbols

* Wire up go to definition for import types

* Accept updated type/symbol baselines now that symbols are wired in

* PR feedback

* Fix changes from merge

* Walk back late import handling

* Remove unused diagnostic

* Remove unrelated changes

* Use recursive function over loop

* Emit type arguments

* undo unrelated change

* Test for and support import type nodes in bundled declaration emit
This commit is contained in:
Wesley Wigham
2018-04-02 10:18:23 -07:00
committed by GitHub
parent 5c442419dc
commit 414bc49cc4
287 changed files with 3826 additions and 1279 deletions
+163 -25
View File
@@ -2115,7 +2115,8 @@ namespace ts {
if (ambientModule) {
return ambientModule;
}
const resolvedModule = getResolvedModule(getSourceFileOfNode(location), moduleReference);
const currentSourceFile = getSourceFileOfNode(location);
const resolvedModule = getResolvedModule(currentSourceFile, moduleReference);
const resolutionDiagnostic = resolvedModule && getResolutionDiagnostic(compilerOptions, resolvedModule);
const sourceFile = resolvedModule && !resolutionDiagnostic && host.getSourceFile(resolvedModule.resolvedFileName);
if (sourceFile) {
@@ -2193,15 +2194,15 @@ namespace ts {
// An external module with an 'export =' declaration may be referenced as an ES6 module provided the 'export ='
// references a symbol that is at least declared as a module or a variable. The target of the 'export =' may
// combine other declarations with the module or variable (e.g. a class/module, function/module, interface/variable).
function resolveESModuleSymbol(moduleSymbol: Symbol, moduleReferenceExpression: Expression, dontResolveAlias: boolean): Symbol {
function resolveESModuleSymbol(moduleSymbol: Symbol, referencingLocation: Node, dontResolveAlias: boolean): Symbol {
const symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias);
if (!dontResolveAlias && symbol) {
if (!(symbol.flags & (SymbolFlags.Module | SymbolFlags.Variable))) {
error(moduleReferenceExpression, Diagnostics.Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct, symbolToString(moduleSymbol));
error(referencingLocation, Diagnostics.Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct, symbolToString(moduleSymbol));
return symbol;
}
if (compilerOptions.esModuleInterop) {
const referenceParent = moduleReferenceExpression.parent;
const referenceParent = referencingLocation.parent;
if (
(isImportDeclaration(referenceParent) && getNamespaceDeclarationNode(referenceParent)) ||
isImportCall(referenceParent)
@@ -2951,7 +2952,7 @@ namespace ts {
if (type.flags & TypeFlags.UniqueESSymbol) {
if (!(context.flags & NodeBuilderFlags.AllowUniqueESSymbolType)) {
if (isValueSymbolAccessible(type.symbol, context.enclosingDeclaration)) {
return createTypeQueryNode(symbolToName(type.symbol, context, SymbolFlags.Value, /*expectsIdentifier*/ false));
return symbolToTypeNode(type.symbol, context, SymbolFlags.Value);
}
if (context.tracker.reportInaccessibleUniqueSymbolError) {
context.tracker.reportInaccessibleUniqueSymbolError();
@@ -3070,15 +3071,14 @@ namespace ts {
if (symbol.flags & SymbolFlags.Class && !getBaseTypeVariableOfClass(symbol) && !(symbol.valueDeclaration.kind === SyntaxKind.ClassExpression && context.flags & NodeBuilderFlags.WriteClassExpressionAsTypeLiteral) ||
symbol.flags & (SymbolFlags.Enum | SymbolFlags.ValueModule) ||
shouldWriteTypeOfFunctionSymbol()) {
return createTypeQueryNodeFromSymbol(symbol, SymbolFlags.Value);
return symbolToTypeNode(symbol, context, SymbolFlags.Value);
}
else if (contains(context.symbolStack, symbol)) {
// If type is an anonymous type literal in a type alias declaration, use type alias name
const typeAlias = getTypeAliasForTypeLiteral(type);
if (typeAlias) {
// The specified symbol flags need to be reinterpreted as type flags
const entityName = symbolToName(typeAlias, context, SymbolFlags.Type, /*expectsIdentifier*/ false);
return createTypeReferenceNode(entityName, /*typeArguments*/ undefined);
return symbolToTypeNode(typeAlias, context, SymbolFlags.Type);
}
else {
return createKeywordTypeNode(SyntaxKind.AnyKeyword);
@@ -3156,11 +3156,6 @@ namespace ts {
return setEmitFlags(typeLiteralNode, (context.flags & NodeBuilderFlags.MultilineObjectLiterals) ? 0 : EmitFlags.SingleLine);
}
function createTypeQueryNodeFromSymbol(symbol: Symbol, symbolFlags: SymbolFlags) {
const entityName = symbolToName(symbol, context, symbolFlags, /*expectsIdentifier*/ false);
return createTypeQueryNode(entityName);
}
function symbolToTypeReferenceName(symbol: Symbol) {
// Unnamed function expressions and arrow functions have reserved names that we don't want to display
const entityName = symbol.flags & SymbolFlags.Class || !isReservedMemberName(symbol.escapedName) ? symbolToName(symbol, context, SymbolFlags.Type, /*expectsIdentifier*/ false) : createIdentifier("");
@@ -3566,6 +3561,42 @@ namespace ts {
return typeParameterNodes;
}
function symbolToTypeNode(symbol: Symbol, context: NodeBuilderContext, meaning: SymbolFlags): TypeQueryNode | TypeReferenceNode | ImportTypeNode {
const chain = lookupSymbolChain(symbol, context, meaning);
context.flags |= NodeBuilderFlags.InInitialEntityName;
const rootName = getNameOfSymbolAsWritten(chain[0], context);
context.flags ^= NodeBuilderFlags.InInitialEntityName;
const isTypeOf = meaning === SymbolFlags.Value;
if (ambientModuleSymbolRegex.test(rootName)) {
// module is root, must use `ImportTypeNode`
const nonRootParts = chain.length > 1 ? createEntityNameFromSymbolChain(chain, chain.length - 1, 1) : undefined;
const typeParameterNodes = lookupTypeParameterNodes(chain, 0, context);
return createImportTypeNode(createLiteralTypeNode(createLiteral(rootName.substring(1, rootName.length - 1))), nonRootParts, typeParameterNodes as ReadonlyArray<TypeNode>, isTypeOf);
}
const entityName = createEntityNameFromSymbolChain(chain, chain.length - 1, 0);
return isTypeOf ? createTypeQueryNode(entityName) : createTypeReferenceNode(entityName, /*typeArguments*/ undefined);
function createEntityNameFromSymbolChain(chain: Symbol[], index: number, stopper: number): EntityName {
const typeParameterNodes = lookupTypeParameterNodes(chain, index, context);
const symbol = chain[index];
if (index === 0) {
context.flags |= NodeBuilderFlags.InInitialEntityName;
}
const symbolName = getNameOfSymbolAsWritten(symbol, context);
if (index === 0) {
context.flags ^= NodeBuilderFlags.InInitialEntityName;
}
const identifier = setEmitFlags(createIdentifier(symbolName, typeParameterNodes), EmitFlags.NoAsciiEscaping);
identifier.symbol = symbol;
return index > stopper ? createQualifiedName(createEntityNameFromSymbolChain(chain, index - 1, stopper), identifier) : identifier;
}
}
function symbolToName(symbol: Symbol, context: NodeBuilderContext, meaning: SymbolFlags, expectsIdentifier: true): Identifier;
function symbolToName(symbol: Symbol, context: NodeBuilderContext, meaning: SymbolFlags, expectsIdentifier: false): EntityName;
function symbolToName(symbol: Symbol, context: NodeBuilderContext, meaning: SymbolFlags, expectsIdentifier: boolean): EntityName {
@@ -7246,7 +7277,7 @@ namespace ts {
/**
* Get type from type-reference that reference to class or interface
*/
function getTypeFromClassOrInterfaceReference(node: TypeReferenceType, symbol: Symbol, typeArgs: Type[]): Type {
function getTypeFromClassOrInterfaceReference(node: NodeWithTypeArguments, symbol: Symbol, typeArgs: Type[]): Type {
const type = <InterfaceType>getDeclaredTypeOfSymbol(getMergedSymbol(symbol));
const typeParameters = type.localTypeParameters;
if (typeParameters) {
@@ -7296,7 +7327,7 @@ namespace ts {
* references to the type parameters of the alias. We replace those with the actual type arguments by instantiating the
* declared type. Instantiations are cached using the type identities of the type arguments as the key.
*/
function getTypeFromTypeAliasReference(node: TypeReferenceType, symbol: Symbol, typeArguments: Type[]): Type {
function getTypeFromTypeAliasReference(node: NodeWithTypeArguments, symbol: Symbol, typeArguments: Type[]): Type {
const type = getDeclaredTypeOfSymbol(symbol);
const typeParameters = getSymbolLinks(symbol).typeParameters;
if (typeParameters) {
@@ -7342,7 +7373,7 @@ namespace ts {
return resolveEntityName(typeReferenceName, meaning) || unknownSymbol;
}
function getTypeReferenceType(node: TypeReferenceType, symbol: Symbol) {
function getTypeReferenceType(node: NodeWithTypeArguments, symbol: Symbol) {
const typeArguments = typeArgumentsFromTypeReferenceNode(node); // Do unconditionally so we mark type arguments as referenced.
if (symbol === unknownSymbol) {
return unknownType;
@@ -7380,7 +7411,7 @@ namespace ts {
return valueType;
}
function getTypeReferenceTypeWorker(node: TypeReferenceType, symbol: Symbol, typeArguments: Type[]): Type | undefined {
function getTypeReferenceTypeWorker(node: NodeWithTypeArguments, symbol: Symbol, typeArguments: Type[]): Type | undefined {
if (symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface)) {
return getTypeFromClassOrInterfaceReference(node, symbol, typeArguments);
}
@@ -7428,13 +7459,13 @@ namespace ts {
return constraints ? getSubstitutionType(typeVariable, getIntersectionType(append(constraints, typeVariable))) : typeVariable;
}
function isJSDocTypeReference(node: TypeReferenceType): node is TypeReferenceNode {
function isJSDocTypeReference(node: NodeWithTypeArguments): node is TypeReferenceNode {
return node.flags & NodeFlags.JSDoc && node.kind === SyntaxKind.TypeReference;
}
function checkNoTypeArguments(node: TypeReferenceType, symbol?: Symbol) {
function checkNoTypeArguments(node: NodeWithTypeArguments, symbol?: Symbol) {
if (node.typeArguments) {
error(node, Diagnostics.Type_0_is_not_generic, symbol ? symbolToString(symbol) : declarationNameToString((<TypeReferenceNode>node).typeName));
error(node, Diagnostics.Type_0_is_not_generic, symbol ? symbolToString(symbol) : (<TypeReferenceNode>node).typeName ? declarationNameToString((<TypeReferenceNode>node).typeName) : "(anonymous)");
return false;
}
return true;
@@ -7515,7 +7546,7 @@ namespace ts {
return links.resolvedType;
}
function typeArgumentsFromTypeReferenceNode(node: TypeReferenceType): Type[] {
function typeArgumentsFromTypeReferenceNode(node: NodeWithTypeArguments): Type[] {
return map(node.typeArguments, getTypeFromTypeNode);
}
@@ -8479,6 +8510,79 @@ namespace ts {
return links.resolvedType;
}
function getIdentifierChain(node: EntityName): Identifier[] {
if (isIdentifier(node)) {
return [node];
}
else {
return append(getIdentifierChain(node.left), node.right);
}
}
function getTypeFromImportTypeNode(node: ImportTypeNode): Type {
const links = getNodeLinks(node);
if (!links.resolvedType) {
if (node.isTypeOf && node.typeArguments) { // Only the non-typeof form can make use of type arguments
error(node, Diagnostics.Type_arguments_cannot_be_used_here);
links.resolvedSymbol = unknownSymbol;
return links.resolvedType = unknownType;
}
if (!isLiteralImportTypeNode(node)) {
error(node.argument, Diagnostics.String_literal_expected);
links.resolvedSymbol = unknownSymbol;
return links.resolvedType = unknownType;
}
const argumentType = getTypeFromTypeNode(node.argument);
const targetMeaning = node.isTypeOf ? SymbolFlags.Value : SymbolFlags.Type;
// TODO: Future work: support unions/generics/whatever via a deferred import-type
const moduleName = (argumentType as StringLiteralType).value;
const innerModuleSymbol = resolveExternalModule(node, moduleName, Diagnostics.Cannot_find_module_0, node, /*isForAugmentation*/ false);
if (!innerModuleSymbol) {
links.resolvedSymbol = unknownSymbol;
return links.resolvedType = unknownType;
}
const moduleSymbol = resolveExternalModuleSymbol(innerModuleSymbol, /*dontResolveAlias*/ false);
if (node.qualifier) {
const nameStack: Identifier[] = getIdentifierChain(node.qualifier);
let currentNamespace = moduleSymbol;
let current: Identifier | undefined;
while (current = nameStack.shift()) {
const meaning = nameStack.length ? SymbolFlags.Namespace : targetMeaning;
const next = getSymbol(getExportsOfSymbol(getMergedSymbol(resolveSymbol(currentNamespace))), current.escapedText, meaning);
if (!next) {
error(current, Diagnostics.Namespace_0_has_no_exported_member_1, getFullyQualifiedName(currentNamespace), declarationNameToString(current));
return links.resolvedType = unknownType;
}
getNodeLinks(current).resolvedSymbol = next;
getNodeLinks(current.parent).resolvedSymbol = next;
currentNamespace = next;
}
resolveImportSymbolType(node, links, currentNamespace, targetMeaning);
}
else {
if (moduleSymbol.flags & targetMeaning) {
resolveImportSymbolType(node, links, moduleSymbol, targetMeaning);
}
else {
error(node, targetMeaning === SymbolFlags.Value ? Diagnostics.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here : Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here, moduleName);
links.resolvedSymbol = unknownSymbol;
links.resolvedType = unknownType;
}
}
}
return links.resolvedType;
}
function resolveImportSymbolType(node: ImportTypeNode, links: NodeLinks, symbol: Symbol, meaning: SymbolFlags) {
links.resolvedSymbol = symbol;
if (meaning === SymbolFlags.Value) {
return links.resolvedType = getTypeOfSymbol(symbol);
}
else {
return links.resolvedType = getTypeReferenceType(node, symbol);
}
}
function getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node: TypeNode): Type {
const links = getNodeLinks(node);
if (!links.resolvedType) {
@@ -8772,6 +8876,8 @@ namespace ts {
return getTypeFromConditionalTypeNode(<ConditionalTypeNode>node);
case SyntaxKind.InferType:
return getTypeFromInferTypeNode(<InferTypeNode>node);
case SyntaxKind.ImportTypeNode:
return getTypeFromImportTypeNode(<ImportTypeNode>node);
// This function assumes that an identifier or qualified name is a type expression
// Callers should first ensure this by calling isTypeNode
case SyntaxKind.Identifier:
@@ -20756,6 +20862,11 @@ namespace ts {
checkSourceElement(node.typeParameter);
}
function checkImportType(node: ImportTypeNode) {
checkSourceElement(node.argument);
getTypeFromTypeNode(node);
}
function isPrivateWithinAmbient(node: Node): boolean {
return hasModifier(node, ModifierFlags.Private) && !!(node.flags & NodeFlags.Ambient);
}
@@ -24483,6 +24594,8 @@ namespace ts {
return checkConditionalType(<ConditionalTypeNode>node);
case SyntaxKind.InferType:
return checkInferType(<InferTypeNode>node);
case SyntaxKind.ImportTypeNode:
return checkImportType(<ImportTypeNode>node);
case SyntaxKind.JSDocAugmentsTag:
return checkJSDocAugmentsTag(node as JSDocAugmentsTag);
case SyntaxKind.JSDocTypedefTag:
@@ -24993,6 +25106,18 @@ namespace ts {
}
}
function isImportTypeQualifierPart(node: EntityName): ImportTypeNode | undefined {
let parent = node.parent;
while (isQualifiedName(parent)) {
node = parent;
parent = parent.parent;
}
if (parent && parent.kind === SyntaxKind.ImportTypeNode && (parent as ImportTypeNode).qualifier === node) {
return parent as ImportTypeNode;
}
return undefined;
}
function getSymbolOfEntityNameOrPropertyAccessExpression(entityName: EntityName | PropertyAccessExpression): Symbol | undefined {
if (isDeclarationName(entityName)) {
return getSymbolOfNode(entityName.parent);
@@ -25016,13 +25141,23 @@ namespace ts {
return success;
}
}
else if (entityName.kind !== SyntaxKind.PropertyAccessExpression && isInRightSideOfImportOrExportAssignment(entityName)) {
else if (!isPropertyAccessExpression(entityName) && isInRightSideOfImportOrExportAssignment(entityName)) {
// Since we already checked for ExportAssignment, this really could only be an Import
const importEqualsDeclaration = getAncestor(entityName, SyntaxKind.ImportEqualsDeclaration);
Debug.assert(importEqualsDeclaration !== undefined);
return getSymbolOfPartOfRightHandSideOfImportEquals(entityName, /*dontResolveAlias*/ true);
}
if (isRightSideOfQualifiedNameOrPropertyAccess(entityName)) {
if (!isPropertyAccessExpression(entityName)) {
const possibleImportNode = isImportTypeQualifierPart(entityName);
if (possibleImportNode) {
getTypeFromTypeNode(possibleImportNode);
const sym = getNodeLinks(entityName).resolvedSymbol;
return sym === unknownSymbol ? undefined : sym;
}
}
while (isRightSideOfQualifiedNameOrPropertyAccess(entityName)) {
entityName = <QualifiedName | PropertyAccessEntityNameExpression>entityName.parent;
}
@@ -25175,9 +25310,12 @@ namespace ts {
// 1). import x = require("./mo/*gotToDefinitionHere*/d")
// 2). External module name in an import declaration
// 3). Dynamic import call or require in javascript
// 4). type A = import("./f/*gotToDefinitionHere*/oo")
if ((isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
((node.parent.kind === SyntaxKind.ImportDeclaration || node.parent.kind === SyntaxKind.ExportDeclaration) && (<ImportDeclaration>node.parent).moduleSpecifier === node) ||
((isInJavaScriptFile(node) && isRequireCall(node.parent, /*checkArgumentIsStringLiteralLike*/ false)) || isImportCall(node.parent))) {
((isInJavaScriptFile(node) && isRequireCall(node.parent, /*checkArgumentIsStringLiteralLike*/ false)) || isImportCall(node.parent)) ||
(isLiteralTypeNode(node.parent) && isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent)
) {
return resolveExternalModuleName(node, <LiteralExpression>node);
}
// falls through
@@ -26022,7 +26160,7 @@ namespace ts {
}
}
function getExternalModuleFileFromDeclaration(declaration: AnyImportOrReExport | ModuleDeclaration): SourceFile {
function getExternalModuleFileFromDeclaration(declaration: AnyImportOrReExport | ModuleDeclaration | ImportTypeNode): SourceFile {
const specifier = declaration.kind === SyntaxKind.ModuleDeclaration ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration);
const moduleSymbol = resolveExternalModuleNameWorker(specifier, specifier, /*moduleNotFoundError*/ undefined);
if (!moduleSymbol) {
+12
View File
@@ -955,6 +955,18 @@
"category": "Error",
"code": 1338
},
"Module '{0}' does not refer to a value, but is used as a value here.": {
"category": "Error",
"code": 1339
},
"Module '{0}' does not refer to a type, but is used as a type here.": {
"category": "Error",
"code": 1340
},
"Type arguments cannot be used here.": {
"category": "Error",
"code": 1342
},
"Duplicate identifier '{0}'.": {
"category": "Error",
+18
View File
@@ -615,6 +615,8 @@ namespace ts {
return emitMappedType(<MappedTypeNode>node);
case SyntaxKind.LiteralType:
return emitLiteralType(<LiteralTypeNode>node);
case SyntaxKind.ImportTypeNode:
return emitImportTypeNode(<ImportTypeNode>node);
case SyntaxKind.JSDocAllType:
write("*");
return;
@@ -1327,6 +1329,22 @@ namespace ts {
emitExpression(node.literal);
}
function emitImportTypeNode(node: ImportTypeNode) {
if (node.isTypeOf) {
writeKeyword("typeof");
writeSpace();
}
writeKeyword("import");
writePunctuation("(");
emit(node.argument);
writePunctuation(")");
if (node.qualifier) {
writePunctuation(".");
emit(node.qualifier);
}
emitTypeArguments(node, node.typeArguments);
}
//
// Binding patterns
//
+18
View File
@@ -809,6 +809,24 @@ namespace ts {
: node;
}
export function createImportTypeNode(argument: TypeNode, qualifier?: EntityName, typeArguments?: ReadonlyArray<TypeNode>, isTypeOf?: boolean) {
const node = <ImportTypeNode>createSynthesizedNode(SyntaxKind.ImportTypeNode);
node.argument = argument;
node.qualifier = qualifier;
node.typeArguments = asNodeArray(typeArguments);
node.isTypeOf = isTypeOf;
return node;
}
export function updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier?: EntityName, typeArguments?: ReadonlyArray<TypeNode>, isTypeOf?: boolean) {
return node.argument !== argument
|| node.qualifier !== qualifier
|| node.typeArguments !== typeArguments
|| node.isTypeOf !== isTypeOf
? updateNode(createImportTypeNode(argument, qualifier, typeArguments, isTypeOf), node)
: node;
}
export function createParenthesizedType(type: TypeNode) {
const node = <ParenthesizedTypeNode>createSynthesizedNode(SyntaxKind.ParenthesizedType);
node.type = type;
+30 -1
View File
@@ -189,6 +189,10 @@ namespace ts {
visitNode(cbNode, (<ConditionalTypeNode>node).falseType);
case SyntaxKind.InferType:
return visitNode(cbNode, (<InferTypeNode>node).typeParameter);
case SyntaxKind.ImportTypeNode:
return visitNode(cbNode, (<ImportTypeNode>node).argument) ||
visitNode(cbNode, (<ImportTypeNode>node).qualifier) ||
visitNodes(cbNode, cbNodes, (<ImportTypeNode>node).typeArguments);
case SyntaxKind.ParenthesizedType:
case SyntaxKind.TypeOperator:
return visitNode(cbNode, (<ParenthesizedTypeNode | TypeOperatorNode>node).type);
@@ -2733,6 +2737,28 @@ namespace ts {
return finishNode(node);
}
function isStartOfTypeOfImportType() {
nextToken();
return token() === SyntaxKind.ImportKeyword;
}
function parseImportType(): ImportTypeNode {
sourceFile.flags |= NodeFlags.PossiblyContainsDynamicImport;
const node = createNode(SyntaxKind.ImportTypeNode) as ImportTypeNode;
if (parseOptional(SyntaxKind.TypeOfKeyword)) {
node.isTypeOf = true;
}
parseExpected(SyntaxKind.ImportKeyword);
parseExpected(SyntaxKind.OpenParenToken);
node.argument = parseType();
parseExpected(SyntaxKind.CloseParenToken);
if (parseOptional(SyntaxKind.DotToken)) {
node.qualifier = parseEntityName(/*allowReservedWords*/ true, Diagnostics.Type_expected);
}
node.typeArguments = tryParseTypeArguments();
return finishNode(node);
}
function nextTokenIsNumericLiteral() {
return nextToken() === SyntaxKind.NumericLiteral;
}
@@ -2780,13 +2806,15 @@ namespace ts {
}
}
case SyntaxKind.TypeOfKeyword:
return parseTypeQuery();
return lookAhead(isStartOfTypeOfImportType) ? parseImportType() : parseTypeQuery();
case SyntaxKind.OpenBraceToken:
return lookAhead(isStartOfMappedType) ? parseMappedType() : parseTypeLiteral();
case SyntaxKind.OpenBracketToken:
return parseTupleType();
case SyntaxKind.OpenParenToken:
return parseParenthesizedType();
case SyntaxKind.ImportKeyword:
return parseImportType();
default:
return parseTypeReference();
}
@@ -2822,6 +2850,7 @@ namespace ts {
case SyntaxKind.ExclamationToken:
case SyntaxKind.DotDotDotToken:
case SyntaxKind.InferKeyword:
case SyntaxKind.ImportKeyword:
return true;
case SyntaxKind.MinusToken:
return !inStartOfParameter && lookAhead(nextTokenIsNumericLiteral);
+12 -2
View File
@@ -1686,9 +1686,19 @@ namespace ts {
else if (isImportCall(node) && node.arguments.length === 1 && isStringLiteralLike(node.arguments[0])) {
imports = append(imports, node.arguments[0] as StringLiteralLike);
}
else {
forEachChild(node, collectDynamicImportOrRequireCalls);
else if (isLiteralImportTypeNode(node)) {
imports = append(imports, node.argument.literal);
}
else {
collectDynamicImportOrRequireCallsForEachChild(node);
if (hasJSDocNodes(node)) {
forEach(node.jsDoc, collectDynamicImportOrRequireCallsForEachChild);
}
}
}
function collectDynamicImportOrRequireCallsForEachChild(node: Node) {
forEachChild(node, collectDynamicImportOrRequireCalls);
}
}
+15 -3
View File
@@ -450,9 +450,9 @@ namespace ts {
return setCommentRange(updated, getCommentRange(original));
}
function rewriteModuleSpecifier<T extends Node>(parent: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration, input: T): T | StringLiteral {
function rewriteModuleSpecifier<T extends Node>(parent: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration | ImportTypeNode, input: T): T | StringLiteral {
if (!input) return;
resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== SyntaxKind.ModuleDeclaration;
resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || (parent.kind !== SyntaxKind.ModuleDeclaration && parent.kind !== SyntaxKind.ImportTypeNode);
if (input.kind === SyntaxKind.StringLiteral && isBundledEmit) {
const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver, parent);
if (newName) {
@@ -765,6 +765,16 @@ namespace ts {
case SyntaxKind.ConstructorType: {
return cleanup(updateConstructorTypeNode(input, visitNodes(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), visitNode(input.type, visitDeclarationSubtree)));
}
case SyntaxKind.ImportTypeNode: {
if (!isLiteralImportTypeNode(input)) return cleanup(input);
return cleanup(updateImportTypeNode(
input,
updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)),
input.qualifier,
visitNodes(input.typeArguments, visitDeclarationSubtree, isTypeNode),
input.isTypeOf
));
}
default: Debug.assertNever(input, `Attempted to process unhandled node kind: ${(ts as any).SyntaxKind[(input as any).kind]}`);
}
}
@@ -1264,7 +1274,8 @@ namespace ts {
| TypeReferenceNode
| ConditionalTypeNode
| FunctionTypeNode
| ConstructorTypeNode;
| ConstructorTypeNode
| ImportTypeNode;
function isProcessedComponent(node: Node): node is ProcessedComponent {
switch (node.kind) {
@@ -1285,6 +1296,7 @@ namespace ts {
case SyntaxKind.ConditionalType:
case SyntaxKind.FunctionType:
case SyntaxKind.ConstructorType:
case SyntaxKind.ImportTypeNode:
return true;
}
return false;
+19 -6
View File
@@ -284,6 +284,7 @@ namespace ts {
IndexedAccessType,
MappedType,
LiteralType,
ImportTypeNode,
// Binding patterns
ObjectBindingPattern,
ArrayBindingPattern,
@@ -445,7 +446,7 @@ namespace ts {
FirstFutureReservedWord = ImplementsKeyword,
LastFutureReservedWord = YieldKeyword,
FirstTypeNode = TypePredicate,
LastTypeNode = LiteralType,
LastTypeNode = ImportTypeNode,
FirstPunctuation = OpenBraceToken,
LastPunctuation = CaretEqualsToken,
FirstToken = Unknown,
@@ -1067,6 +1068,16 @@ namespace ts {
| SyntaxKind.NeverKeyword;
}
export interface ImportTypeNode extends NodeWithTypeArguments {
kind: SyntaxKind.ImportTypeNode;
isTypeOf?: boolean;
argument: TypeNode;
qualifier?: EntityName;
}
/* @internal */
export type LiteralImportTypeNode = ImportTypeNode & { argument: LiteralTypeNode & { literal: StringLiteral } };
export interface ThisTypeNode extends TypeNode {
kind: SyntaxKind.ThisType;
}
@@ -1081,12 +1092,15 @@ namespace ts {
kind: SyntaxKind.ConstructorType;
}
export interface NodeWithTypeArguments extends TypeNode {
typeArguments?: NodeArray<TypeNode>;
}
export type TypeReferenceType = TypeReferenceNode | ExpressionWithTypeArguments;
export interface TypeReferenceNode extends TypeNode {
export interface TypeReferenceNode extends NodeWithTypeArguments {
kind: SyntaxKind.TypeReference;
typeName: EntityName;
typeArguments?: NodeArray<TypeNode>;
}
export interface TypePredicateNode extends TypeNode {
@@ -1696,11 +1710,10 @@ namespace ts {
expression: ImportExpression;
}
export interface ExpressionWithTypeArguments extends TypeNode {
export interface ExpressionWithTypeArguments extends NodeWithTypeArguments {
kind: SyntaxKind.ExpressionWithTypeArguments;
parent?: HeritageClause;
expression: LeftHandSideExpression;
typeArguments?: NodeArray<TypeNode>;
}
export interface NewExpression extends PrimaryExpression, Declaration {
@@ -3244,7 +3257,7 @@ namespace ts {
isOptionalParameter(node: ParameterDeclaration): boolean;
moduleExportsSomeValue(moduleReferenceExpression: Expression): boolean;
isArgumentsLocalBinding(node: Identifier): boolean;
getExternalModuleFileFromDeclaration(declaration: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration): SourceFile;
getExternalModuleFileFromDeclaration(declaration: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration | ImportTypeNode): SourceFile;
getTypeReferenceDirectivesForEntityName(name: EntityNameOrEntityNameExpression): string[];
getTypeReferenceDirectivesForSymbol(symbol: Symbol, meaning?: SymbolFlags): string[];
isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean;
+10 -2
View File
@@ -734,6 +734,12 @@ namespace ts {
return n.kind === SyntaxKind.CallExpression && (<CallExpression>n).expression.kind === SyntaxKind.ImportKeyword;
}
export function isLiteralImportTypeNode(n: Node): n is LiteralImportTypeNode {
return n.kind === SyntaxKind.ImportTypeNode &&
(n as ImportTypeNode).argument.kind === SyntaxKind.LiteralType &&
isStringLiteral(((n as ImportTypeNode).argument as LiteralTypeNode).literal);
}
export function isPrologueDirective(node: Node): node is PrologueDirective {
return node.kind === SyntaxKind.ExpressionStatement
&& (<ExpressionStatement>node).expression.kind === SyntaxKind.StringLiteral;
@@ -1697,13 +1703,15 @@ namespace ts {
}
}
export function getExternalModuleName(node: AnyImportOrReExport): Expression {
export function getExternalModuleName(node: AnyImportOrReExport | ImportTypeNode): Expression {
switch (node.kind) {
case SyntaxKind.ImportDeclaration:
case SyntaxKind.ExportDeclaration:
return node.moduleSpecifier;
case SyntaxKind.ImportEqualsDeclaration:
return node.moduleReference.kind === SyntaxKind.ExternalModuleReference ? node.moduleReference.expression : undefined;
case SyntaxKind.ImportTypeNode:
return isLiteralImportTypeNode(node) ? node.argument.literal : undefined;
default:
return Debug.assertNever(node);
}
@@ -2809,7 +2817,7 @@ namespace ts {
return file.moduleName || getExternalModuleNameFromPath(host, file.fileName);
}
export function getExternalModuleNameFromDeclaration(host: EmitHost, resolver: EmitResolver, declaration: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration): string {
export function getExternalModuleNameFromDeclaration(host: EmitHost, resolver: EmitResolver, declaration: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration | ImportTypeNode): string {
const file = resolver.getExternalModuleFileFromDeclaration(declaration);
if (!file || file.isDeclarationFile) {
return undefined;
+8
View File
@@ -398,6 +398,14 @@ namespace ts {
return updateInferTypeNode(<InferTypeNode>node,
visitNode((<InferTypeNode>node).typeParameter, visitor, isTypeParameterDeclaration));
case SyntaxKind.ImportTypeNode:
return updateImportTypeNode(<ImportTypeNode>node,
visitNode((<ImportTypeNode>node).argument, visitor, isTypeNode),
visitNode((<ImportTypeNode>node).qualifier, visitor, isEntityName),
visitNodes((<ImportTypeNode>node).typeArguments, visitor, isTypeNode),
(<ImportTypeNode>node).isTypeOf
);
case SyntaxKind.ParenthesizedType:
return updateParenthesizedType(<ParenthesizedTypeNode>node,
visitNode((<ParenthesizedTypeNode>node).type, visitor, isTypeNode));
@@ -1,5 +1,5 @@
tests/cases/compiler/aliasAssignments_1.ts(3,1): error TS2322: Type '1' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"'.
tests/cases/compiler/aliasAssignments_1.ts(5,1): error TS2322: Type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"' is not assignable to type 'number'.
tests/cases/compiler/aliasAssignments_1.ts(3,1): error TS2322: Type '1' is not assignable to type 'typeof import("tests/cases/compiler/aliasAssignments_moduleA")'.
tests/cases/compiler/aliasAssignments_1.ts(5,1): error TS2322: Type 'typeof import("tests/cases/compiler/aliasAssignments_moduleA")' is not assignable to type 'number'.
==== tests/cases/compiler/aliasAssignments_1.ts (2 errors) ====
@@ -7,11 +7,11 @@ tests/cases/compiler/aliasAssignments_1.ts(5,1): error TS2322: Type 'typeof "tes
var x = moduleA;
x = 1; // Should be error
~
!!! error TS2322: Type '1' is not assignable to type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"'.
!!! error TS2322: Type '1' is not assignable to type 'typeof import("tests/cases/compiler/aliasAssignments_moduleA")'.
var y = 1;
y = moduleA; // should be error
~
!!! error TS2322: Type 'typeof "tests/cases/compiler/aliasAssignments_moduleA"' is not assignable to type 'number'.
!!! error TS2322: Type 'typeof import("tests/cases/compiler/aliasAssignments_moduleA")' is not assignable to type 'number'.
==== tests/cases/compiler/aliasAssignments_moduleA.ts (0 errors) ====
export class someClass {
@@ -26,7 +26,7 @@ var x: foo.A = foo.bar("hello"); // foo.A should be ok but foo.bar should be err
=== tests/cases/compiler/aliasOnMergedModuleInterface_0.ts ===
declare module "foo"
>"foo" : typeof "foo"
>"foo" : typeof import("foo")
{
module B {
>B : any
@@ -1,15 +1,15 @@
tests/cases/compiler/a.ts(2,5): error TS2339: Property 'default' does not exist on type 'typeof "tests/cases/compiler/b"'.
tests/cases/compiler/a.ts(3,5): error TS2339: Property 'default' does not exist on type 'typeof "tests/cases/compiler/b"'.
tests/cases/compiler/a.ts(2,5): error TS2339: Property 'default' does not exist on type 'typeof import("tests/cases/compiler/b")'.
tests/cases/compiler/a.ts(3,5): error TS2339: Property 'default' does not exist on type 'typeof import("tests/cases/compiler/b")'.
==== tests/cases/compiler/a.ts (2 errors) ====
import Foo = require("./b");
Foo.default.bar();
~~~~~~~
!!! error TS2339: Property 'default' does not exist on type 'typeof "tests/cases/compiler/b"'.
!!! error TS2339: Property 'default' does not exist on type 'typeof import("tests/cases/compiler/b")'.
Foo.default.default.foo();
~~~~~~~
!!! error TS2339: Property 'default' does not exist on type 'typeof "tests/cases/compiler/b"'.
!!! error TS2339: Property 'default' does not exist on type 'typeof import("tests/cases/compiler/b")'.
==== tests/cases/compiler/b.d.ts (0 errors) ====
export function foo();
@@ -28,7 +28,7 @@ foo(fileText);
=== tests/cases/conformance/ambient/declarations.d.ts ===
declare module "foo*baz" {
>"foo*baz" : typeof "foo*baz"
>"foo*baz" : typeof import("foo*baz")
export function foo(s: string): void;
>foo : (s: string) => void
@@ -36,7 +36,7 @@ declare module "foo*baz" {
}
// Augmentations still work
declare module "foo*baz" {
>"foo*baz" : typeof "foo*baz"
>"foo*baz" : typeof import("foo*baz")
export const baz: string;
>baz : string
@@ -44,14 +44,14 @@ declare module "foo*baz" {
// Longest prefix wins
declare module "foos*" {
>"foos*" : typeof "foos*"
>"foos*" : typeof import("foos*")
export const foos: string;
>foos : string
}
declare module "*!text" {
>"*!text" : typeof "*!text"
>"*!text" : typeof import("*!text")
const x: string;
>x : string
@@ -1,4 +1,4 @@
=== tests/cases/conformance/ambient/ambientDeclarationsPatterns_tooManyAsterisks.ts ===
declare module "too*many*asterisks" { }
>"too*many*asterisks" : typeof "too*many*asterisks"
>"too*many*asterisks" : typeof import("too*many*asterisks")
@@ -12,7 +12,7 @@ export default 2 + 2;
>2 : 2
export as namespace Foo;
>Foo : typeof "tests/cases/compiler/foo"
>Foo : typeof import("tests/cases/compiler/foo")
=== tests/cases/compiler/foo2.d.ts ===
export = 2 + 2;
@@ -26,7 +26,7 @@ export as namespace Foo2;
=== tests/cases/compiler/indirection.d.ts ===
/// <reference path="./foo.d.ts" />
declare module "indirect" {
>"indirect" : typeof "indirect"
>"indirect" : typeof import("indirect")
export default typeof Foo.default;
>typeof Foo.default : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
@@ -38,7 +38,7 @@ declare module "indirect" {
=== tests/cases/compiler/indirection2.d.ts ===
/// <reference path="./foo2.d.ts" />
declare module "indirect2" {
>"indirect2" : typeof "indirect2"
>"indirect2" : typeof import("indirect2")
export = typeof Foo2;
>typeof Foo2 : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function"
@@ -6,7 +6,7 @@ export = D;
>D : D
declare module "ext" {
>"ext" : typeof "ext"
>"ext" : typeof import("ext")
export class C { }
>C : C
@@ -3,5 +3,5 @@ module M {
>M : any
export declare module "M" { }
>"M" : typeof "M"
>"M" : typeof import("M")
}
@@ -17,7 +17,7 @@ var y = M.y;
=== tests/cases/conformance/ambient/ambientExternalModuleMerging_declare.ts ===
declare module "M" {
>"M" : typeof "M"
>"M" : typeof import("M")
export var x: string;
>x : string
@@ -25,7 +25,7 @@ declare module "M" {
// Merge
declare module "M" {
>"M" : typeof "M"
>"M" : typeof import("M")
export var y: string;
>y : string
@@ -1,12 +1,12 @@
=== tests/cases/compiler/ambientExternalModuleReopen.ts ===
declare module "fs" {
>"fs" : typeof "fs"
>"fs" : typeof import("fs")
var x: string;
>x : string
}
declare module 'fs' {
>'fs' : typeof "fs"
>'fs' : typeof import("fs")
var y: number;
>y : number
@@ -1,6 +1,6 @@
=== tests/cases/compiler/ambientExternalModuleWithRelativeExternalImportDeclaration.ts ===
declare module "OuterModule" {
>"OuterModule" : typeof "OuterModule"
>"OuterModule" : typeof import("OuterModule")
import m2 = require("./SubModule");
>m2 : any
@@ -1,13 +1,13 @@
=== tests/cases/compiler/ambientExternalModuleWithRelativeModuleName.ts ===
declare module "./relativeModule" {
>"./relativeModule" : typeof "./relativeModule"
>"./relativeModule" : typeof import("./relativeModule")
var x: string;
>x : string
}
declare module ".\\relativeModule" {
>".\\relativeModule" : typeof ".\\relativeModule"
>".\\relativeModule" : typeof import(".\\\\relativeModule")
var x: string;
>x : string
@@ -2,8 +2,8 @@
/// <reference path="node.d.ts"/>
const fs = require("fs");
>fs : typeof "fs"
>require("fs") : typeof "fs"
>fs : typeof import("fs")
>require("fs") : typeof import("fs")
>require : (moduleName: string) => any
>"fs" : "fs"
@@ -11,7 +11,7 @@ const text = fs.readFileSync("/a/b/c");
>text : string
>fs.readFileSync("/a/b/c") : string
>fs.readFileSync : (s: string) => string
>fs : typeof "fs"
>fs : typeof import("fs")
>readFileSync : (s: string) => string
>"/a/b/c" : "/a/b/c"
@@ -21,7 +21,7 @@ declare function require(moduleName: string): any;
>moduleName : string
declare module "fs" {
>"fs" : typeof "fs"
>"fs" : typeof import("fs")
export function readFileSync(s: string): string;
>readFileSync : (s: string) => string
+141 -131
View File
@@ -240,128 +240,129 @@ declare namespace ts {
IndexedAccessType = 175,
MappedType = 176,
LiteralType = 177,
ObjectBindingPattern = 178,
ArrayBindingPattern = 179,
BindingElement = 180,
ArrayLiteralExpression = 181,
ObjectLiteralExpression = 182,
PropertyAccessExpression = 183,
ElementAccessExpression = 184,
CallExpression = 185,
NewExpression = 186,
TaggedTemplateExpression = 187,
TypeAssertionExpression = 188,
ParenthesizedExpression = 189,
FunctionExpression = 190,
ArrowFunction = 191,
DeleteExpression = 192,
TypeOfExpression = 193,
VoidExpression = 194,
AwaitExpression = 195,
PrefixUnaryExpression = 196,
PostfixUnaryExpression = 197,
BinaryExpression = 198,
ConditionalExpression = 199,
TemplateExpression = 200,
YieldExpression = 201,
SpreadElement = 202,
ClassExpression = 203,
OmittedExpression = 204,
ExpressionWithTypeArguments = 205,
AsExpression = 206,
NonNullExpression = 207,
MetaProperty = 208,
TemplateSpan = 209,
SemicolonClassElement = 210,
Block = 211,
VariableStatement = 212,
EmptyStatement = 213,
ExpressionStatement = 214,
IfStatement = 215,
DoStatement = 216,
WhileStatement = 217,
ForStatement = 218,
ForInStatement = 219,
ForOfStatement = 220,
ContinueStatement = 221,
BreakStatement = 222,
ReturnStatement = 223,
WithStatement = 224,
SwitchStatement = 225,
LabeledStatement = 226,
ThrowStatement = 227,
TryStatement = 228,
DebuggerStatement = 229,
VariableDeclaration = 230,
VariableDeclarationList = 231,
FunctionDeclaration = 232,
ClassDeclaration = 233,
InterfaceDeclaration = 234,
TypeAliasDeclaration = 235,
EnumDeclaration = 236,
ModuleDeclaration = 237,
ModuleBlock = 238,
CaseBlock = 239,
NamespaceExportDeclaration = 240,
ImportEqualsDeclaration = 241,
ImportDeclaration = 242,
ImportClause = 243,
NamespaceImport = 244,
NamedImports = 245,
ImportSpecifier = 246,
ExportAssignment = 247,
ExportDeclaration = 248,
NamedExports = 249,
ExportSpecifier = 250,
MissingDeclaration = 251,
ExternalModuleReference = 252,
JsxElement = 253,
JsxSelfClosingElement = 254,
JsxOpeningElement = 255,
JsxClosingElement = 256,
JsxFragment = 257,
JsxOpeningFragment = 258,
JsxClosingFragment = 259,
JsxAttribute = 260,
JsxAttributes = 261,
JsxSpreadAttribute = 262,
JsxExpression = 263,
CaseClause = 264,
DefaultClause = 265,
HeritageClause = 266,
CatchClause = 267,
PropertyAssignment = 268,
ShorthandPropertyAssignment = 269,
SpreadAssignment = 270,
EnumMember = 271,
SourceFile = 272,
Bundle = 273,
JSDocTypeExpression = 274,
JSDocAllType = 275,
JSDocUnknownType = 276,
JSDocNullableType = 277,
JSDocNonNullableType = 278,
JSDocOptionalType = 279,
JSDocFunctionType = 280,
JSDocVariadicType = 281,
JSDocComment = 282,
JSDocTypeLiteral = 283,
JSDocTag = 284,
JSDocAugmentsTag = 285,
JSDocClassTag = 286,
JSDocParameterTag = 287,
JSDocReturnTag = 288,
JSDocTypeTag = 289,
JSDocTemplateTag = 290,
JSDocTypedefTag = 291,
JSDocPropertyTag = 292,
SyntaxList = 293,
NotEmittedStatement = 294,
PartiallyEmittedExpression = 295,
CommaListExpression = 296,
MergeDeclarationMarker = 297,
EndOfDeclarationMarker = 298,
Count = 299,
ImportTypeNode = 178,
ObjectBindingPattern = 179,
ArrayBindingPattern = 180,
BindingElement = 181,
ArrayLiteralExpression = 182,
ObjectLiteralExpression = 183,
PropertyAccessExpression = 184,
ElementAccessExpression = 185,
CallExpression = 186,
NewExpression = 187,
TaggedTemplateExpression = 188,
TypeAssertionExpression = 189,
ParenthesizedExpression = 190,
FunctionExpression = 191,
ArrowFunction = 192,
DeleteExpression = 193,
TypeOfExpression = 194,
VoidExpression = 195,
AwaitExpression = 196,
PrefixUnaryExpression = 197,
PostfixUnaryExpression = 198,
BinaryExpression = 199,
ConditionalExpression = 200,
TemplateExpression = 201,
YieldExpression = 202,
SpreadElement = 203,
ClassExpression = 204,
OmittedExpression = 205,
ExpressionWithTypeArguments = 206,
AsExpression = 207,
NonNullExpression = 208,
MetaProperty = 209,
TemplateSpan = 210,
SemicolonClassElement = 211,
Block = 212,
VariableStatement = 213,
EmptyStatement = 214,
ExpressionStatement = 215,
IfStatement = 216,
DoStatement = 217,
WhileStatement = 218,
ForStatement = 219,
ForInStatement = 220,
ForOfStatement = 221,
ContinueStatement = 222,
BreakStatement = 223,
ReturnStatement = 224,
WithStatement = 225,
SwitchStatement = 226,
LabeledStatement = 227,
ThrowStatement = 228,
TryStatement = 229,
DebuggerStatement = 230,
VariableDeclaration = 231,
VariableDeclarationList = 232,
FunctionDeclaration = 233,
ClassDeclaration = 234,
InterfaceDeclaration = 235,
TypeAliasDeclaration = 236,
EnumDeclaration = 237,
ModuleDeclaration = 238,
ModuleBlock = 239,
CaseBlock = 240,
NamespaceExportDeclaration = 241,
ImportEqualsDeclaration = 242,
ImportDeclaration = 243,
ImportClause = 244,
NamespaceImport = 245,
NamedImports = 246,
ImportSpecifier = 247,
ExportAssignment = 248,
ExportDeclaration = 249,
NamedExports = 250,
ExportSpecifier = 251,
MissingDeclaration = 252,
ExternalModuleReference = 253,
JsxElement = 254,
JsxSelfClosingElement = 255,
JsxOpeningElement = 256,
JsxClosingElement = 257,
JsxFragment = 258,
JsxOpeningFragment = 259,
JsxClosingFragment = 260,
JsxAttribute = 261,
JsxAttributes = 262,
JsxSpreadAttribute = 263,
JsxExpression = 264,
CaseClause = 265,
DefaultClause = 266,
HeritageClause = 267,
CatchClause = 268,
PropertyAssignment = 269,
ShorthandPropertyAssignment = 270,
SpreadAssignment = 271,
EnumMember = 272,
SourceFile = 273,
Bundle = 274,
JSDocTypeExpression = 275,
JSDocAllType = 276,
JSDocUnknownType = 277,
JSDocNullableType = 278,
JSDocNonNullableType = 279,
JSDocOptionalType = 280,
JSDocFunctionType = 281,
JSDocVariadicType = 282,
JSDocComment = 283,
JSDocTypeLiteral = 284,
JSDocTag = 285,
JSDocAugmentsTag = 286,
JSDocClassTag = 287,
JSDocParameterTag = 288,
JSDocReturnTag = 289,
JSDocTypeTag = 290,
JSDocTemplateTag = 291,
JSDocTypedefTag = 292,
JSDocPropertyTag = 293,
SyntaxList = 294,
NotEmittedStatement = 295,
PartiallyEmittedExpression = 296,
CommaListExpression = 297,
MergeDeclarationMarker = 298,
EndOfDeclarationMarker = 299,
Count = 300,
FirstAssignment = 58,
LastAssignment = 70,
FirstCompoundAssignment = 59,
@@ -373,7 +374,7 @@ declare namespace ts {
FirstFutureReservedWord = 108,
LastFutureReservedWord = 116,
FirstTypeNode = 160,
LastTypeNode = 177,
LastTypeNode = 178,
FirstPunctuation = 17,
LastPunctuation = 70,
FirstToken = 0,
@@ -387,10 +388,10 @@ declare namespace ts {
FirstBinaryOperator = 27,
LastBinaryOperator = 70,
FirstNode = 145,
FirstJSDocNode = 274,
LastJSDocNode = 292,
FirstJSDocTagNode = 284,
LastJSDocTagNode = 292
FirstJSDocNode = 275,
LastJSDocNode = 293,
FirstJSDocTagNode = 285,
LastJSDocTagNode = 293
}
enum NodeFlags {
None = 0,
@@ -697,6 +698,12 @@ declare namespace ts {
interface KeywordTypeNode extends TypeNode {
kind: SyntaxKind.AnyKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.VoidKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.NullKeyword | SyntaxKind.NeverKeyword;
}
interface ImportTypeNode extends NodeWithTypeArguments {
kind: SyntaxKind.ImportTypeNode;
isTypeOf?: boolean;
argument: TypeNode;
qualifier?: EntityName;
}
interface ThisTypeNode extends TypeNode {
kind: SyntaxKind.ThisType;
}
@@ -707,11 +714,13 @@ declare namespace ts {
interface ConstructorTypeNode extends TypeNode, SignatureDeclarationBase {
kind: SyntaxKind.ConstructorType;
}
interface NodeWithTypeArguments extends TypeNode {
typeArguments?: NodeArray<TypeNode>;
}
type TypeReferenceType = TypeReferenceNode | ExpressionWithTypeArguments;
interface TypeReferenceNode extends TypeNode {
interface TypeReferenceNode extends NodeWithTypeArguments {
kind: SyntaxKind.TypeReference;
typeName: EntityName;
typeArguments?: NodeArray<TypeNode>;
}
interface TypePredicateNode extends TypeNode {
kind: SyntaxKind.TypePredicate;
@@ -1027,11 +1036,10 @@ declare namespace ts {
interface ImportCall extends CallExpression {
expression: ImportExpression;
}
interface ExpressionWithTypeArguments extends TypeNode {
interface ExpressionWithTypeArguments extends NodeWithTypeArguments {
kind: SyntaxKind.ExpressionWithTypeArguments;
parent?: HeritageClause;
expression: LeftHandSideExpression;
typeArguments?: NodeArray<TypeNode>;
}
interface NewExpression extends PrimaryExpression, Declaration {
kind: SyntaxKind.NewExpression;
@@ -3521,6 +3529,8 @@ declare namespace ts {
function updateConditionalTypeNode(node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode;
function createInferTypeNode(typeParameter: TypeParameterDeclaration): InferTypeNode;
function updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration): InferTypeNode;
function createImportTypeNode(argument: TypeNode, qualifier?: EntityName, typeArguments?: ReadonlyArray<TypeNode>, isTypeOf?: boolean): ImportTypeNode;
function updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier?: EntityName, typeArguments?: ReadonlyArray<TypeNode>, isTypeOf?: boolean): ImportTypeNode;
function createParenthesizedType(type: TypeNode): ParenthesizedTypeNode;
function updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode;
function createThisTypeNode(): ThisTypeNode;
+141 -131
View File
@@ -240,128 +240,129 @@ declare namespace ts {
IndexedAccessType = 175,
MappedType = 176,
LiteralType = 177,
ObjectBindingPattern = 178,
ArrayBindingPattern = 179,
BindingElement = 180,
ArrayLiteralExpression = 181,
ObjectLiteralExpression = 182,
PropertyAccessExpression = 183,
ElementAccessExpression = 184,
CallExpression = 185,
NewExpression = 186,
TaggedTemplateExpression = 187,
TypeAssertionExpression = 188,
ParenthesizedExpression = 189,
FunctionExpression = 190,
ArrowFunction = 191,
DeleteExpression = 192,
TypeOfExpression = 193,
VoidExpression = 194,
AwaitExpression = 195,
PrefixUnaryExpression = 196,
PostfixUnaryExpression = 197,
BinaryExpression = 198,
ConditionalExpression = 199,
TemplateExpression = 200,
YieldExpression = 201,
SpreadElement = 202,
ClassExpression = 203,
OmittedExpression = 204,
ExpressionWithTypeArguments = 205,
AsExpression = 206,
NonNullExpression = 207,
MetaProperty = 208,
TemplateSpan = 209,
SemicolonClassElement = 210,
Block = 211,
VariableStatement = 212,
EmptyStatement = 213,
ExpressionStatement = 214,
IfStatement = 215,
DoStatement = 216,
WhileStatement = 217,
ForStatement = 218,
ForInStatement = 219,
ForOfStatement = 220,
ContinueStatement = 221,
BreakStatement = 222,
ReturnStatement = 223,
WithStatement = 224,
SwitchStatement = 225,
LabeledStatement = 226,
ThrowStatement = 227,
TryStatement = 228,
DebuggerStatement = 229,
VariableDeclaration = 230,
VariableDeclarationList = 231,
FunctionDeclaration = 232,
ClassDeclaration = 233,
InterfaceDeclaration = 234,
TypeAliasDeclaration = 235,
EnumDeclaration = 236,
ModuleDeclaration = 237,
ModuleBlock = 238,
CaseBlock = 239,
NamespaceExportDeclaration = 240,
ImportEqualsDeclaration = 241,
ImportDeclaration = 242,
ImportClause = 243,
NamespaceImport = 244,
NamedImports = 245,
ImportSpecifier = 246,
ExportAssignment = 247,
ExportDeclaration = 248,
NamedExports = 249,
ExportSpecifier = 250,
MissingDeclaration = 251,
ExternalModuleReference = 252,
JsxElement = 253,
JsxSelfClosingElement = 254,
JsxOpeningElement = 255,
JsxClosingElement = 256,
JsxFragment = 257,
JsxOpeningFragment = 258,
JsxClosingFragment = 259,
JsxAttribute = 260,
JsxAttributes = 261,
JsxSpreadAttribute = 262,
JsxExpression = 263,
CaseClause = 264,
DefaultClause = 265,
HeritageClause = 266,
CatchClause = 267,
PropertyAssignment = 268,
ShorthandPropertyAssignment = 269,
SpreadAssignment = 270,
EnumMember = 271,
SourceFile = 272,
Bundle = 273,
JSDocTypeExpression = 274,
JSDocAllType = 275,
JSDocUnknownType = 276,
JSDocNullableType = 277,
JSDocNonNullableType = 278,
JSDocOptionalType = 279,
JSDocFunctionType = 280,
JSDocVariadicType = 281,
JSDocComment = 282,
JSDocTypeLiteral = 283,
JSDocTag = 284,
JSDocAugmentsTag = 285,
JSDocClassTag = 286,
JSDocParameterTag = 287,
JSDocReturnTag = 288,
JSDocTypeTag = 289,
JSDocTemplateTag = 290,
JSDocTypedefTag = 291,
JSDocPropertyTag = 292,
SyntaxList = 293,
NotEmittedStatement = 294,
PartiallyEmittedExpression = 295,
CommaListExpression = 296,
MergeDeclarationMarker = 297,
EndOfDeclarationMarker = 298,
Count = 299,
ImportTypeNode = 178,
ObjectBindingPattern = 179,
ArrayBindingPattern = 180,
BindingElement = 181,
ArrayLiteralExpression = 182,
ObjectLiteralExpression = 183,
PropertyAccessExpression = 184,
ElementAccessExpression = 185,
CallExpression = 186,
NewExpression = 187,
TaggedTemplateExpression = 188,
TypeAssertionExpression = 189,
ParenthesizedExpression = 190,
FunctionExpression = 191,
ArrowFunction = 192,
DeleteExpression = 193,
TypeOfExpression = 194,
VoidExpression = 195,
AwaitExpression = 196,
PrefixUnaryExpression = 197,
PostfixUnaryExpression = 198,
BinaryExpression = 199,
ConditionalExpression = 200,
TemplateExpression = 201,
YieldExpression = 202,
SpreadElement = 203,
ClassExpression = 204,
OmittedExpression = 205,
ExpressionWithTypeArguments = 206,
AsExpression = 207,
NonNullExpression = 208,
MetaProperty = 209,
TemplateSpan = 210,
SemicolonClassElement = 211,
Block = 212,
VariableStatement = 213,
EmptyStatement = 214,
ExpressionStatement = 215,
IfStatement = 216,
DoStatement = 217,
WhileStatement = 218,
ForStatement = 219,
ForInStatement = 220,
ForOfStatement = 221,
ContinueStatement = 222,
BreakStatement = 223,
ReturnStatement = 224,
WithStatement = 225,
SwitchStatement = 226,
LabeledStatement = 227,
ThrowStatement = 228,
TryStatement = 229,
DebuggerStatement = 230,
VariableDeclaration = 231,
VariableDeclarationList = 232,
FunctionDeclaration = 233,
ClassDeclaration = 234,
InterfaceDeclaration = 235,
TypeAliasDeclaration = 236,
EnumDeclaration = 237,
ModuleDeclaration = 238,
ModuleBlock = 239,
CaseBlock = 240,
NamespaceExportDeclaration = 241,
ImportEqualsDeclaration = 242,
ImportDeclaration = 243,
ImportClause = 244,
NamespaceImport = 245,
NamedImports = 246,
ImportSpecifier = 247,
ExportAssignment = 248,
ExportDeclaration = 249,
NamedExports = 250,
ExportSpecifier = 251,
MissingDeclaration = 252,
ExternalModuleReference = 253,
JsxElement = 254,
JsxSelfClosingElement = 255,
JsxOpeningElement = 256,
JsxClosingElement = 257,
JsxFragment = 258,
JsxOpeningFragment = 259,
JsxClosingFragment = 260,
JsxAttribute = 261,
JsxAttributes = 262,
JsxSpreadAttribute = 263,
JsxExpression = 264,
CaseClause = 265,
DefaultClause = 266,
HeritageClause = 267,
CatchClause = 268,
PropertyAssignment = 269,
ShorthandPropertyAssignment = 270,
SpreadAssignment = 271,
EnumMember = 272,
SourceFile = 273,
Bundle = 274,
JSDocTypeExpression = 275,
JSDocAllType = 276,
JSDocUnknownType = 277,
JSDocNullableType = 278,
JSDocNonNullableType = 279,
JSDocOptionalType = 280,
JSDocFunctionType = 281,
JSDocVariadicType = 282,
JSDocComment = 283,
JSDocTypeLiteral = 284,
JSDocTag = 285,
JSDocAugmentsTag = 286,
JSDocClassTag = 287,
JSDocParameterTag = 288,
JSDocReturnTag = 289,
JSDocTypeTag = 290,
JSDocTemplateTag = 291,
JSDocTypedefTag = 292,
JSDocPropertyTag = 293,
SyntaxList = 294,
NotEmittedStatement = 295,
PartiallyEmittedExpression = 296,
CommaListExpression = 297,
MergeDeclarationMarker = 298,
EndOfDeclarationMarker = 299,
Count = 300,
FirstAssignment = 58,
LastAssignment = 70,
FirstCompoundAssignment = 59,
@@ -373,7 +374,7 @@ declare namespace ts {
FirstFutureReservedWord = 108,
LastFutureReservedWord = 116,
FirstTypeNode = 160,
LastTypeNode = 177,
LastTypeNode = 178,
FirstPunctuation = 17,
LastPunctuation = 70,
FirstToken = 0,
@@ -387,10 +388,10 @@ declare namespace ts {
FirstBinaryOperator = 27,
LastBinaryOperator = 70,
FirstNode = 145,
FirstJSDocNode = 274,
LastJSDocNode = 292,
FirstJSDocTagNode = 284,
LastJSDocTagNode = 292
FirstJSDocNode = 275,
LastJSDocNode = 293,
FirstJSDocTagNode = 285,
LastJSDocTagNode = 293
}
enum NodeFlags {
None = 0,
@@ -697,6 +698,12 @@ declare namespace ts {
interface KeywordTypeNode extends TypeNode {
kind: SyntaxKind.AnyKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.VoidKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.NullKeyword | SyntaxKind.NeverKeyword;
}
interface ImportTypeNode extends NodeWithTypeArguments {
kind: SyntaxKind.ImportTypeNode;
isTypeOf?: boolean;
argument: TypeNode;
qualifier?: EntityName;
}
interface ThisTypeNode extends TypeNode {
kind: SyntaxKind.ThisType;
}
@@ -707,11 +714,13 @@ declare namespace ts {
interface ConstructorTypeNode extends TypeNode, SignatureDeclarationBase {
kind: SyntaxKind.ConstructorType;
}
interface NodeWithTypeArguments extends TypeNode {
typeArguments?: NodeArray<TypeNode>;
}
type TypeReferenceType = TypeReferenceNode | ExpressionWithTypeArguments;
interface TypeReferenceNode extends TypeNode {
interface TypeReferenceNode extends NodeWithTypeArguments {
kind: SyntaxKind.TypeReference;
typeName: EntityName;
typeArguments?: NodeArray<TypeNode>;
}
interface TypePredicateNode extends TypeNode {
kind: SyntaxKind.TypePredicate;
@@ -1027,11 +1036,10 @@ declare namespace ts {
interface ImportCall extends CallExpression {
expression: ImportExpression;
}
interface ExpressionWithTypeArguments extends TypeNode {
interface ExpressionWithTypeArguments extends NodeWithTypeArguments {
kind: SyntaxKind.ExpressionWithTypeArguments;
parent?: HeritageClause;
expression: LeftHandSideExpression;
typeArguments?: NodeArray<TypeNode>;
}
interface NewExpression extends PrimaryExpression, Declaration {
kind: SyntaxKind.NewExpression;
@@ -3468,6 +3476,8 @@ declare namespace ts {
function updateConditionalTypeNode(node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode;
function createInferTypeNode(typeParameter: TypeParameterDeclaration): InferTypeNode;
function updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration): InferTypeNode;
function createImportTypeNode(argument: TypeNode, qualifier?: EntityName, typeArguments?: ReadonlyArray<TypeNode>, isTypeOf?: boolean): ImportTypeNode;
function updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier?: EntityName, typeArguments?: ReadonlyArray<TypeNode>, isTypeOf?: boolean): ImportTypeNode;
function createParenthesizedType(type: TypeNode): ParenthesizedTypeNode;
function updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode;
function createThisTypeNode(): ThisTypeNode;
@@ -10,7 +10,7 @@ let a: x.A; // should not work
=== tests/cases/compiler/file1.d.ts ===
declare module "file1" {
>"file1" : typeof "file1"
>"file1" : typeof import("file1")
var x: number;
>x : number
@@ -10,7 +10,7 @@ let a: x.A; // should not work
=== tests/cases/compiler/file1.d.ts ===
declare module "file1" {
>"file1" : typeof "file1"
>"file1" : typeof import("file1")
function foo(): void;
>foo : () => void
@@ -1,6 +1,6 @@
=== tests/cases/compiler/file1.d.ts ===
declare module "file1" {
>"file1" : typeof "file1"
>"file1" : typeof import("file1")
function foo(): void;
>foo : typeof foo
@@ -1,6 +1,6 @@
=== tests/cases/compiler/file1.d.ts ===
declare module "file1" {
>"file1" : typeof "file1"
>"file1" : typeof import("file1")
class foo {}
>foo : foo
@@ -13,7 +13,7 @@ declare module Express {
}
declare module "express" {
>"express" : typeof "express"
>"express" : typeof import("express")
function e(): e.Express;
>e : typeof e
@@ -1,6 +1,6 @@
=== tests/cases/compiler/file1.d.ts ===
declare module "file1" {
>"file1" : typeof "file1"
>"file1" : typeof import("file1")
class foo {}
>foo : foo
@@ -13,7 +13,7 @@ import * as lib from "lib";
>lib : () => void
declare module "lib" {
>"lib" : typeof "lib"
>"lib" : typeof import("lib")
export function fn(): void;
>fn : () => void
@@ -6,7 +6,7 @@ import * as http from 'intern/dojo/node!http';
=== tests/cases/compiler/a.d.ts ===
declare module "http" {
>"http" : typeof "http"
>"http" : typeof import("http")
}
declare module 'intern/dojo/node!http' {
@@ -6,7 +6,7 @@ const x = 0;
exports.y = 1;
>exports.y = 1 : 1
>exports.y : number
>exports : typeof "/a"
>exports : typeof import("/a")
>y : number
>1 : 1
@@ -20,7 +20,7 @@ export const x = 0;
=== /types/bar.d.ts ===
declare module "bar" {
>"bar" : typeof "bar"
>"bar" : typeof import("bar")
export const y = 0;
>y : 0
@@ -2,13 +2,13 @@
exports.x = 0;
>exports.x = 0 : 0
>exports.x : number
>exports : typeof "/a"
>exports : typeof import("/a")
>x : number
>0 : 0
exports.x;
>exports.x : number
>exports : typeof "/a"
>exports : typeof import("/a")
>x : number
// Works nested
@@ -17,7 +17,7 @@ exports.x;
exports.Cls = function() {
>exports.Cls = function() { this.x = 0; } : () => void
>exports.Cls : () => void
>exports : typeof "/a"
>exports : typeof import("/a")
>Cls : () => void
>function() { this.x = 0; } : () => void
@@ -34,6 +34,6 @@ const instance = new exports.Cls();
>instance : { x: number; }
>new exports.Cls() : { x: number; }
>exports.Cls : () => void
>exports : typeof "/a"
>exports : typeof import("/a")
>Cls : () => void
@@ -3804,7 +3804,7 @@ declare module Immutable {
}
}
declare module "immutable" {
>"immutable" : typeof "immutable"
>"immutable" : typeof import("immutable")
export = Immutable
>Immutable : typeof Immutable
@@ -1,6 +1,6 @@
=== tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts ===
declare module "fs" {
>"fs" : typeof "fs"
>"fs" : typeof import("fs")
export class File {
>File : File
@@ -1,6 +1,6 @@
=== tests/cases/compiler/cyclicModuleImport.ts ===
declare module "SubModule" {
>"SubModule" : typeof "SubModule"
>"SubModule" : typeof import("SubModule")
import MainModule = require('MainModule');
>MainModule : typeof MainModule
@@ -24,7 +24,7 @@ declare module "SubModule" {
>SubModule : SubModule
}
declare module "MainModule" {
>"MainModule" : typeof "MainModule"
>"MainModule" : typeof import("MainModule")
import SubModule = require('SubModule');
>SubModule : typeof SubModule
@@ -1,6 +1,6 @@
=== tests/cases/compiler/declFileAliasUseBeforeDeclaration2.ts ===
declare module "test" {
>"test" : typeof "test"
>"test" : typeof import("test")
module A {
>A : typeof A
@@ -13,7 +13,7 @@ export var x: SubModule.m.m3.c;
=== tests/cases/compiler/declFileAmbientExternalModuleWithSingleExportedModule_0.ts ===
declare module "SubModule" {
>"SubModule" : typeof "SubModule"
>"SubModule" : typeof import("SubModule")
export module m {
>m : any
@@ -1,10 +1,10 @@
=== tests/cases/compiler/declarationEmitRelativeModuleError.ts ===
declare module "b:block" { // <-- no error anymore
>"b:block" : typeof "b:block"
>"b:block" : typeof import("b:block")
}
declare module "b:/block" { // <-- still an error
>"b:/block" : typeof "b:/block"
>"b:/block" : typeof import("b:/block")
}
@@ -15,7 +15,7 @@ export class A {
=== tests/cases/compiler/b.ts ===
export {}
declare module "./a" {
>"./a" : typeof "tests/cases/compiler/a"
>"./a" : typeof import("tests/cases/compiler/a")
interface A {
>A : A
@@ -1,6 +1,6 @@
=== tests/cases/compiler/declareExternalModuleWithExportAssignedFundule.ts ===
declare module "express" {
>"express" : typeof "express"
>"express" : typeof import("express")
export = express;
>express : typeof express
@@ -1,6 +1,6 @@
=== tests/cases/compiler/es5ExportDefaultClassDeclaration4.ts ===
declare module "foo" {
>"foo" : typeof "foo"
>"foo" : typeof import("foo")
export var before: C;
>before : C
@@ -1,6 +1,6 @@
=== tests/cases/compiler/es5ExportDefaultFunctionDeclaration4.ts ===
declare module "bar" {
>"bar" : typeof "bar"
>"bar" : typeof import("bar")
var before: typeof func;
>before : () => typeof func
@@ -1,6 +1,6 @@
=== tests/cases/compiler/modules.d.ts ===
declare module "a" {
>"a" : typeof "a"
>"a" : typeof import("a")
var a: number;
>a : number
@@ -320,7 +320,7 @@ export * from "class-module";
=== tests/cases/compiler/modules.d.ts ===
declare module "interface" {
>"interface" : typeof "interface"
>"interface" : typeof import("interface")
interface Foo {
>Foo : Foo
@@ -336,7 +336,7 @@ declare module "interface" {
}
declare module "variable" {
>"variable" : typeof "variable"
>"variable" : typeof import("variable")
var Foo: {
>Foo : { a: number; b: number; }
@@ -352,7 +352,7 @@ declare module "variable" {
}
declare module "interface-variable" {
>"interface-variable" : typeof "interface-variable"
>"interface-variable" : typeof import("interface-variable")
interface Foo {
>Foo : Foo
@@ -377,7 +377,7 @@ declare module "interface-variable" {
}
declare module "module" {
>"module" : typeof "module"
>"module" : typeof import("module")
module Foo {
>Foo : typeof Foo
@@ -393,7 +393,7 @@ declare module "module" {
}
declare module "interface-module" {
>"interface-module" : typeof "interface-module"
>"interface-module" : typeof import("interface-module")
interface Foo {
>Foo : Foo
@@ -418,7 +418,7 @@ declare module "interface-module" {
}
declare module "variable-module" {
>"variable-module" : typeof "variable-module"
>"variable-module" : typeof import("variable-module")
module Foo {
>Foo : { a: number; b: number; }
@@ -447,7 +447,7 @@ declare module "variable-module" {
}
declare module "function" {
>"function" : typeof "function"
>"function" : typeof import("function")
function foo();
>foo : () => any
@@ -457,7 +457,7 @@ declare module "function" {
}
declare module "function-module" {
>"function-module" : typeof "function-module"
>"function-module" : typeof import("function-module")
function foo();
>foo : typeof foo
@@ -476,7 +476,7 @@ declare module "function-module" {
}
declare module "class" {
>"class" : typeof "class"
>"class" : typeof import("class")
class Foo {
>Foo : Foo
@@ -492,7 +492,7 @@ declare module "class" {
}
declare module "class-module" {
>"class-module" : typeof "class-module"
>"class-module" : typeof import("class-module")
class Foo {
>Foo : Foo
@@ -1,13 +1,13 @@
=== tests/cases/compiler/server.d.ts ===
declare module "other" {
>"other" : typeof "other"
>"other" : typeof import("other")
export class C { }
>C : C
}
declare module "server" {
>"server" : typeof "server"
>"server" : typeof import("server")
import events = require("other"); // Ambient declaration, no error expected.
>events : typeof events
@@ -1,6 +1,6 @@
=== tests/cases/compiler/types.d.ts ===
declare module "tslib" { export const __exportStar: any; export const __importDefault: any; export const __importStar: any; }
>"tslib" : typeof "tslib"
>"tslib" : typeof import("tslib")
>__exportStar : any
>__importDefault : any
>__importStar : any
@@ -5,5 +5,5 @@ export var X;
>X : any
export as namespace N
>N : typeof "tests/cases/compiler/exportAsNamespace"
>N : typeof import("tests/cases/compiler/exportAsNamespace")
@@ -1,6 +1,6 @@
=== tests/cases/compiler/exportDeclarationsInAmbientNamespaces2.ts ===
declare module "mod" {
>"mod" : typeof "mod"
>"mod" : typeof import("mod")
export var x: number;
>x : number
@@ -56,7 +56,7 @@ declare namespace foo.bar {
}
declare module "foobar" {
>"foobar" : typeof "foobar"
>"foobar" : typeof import("foobar")
export default foo.bar;
>foo.bar : typeof foo.bar
@@ -65,7 +65,7 @@ declare module "foobar" {
}
declare module "foobarx" {
>"foobarx" : typeof "foobarx"
>"foobarx" : typeof import("foobarx")
export default foo.bar.X;
>foo.bar.X : number
@@ -51,7 +51,7 @@ declare namespace foo.bar {
}
declare module "foobar" {
>"foobar" : typeof "foobar"
>"foobar" : typeof import("foobar")
export = foo.bar;
>foo.bar : typeof foo.bar
@@ -60,7 +60,7 @@ declare module "foobar" {
}
declare module "foobarx" {
>"foobarx" : typeof "foobarx"
>"foobarx" : typeof import("foobarx")
export = foo.bar.X;
>foo.bar.X : number
@@ -2,7 +2,7 @@
exports.n = {};
>exports.n = {} : typeof __object
>exports.n : typeof __object
>exports : typeof "tests/cases/conformance/salsa/mod"
>exports : typeof import("tests/cases/conformance/salsa/mod")
>n : typeof __object
>{} : typeof __object
@@ -10,7 +10,7 @@ exports.n.K = function () {
>exports.n.K = function () { this.x = 10;} : () => void
>exports.n.K : () => void
>exports.n : typeof __object
>exports : typeof "tests/cases/conformance/salsa/mod"
>exports : typeof import("tests/cases/conformance/salsa/mod")
>n : typeof __object
>K : () => void
>function () { this.x = 10;} : () => void
@@ -25,7 +25,7 @@ exports.n.K = function () {
exports.Classic = class {
>exports.Classic = class { constructor() { this.p = 1 }} : typeof (Anonymous class)
>exports.Classic : typeof (Anonymous class)
>exports : typeof "tests/cases/conformance/salsa/mod"
>exports : typeof import("tests/cases/conformance/salsa/mod")
>Classic : typeof (Anonymous class)
>class { constructor() { this.p = 1 }} : typeof (Anonymous class)
@@ -1,9 +1,9 @@
tests/cases/conformance/salsa/first.js(1,1): error TS2539: Cannot assign to '"tests/cases/conformance/salsa/first"' because it is not a variable.
tests/cases/conformance/salsa/first.js(1,11): error TS2304: Cannot find name 'require'.
tests/cases/conformance/salsa/first.js(2,9): error TS2339: Property 'formatters' does not exist on type 'typeof "tests/cases/conformance/salsa/first"'.
tests/cases/conformance/salsa/first.js(2,9): error TS2339: Property 'formatters' does not exist on type 'typeof import("tests/cases/conformance/salsa/first")'.
tests/cases/conformance/salsa/second.js(1,1): error TS2539: Cannot assign to '"tests/cases/conformance/salsa/second"' because it is not a variable.
tests/cases/conformance/salsa/second.js(1,11): error TS2304: Cannot find name 'require'.
tests/cases/conformance/salsa/second.js(2,9): error TS2339: Property 'formatters' does not exist on type 'typeof "tests/cases/conformance/salsa/second"'.
tests/cases/conformance/salsa/second.js(2,9): error TS2339: Property 'formatters' does not exist on type 'typeof import("tests/cases/conformance/salsa/second")'.
==== tests/cases/conformance/salsa/mod.js (0 errors) ====
@@ -17,7 +17,7 @@ tests/cases/conformance/salsa/second.js(2,9): error TS2339: Property 'formatters
!!! error TS2304: Cannot find name 'require'.
exports.formatters.j = function (v) {
~~~~~~~~~~
!!! error TS2339: Property 'formatters' does not exist on type 'typeof "tests/cases/conformance/salsa/first"'.
!!! error TS2339: Property 'formatters' does not exist on type 'typeof import("tests/cases/conformance/salsa/first")'.
return v
}
==== tests/cases/conformance/salsa/second.js (3 errors) ====
@@ -28,7 +28,7 @@ tests/cases/conformance/salsa/second.js(2,9): error TS2339: Property 'formatters
!!! error TS2304: Cannot find name 'require'.
exports.formatters.o = function (v) {
~~~~~~~~~~
!!! error TS2339: Property 'formatters' does not exist on type 'typeof "tests/cases/conformance/salsa/second"'.
!!! error TS2339: Property 'formatters' does not exist on type 'typeof import("tests/cases/conformance/salsa/second")'.
return v
}
@@ -3,15 +3,15 @@
exports.formatters = {}
>exports.formatters = {} : { [x: string]: any; }
>exports.formatters : { [x: string]: any; }
>exports : typeof "tests/cases/conformance/salsa/mod"
>exports : typeof import("tests/cases/conformance/salsa/mod")
>formatters : { [x: string]: any; }
>{} : { [x: string]: any; }
=== tests/cases/conformance/salsa/first.js ===
exports = require('./mod')
>exports = require('./mod') : typeof "tests/cases/conformance/salsa/mod"
>exports = require('./mod') : typeof import("tests/cases/conformance/salsa/mod")
>exports : any
>require('./mod') : typeof "tests/cases/conformance/salsa/mod"
>require('./mod') : typeof import("tests/cases/conformance/salsa/mod")
>require : any
>'./mod' : "./mod"
@@ -19,7 +19,7 @@ exports.formatters.j = function (v) {
>exports.formatters.j = function (v) { return v} : (v: any) => any
>exports.formatters.j : any
>exports.formatters : any
>exports : typeof "tests/cases/conformance/salsa/first"
>exports : typeof import("tests/cases/conformance/salsa/first")
>formatters : any
>j : any
>function (v) { return v} : (v: any) => any
@@ -30,9 +30,9 @@ exports.formatters.j = function (v) {
}
=== tests/cases/conformance/salsa/second.js ===
exports = require('./mod')
>exports = require('./mod') : typeof "tests/cases/conformance/salsa/mod"
>exports = require('./mod') : typeof import("tests/cases/conformance/salsa/mod")
>exports : any
>require('./mod') : typeof "tests/cases/conformance/salsa/mod"
>require('./mod') : typeof import("tests/cases/conformance/salsa/mod")
>require : any
>'./mod' : "./mod"
@@ -40,7 +40,7 @@ exports.formatters.o = function (v) {
>exports.formatters.o = function (v) { return v} : (v: any) => any
>exports.formatters.o : any
>exports.formatters : any
>exports : typeof "tests/cases/conformance/salsa/second"
>exports : typeof import("tests/cases/conformance/salsa/second")
>formatters : any
>o : any
>function (v) { return v} : (v: any) => any
@@ -1,6 +1,6 @@
=== tests/cases/compiler/exportSpecifierAndExportedMemberDeclaration.ts ===
declare module "m2" {
>"m2" : typeof "m2"
>"m2" : typeof import("m2")
export module X {
>X : () => any
@@ -22,7 +22,7 @@ declare module "m2" {
}
declare module "m2" {
>"m2" : typeof "m2"
>"m2" : typeof import("m2")
function Z2(): X.I;
>Z2 : () => X.I
@@ -1,6 +1,6 @@
=== tests/cases/compiler/exportSpecifierAndLocalMemberDeclaration.ts ===
declare module "m2" {
>"m2" : typeof "m2"
>"m2" : typeof import("m2")
module X {
>X : any
@@ -22,7 +22,7 @@ declare module "m2" {
}
declare module "m2" {
>"m2" : typeof "m2"
>"m2" : typeof import("m2")
function Z2(): X.I;
>Z2 : () => any
@@ -4,7 +4,7 @@ declare module X { export interface bar { } }
>bar : bar
declare module "m" {
>"m" : typeof "m"
>"m" : typeof import("m")
export { X };
>X : any
@@ -4,7 +4,7 @@ declare module X { export interface bar { } }
>bar : bar
declare module "m" {
>"m" : typeof "m"
>"m" : typeof import("m")
module X { export interface foo { } }
>X : any
@@ -4,7 +4,7 @@ export var x: number
=== tests/cases/compiler/main.ts ===
declare module "M" {
>"M" : typeof "M"
>"M" : typeof import("M")
export {x} from "external"
>x : number
@@ -4,7 +4,7 @@ export default class C {}
=== tests/cases/compiler/main.ts ===
declare module "M" {
>"M" : typeof "M"
>"M" : typeof import("M")
export * from "external"
}
@@ -1,9 +1,9 @@
=== tests/cases/compiler/bar.ts ===
export async function foo({ foo = await import("./bar") }) {
>foo : ({ foo }: { foo?: typeof "tests/cases/compiler/bar"; }) => Promise<void>
>foo : typeof "tests/cases/compiler/bar"
>await import("./bar") : typeof "tests/cases/compiler/bar"
>import("./bar") : Promise<typeof "tests/cases/compiler/bar">
>foo : ({ foo }: { foo?: typeof import("tests/cases/compiler/bar"); }) => Promise<void>
>foo : typeof import("tests/cases/compiler/bar")
>await import("./bar") : typeof import("tests/cases/compiler/bar")
>import("./bar") : Promise<typeof import("tests/cases/compiler/bar")>
>"./bar" : "./bar"
}
@@ -1,25 +1,25 @@
tests/cases/compiler/f2.ts(6,7): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
tests/cases/compiler/f2.ts(7,7): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
tests/cases/compiler/f2.ts(8,7): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
tests/cases/compiler/f2.ts(8,7): error TS2339: Property 'blah' does not exist on type 'typeof import("tests/cases/compiler/f1")'.
tests/cases/compiler/f2.ts(11,7): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
tests/cases/compiler/f2.ts(12,7): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
tests/cases/compiler/f2.ts(16,8): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
tests/cases/compiler/f2.ts(17,8): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
tests/cases/compiler/f2.ts(18,8): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
tests/cases/compiler/f2.ts(18,8): error TS2339: Property 'blah' does not exist on type 'typeof import("tests/cases/compiler/f1")'.
tests/cases/compiler/f2.ts(21,8): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
tests/cases/compiler/f2.ts(22,8): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
tests/cases/compiler/f2.ts(26,12): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
tests/cases/compiler/f2.ts(27,12): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
tests/cases/compiler/f2.ts(28,12): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
tests/cases/compiler/f2.ts(29,12): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
tests/cases/compiler/f2.ts(30,12): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
tests/cases/compiler/f2.ts(31,12): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
tests/cases/compiler/f2.ts(30,12): error TS2339: Property 'blah' does not exist on type 'typeof import("tests/cases/compiler/f1")'.
tests/cases/compiler/f2.ts(31,12): error TS2339: Property 'blah' does not exist on type 'typeof import("tests/cases/compiler/f1")'.
tests/cases/compiler/f2.ts(35,13): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
tests/cases/compiler/f2.ts(36,13): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
tests/cases/compiler/f2.ts(37,13): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
tests/cases/compiler/f2.ts(38,13): error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
tests/cases/compiler/f2.ts(39,13): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
tests/cases/compiler/f2.ts(40,13): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
tests/cases/compiler/f2.ts(39,13): error TS2339: Property 'blah' does not exist on type 'typeof import("tests/cases/compiler/f1")'.
tests/cases/compiler/f2.ts(40,13): error TS2339: Property 'blah' does not exist on type 'typeof import("tests/cases/compiler/f1")'.
==== tests/cases/compiler/f1.ts (0 errors) ====
@@ -39,7 +39,7 @@ tests/cases/compiler/f2.ts(40,13): error TS2339: Property 'blah' does not exist
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
stuff.blah = 2;
~~~~
!!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
!!! error TS2339: Property 'blah' does not exist on type 'typeof import("tests/cases/compiler/f1")'.
stuff[n] = 3;
stuff.x++;
@@ -59,7 +59,7 @@ tests/cases/compiler/f2.ts(40,13): error TS2339: Property 'blah' does not exist
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
(stuff.blah) = 2;
~~~~
!!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
!!! error TS2339: Property 'blah' does not exist on type 'typeof import("tests/cases/compiler/f1")'.
(stuff[n]) = 3;
(stuff.x)++;
@@ -85,10 +85,10 @@ tests/cases/compiler/f2.ts(40,13): error TS2339: Property 'blah' does not exist
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
for (stuff.blah in []) {}
~~~~
!!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
!!! error TS2339: Property 'blah' does not exist on type 'typeof import("tests/cases/compiler/f1")'.
for (stuff.blah of []) {}
~~~~
!!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
!!! error TS2339: Property 'blah' does not exist on type 'typeof import("tests/cases/compiler/f1")'.
for (stuff[n] in []) {}
for (stuff[n] of []) {}
@@ -106,10 +106,10 @@ tests/cases/compiler/f2.ts(40,13): error TS2339: Property 'blah' does not exist
!!! error TS2540: Cannot assign to 'x' because it is a constant or a read-only property.
for ((stuff.blah) in []) {}
~~~~
!!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
!!! error TS2339: Property 'blah' does not exist on type 'typeof import("tests/cases/compiler/f1")'.
for ((stuff.blah) of []) {}
~~~~
!!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'.
!!! error TS2339: Property 'blah' does not exist on type 'typeof import("tests/cases/compiler/f1")'.
for ((stuff[n]) in []) {}
for ((stuff[n]) of []) {}
@@ -1,4 +1,4 @@
tests/cases/compiler/externalModuleRefernceResolutionOrderInImportDeclaration_file3.ts(4,7): error TS2339: Property 'bar' does not exist on type 'typeof "tests/cases/compiler/externalModuleRefernceResolutionOrderInImportDeclaration_file1"'.
tests/cases/compiler/externalModuleRefernceResolutionOrderInImportDeclaration_file3.ts(4,7): error TS2339: Property 'bar' does not exist on type 'typeof import("tests/cases/compiler/externalModuleRefernceResolutionOrderInImportDeclaration_file1")'.
==== tests/cases/compiler/externalModuleRefernceResolutionOrderInImportDeclaration_file3.ts (1 errors) ====
@@ -7,7 +7,7 @@ tests/cases/compiler/externalModuleRefernceResolutionOrderInImportDeclaration_fi
file1.foo();
file1.bar();
~~~
!!! error TS2339: Property 'bar' does not exist on type 'typeof "tests/cases/compiler/externalModuleRefernceResolutionOrderInImportDeclaration_file1"'.
!!! error TS2339: Property 'bar' does not exist on type 'typeof import("tests/cases/compiler/externalModuleRefernceResolutionOrderInImportDeclaration_file1")'.
==== tests/cases/compiler/externalModuleRefernceResolutionOrderInImportDeclaration_file1.ts (0 errors) ====
@@ -22,7 +22,7 @@ export function foo() { };
=== tests/cases/compiler/externalModuleRefernceResolutionOrderInImportDeclaration_file2.ts ===
declare module "externalModuleRefernceResolutionOrderInImportDeclaration_file1" {
>"externalModuleRefernceResolutionOrderInImportDeclaration_file1" : typeof "externalModuleRefernceResolutionOrderInImportDeclaration_file1"
>"externalModuleRefernceResolutionOrderInImportDeclaration_file1" : typeof import("externalModuleRefernceResolutionOrderInImportDeclaration_file1")
export function bar();
>bar : () => any
@@ -1,11 +1,11 @@
tests/cases/compiler/importAsBaseClass_1.ts(2,21): error TS2507: Type 'typeof "tests/cases/compiler/importAsBaseClass_0"' is not a constructor function type.
tests/cases/compiler/importAsBaseClass_1.ts(2,21): error TS2507: Type 'typeof import("tests/cases/compiler/importAsBaseClass_0")' is not a constructor function type.
==== tests/cases/compiler/importAsBaseClass_1.ts (1 errors) ====
import Greeter = require("./importAsBaseClass_0");
class Hello extends Greeter { }
~~~~~~~
!!! error TS2507: Type 'typeof "tests/cases/compiler/importAsBaseClass_0"' is not a constructor function type.
!!! error TS2507: Type 'typeof import("tests/cases/compiler/importAsBaseClass_0")' is not a constructor function type.
==== tests/cases/compiler/importAsBaseClass_0.ts (0 errors) ====
export class Greeter {
@@ -5,40 +5,40 @@ export function foo() { return "foo"; }
=== tests/cases/conformance/dynamicImport/1.ts ===
import("./0");
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
var p1 = import("./0");
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
p1.then(zero => {
>p1.then(zero => { return zero.foo();}) : Promise<string>
>p1.then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>p1.then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof import("tests/cases/conformance/dynamicImport/0")) => string
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
return zero.foo();
>zero.foo() : string
>zero.foo : () => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
>foo : () => string
})
export var p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
function foo() {
>foo : () => void
const p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
@@ -40,6 +40,6 @@ function foo(x: Promise<any>) {
foo(import("./0"));
>foo(import("./0")) : void
>foo : (x: Promise<any>) => void
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
@@ -14,9 +14,9 @@ async function foo() {
class C extends (await import("./0")).B {}
>C : C
>(await import("./0")).B : B
>(await import("./0")) : typeof "tests/cases/conformance/dynamicImport/0"
>await import("./0") : typeof "tests/cases/conformance/dynamicImport/0"
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>(await import("./0")) : typeof import("tests/cases/conformance/dynamicImport/0")
>await import("./0") : typeof import("tests/cases/conformance/dynamicImport/0")
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
>B : typeof B
@@ -24,27 +24,27 @@ class C {
>C : C
private myModule = import("./0");
>myModule : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>myModule : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
method() {
>method : () => void
const loadAsync = import ("./0");
>loadAsync : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import ("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import ("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
this.myModule.then(Zero => {
>this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise<void>
>this.myModule.then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>this.myModule : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>this.myModule.then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>this.myModule : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>this : this
>myModule : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/dynamicImport/0") => void
>Zero : typeof "tests/cases/conformance/dynamicImport/0"
>myModule : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>Zero => { console.log(Zero.foo()); } : (Zero: typeof import("tests/cases/conformance/dynamicImport/0")) => void
>Zero : typeof import("tests/cases/conformance/dynamicImport/0")
console.log(Zero.foo());
>console.log(Zero.foo()) : any
@@ -53,7 +53,7 @@ class C {
>log : any
>Zero.foo() : string
>Zero.foo : () => string
>Zero : typeof "tests/cases/conformance/dynamicImport/0"
>Zero : typeof import("tests/cases/conformance/dynamicImport/0")
>foo : () => string
}, async err => {
@@ -68,9 +68,9 @@ class C {
>err : any
let one = await import("./1");
>one : typeof "tests/cases/conformance/dynamicImport/1"
>await import("./1") : typeof "tests/cases/conformance/dynamicImport/1"
>import("./1") : Promise<typeof "tests/cases/conformance/dynamicImport/1">
>one : typeof import("tests/cases/conformance/dynamicImport/1")
>await import("./1") : typeof import("tests/cases/conformance/dynamicImport/1")
>import("./1") : Promise<typeof import("tests/cases/conformance/dynamicImport/1")>
>"./1" : "./1"
console.log(one.backup());
@@ -80,7 +80,7 @@ class C {
>log : any
>one.backup() : string
>one.backup : () => string
>one : typeof "tests/cases/conformance/dynamicImport/1"
>one : typeof import("tests/cases/conformance/dynamicImport/1")
>backup : () => string
});
@@ -3,9 +3,9 @@ export async function fn() {
>fn : () => Promise<void>
const req = await import('./test') // ONE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -16,9 +16,9 @@ export class cl1 {
>m : () => Promise<void>
const req = await import('./test') // TWO
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -32,9 +32,9 @@ export const obj = {
>async () => { const req = await import('./test') // THREE } : () => Promise<void>
const req = await import('./test') // THREE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -51,9 +51,9 @@ export class cl2 {
>async () => { const req = await import('./test') // FOUR } : () => Promise<void>
const req = await import('./test') // FOUR
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -64,9 +64,9 @@ export const l = async () => {
>async () => { const req = await import('./test') // FIVE} : () => Promise<void>
const req = await import('./test') // FIVE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -3,9 +3,9 @@ export async function fn() {
>fn : () => Promise<void>
const req = await import('./test') // ONE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -16,9 +16,9 @@ export class cl1 {
>m : () => Promise<void>
const req = await import('./test') // TWO
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -32,9 +32,9 @@ export const obj = {
>async () => { const req = await import('./test') // THREE } : () => Promise<void>
const req = await import('./test') // THREE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -51,9 +51,9 @@ export class cl2 {
>async () => { const req = await import('./test') // FOUR } : () => Promise<void>
const req = await import('./test') // FOUR
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -64,9 +64,9 @@ export const l = async () => {
>async () => { const req = await import('./test') // FIVE} : () => Promise<void>
const req = await import('./test') // FIVE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -3,9 +3,9 @@ export async function fn() {
>fn : () => Promise<void>
const req = await import('./test') // ONE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -16,9 +16,9 @@ export class cl1 {
>m : () => Promise<void>
const req = await import('./test') // TWO
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -32,9 +32,9 @@ export const obj = {
>async () => { const req = await import('./test') // THREE } : () => Promise<void>
const req = await import('./test') // THREE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -51,9 +51,9 @@ export class cl2 {
>async () => { const req = await import('./test') // FOUR } : () => Promise<void>
const req = await import('./test') // FOUR
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -64,9 +64,9 @@ export const l = async () => {
>async () => { const req = await import('./test') // FIVE} : () => Promise<void>
const req = await import('./test') // FIVE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -3,9 +3,9 @@ export async function fn() {
>fn : () => Promise<void>
const req = await import('./test') // ONE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -16,9 +16,9 @@ export class cl1 {
>m : () => Promise<void>
const req = await import('./test') // TWO
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -32,9 +32,9 @@ export const obj = {
>async () => { const req = await import('./test') // THREE } : () => Promise<void>
const req = await import('./test') // THREE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -51,9 +51,9 @@ export class cl2 {
>async () => { const req = await import('./test') // FOUR } : () => Promise<void>
const req = await import('./test') // FOUR
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -64,9 +64,9 @@ export const l = async () => {
>async () => { const req = await import('./test') // FIVE} : () => Promise<void>
const req = await import('./test') // FIVE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -3,9 +3,9 @@ export async function fn() {
>fn : () => Promise<void>
const req = await import('./test') // ONE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -16,9 +16,9 @@ export class cl1 {
>m : () => Promise<void>
const req = await import('./test') // TWO
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -32,9 +32,9 @@ export const obj = {
>async () => { const req = await import('./test') // THREE } : () => Promise<void>
const req = await import('./test') // THREE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -51,9 +51,9 @@ export class cl2 {
>async () => { const req = await import('./test') // FOUR } : () => Promise<void>
const req = await import('./test') // FOUR
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -64,9 +64,9 @@ export const l = async () => {
>async () => { const req = await import('./test') // FIVE} : () => Promise<void>
const req = await import('./test') // FIVE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -3,9 +3,9 @@ export async function fn() {
>fn : () => Promise<void>
const req = await import('./test') // ONE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -16,9 +16,9 @@ export class cl1 {
>m : () => Promise<void>
const req = await import('./test') // TWO
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -32,9 +32,9 @@ export const obj = {
>async () => { const req = await import('./test') // THREE } : () => Promise<void>
const req = await import('./test') // THREE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -51,9 +51,9 @@ export class cl2 {
>async () => { const req = await import('./test') // FOUR } : () => Promise<void>
const req = await import('./test') // FOUR
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -64,9 +64,9 @@ export const l = async () => {
>async () => { const req = await import('./test') // FIVE} : () => Promise<void>
const req = await import('./test') // FIVE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -3,9 +3,9 @@ export async function fn() {
>fn : () => Promise<void>
const req = await import('./test') // ONE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -16,9 +16,9 @@ export class cl1 {
>m : () => Promise<void>
const req = await import('./test') // TWO
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -32,9 +32,9 @@ export const obj = {
>async () => { const req = await import('./test') // THREE } : () => Promise<void>
const req = await import('./test') // THREE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -51,9 +51,9 @@ export class cl2 {
>async () => { const req = await import('./test') // FOUR } : () => Promise<void>
const req = await import('./test') // FOUR
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -64,9 +64,9 @@ export const l = async () => {
>async () => { const req = await import('./test') // FIVE} : () => Promise<void>
const req = await import('./test') // FIVE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -3,9 +3,9 @@ export async function fn() {
>fn : () => Promise<void>
const req = await import('./test') // ONE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -16,9 +16,9 @@ export class cl1 {
>m : () => Promise<void>
const req = await import('./test') // TWO
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -32,9 +32,9 @@ export const obj = {
>async () => { const req = await import('./test') // THREE } : () => Promise<void>
const req = await import('./test') // THREE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -51,9 +51,9 @@ export class cl2 {
>async () => { const req = await import('./test') // FOUR } : () => Promise<void>
const req = await import('./test') // FOUR
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -64,9 +64,9 @@ export const l = async () => {
>async () => { const req = await import('./test') // FIVE} : () => Promise<void>
const req = await import('./test') // FIVE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -3,9 +3,9 @@ export async function fn() {
>fn : () => Promise<void>
const req = await import('./test') // ONE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -16,9 +16,9 @@ export class cl1 {
>m : () => Promise<void>
const req = await import('./test') // TWO
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -32,9 +32,9 @@ export const obj = {
>async () => { const req = await import('./test') // THREE } : () => Promise<void>
const req = await import('./test') // THREE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -51,9 +51,9 @@ export class cl2 {
>async () => { const req = await import('./test') // FOUR } : () => Promise<void>
const req = await import('./test') // FOUR
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -64,9 +64,9 @@ export const l = async () => {
>async () => { const req = await import('./test') // FIVE} : () => Promise<void>
const req = await import('./test') // FIVE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -3,9 +3,9 @@ export async function fn() {
>fn : () => Promise<void>
const req = await import('./test') // ONE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -16,9 +16,9 @@ export class cl1 {
>m : () => Promise<void>
const req = await import('./test') // TWO
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -32,9 +32,9 @@ export const obj = {
>async () => { const req = await import('./test') // THREE } : () => Promise<void>
const req = await import('./test') // THREE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -51,9 +51,9 @@ export class cl2 {
>async () => { const req = await import('./test') // FOUR } : () => Promise<void>
const req = await import('./test') // FOUR
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -64,9 +64,9 @@ export const l = async () => {
>async () => { const req = await import('./test') // FIVE} : () => Promise<void>
const req = await import('./test') // FIVE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -3,9 +3,9 @@ export async function fn() {
>fn : () => Promise<void>
const req = await import('./test') // ONE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -16,9 +16,9 @@ export class cl1 {
>m : () => Promise<void>
const req = await import('./test') // TWO
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -32,9 +32,9 @@ export const obj = {
>async () => { const req = await import('./test') // THREE } : () => Promise<void>
const req = await import('./test') // THREE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -51,9 +51,9 @@ export class cl2 {
>async () => { const req = await import('./test') // FOUR } : () => Promise<void>
const req = await import('./test') // FOUR
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -64,9 +64,9 @@ export const l = async () => {
>async () => { const req = await import('./test') // FIVE} : () => Promise<void>
const req = await import('./test') // FIVE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -3,9 +3,9 @@ export async function fn() {
>fn : () => Promise<void>
const req = await import('./test') // ONE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -16,9 +16,9 @@ export class cl1 {
>m : () => Promise<void>
const req = await import('./test') // TWO
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -32,9 +32,9 @@ export const obj = {
>async () => { const req = await import('./test') // THREE } : () => Promise<void>
const req = await import('./test') // THREE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -51,9 +51,9 @@ export class cl2 {
>async () => { const req = await import('./test') // FOUR } : () => Promise<void>
const req = await import('./test') // FOUR
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -64,9 +64,9 @@ export const l = async () => {
>async () => { const req = await import('./test') // FIVE} : () => Promise<void>
const req = await import('./test') // FIVE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -3,9 +3,9 @@ export async function fn() {
>fn : () => Promise<void>
const req = await import('./test') // ONE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -16,9 +16,9 @@ export class cl1 {
>m : () => Promise<void>
const req = await import('./test') // TWO
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -32,9 +32,9 @@ export const obj = {
>async () => { const req = await import('./test') // THREE } : () => Promise<void>
const req = await import('./test') // THREE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -51,9 +51,9 @@ export class cl2 {
>async () => { const req = await import('./test') // FOUR } : () => Promise<void>
const req = await import('./test') // FOUR
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
}
@@ -64,9 +64,9 @@ export const l = async () => {
>async () => { const req = await import('./test') // FIVE} : () => Promise<void>
const req = await import('./test') // FIVE
>req : typeof "tests/cases/conformance/dynamicImport/test"
>await import('./test') : typeof "tests/cases/conformance/dynamicImport/test"
>import('./test') : Promise<typeof "tests/cases/conformance/dynamicImport/test">
>req : typeof import("tests/cases/conformance/dynamicImport/test")
>await import('./test') : typeof import("tests/cases/conformance/dynamicImport/test")
>import('./test') : Promise<typeof import("tests/cases/conformance/dynamicImport/test")>
>'./test' : "./test"
}
@@ -1,9 +1,9 @@
tests/cases/conformance/dynamicImport/1.ts(4,5): error TS2322: Type 'Promise<typeof "tests/cases/conformance/dynamicImport/defaultPath">' is not assignable to type 'Promise<typeof "tests/cases/conformance/dynamicImport/anotherModule">'.
Type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"' is not assignable to type 'typeof "tests/cases/conformance/dynamicImport/anotherModule"'.
Property 'D' is missing in type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"'.
tests/cases/conformance/dynamicImport/1.ts(5,10): error TS2352: Type 'Promise<typeof "tests/cases/conformance/dynamicImport/defaultPath">' cannot be converted to type 'Promise<typeof "tests/cases/conformance/dynamicImport/anotherModule">'.
Type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"' is not comparable to type 'typeof "tests/cases/conformance/dynamicImport/anotherModule"'.
Property 'D' is missing in type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"'.
tests/cases/conformance/dynamicImport/1.ts(4,5): error TS2322: Type 'Promise<typeof import("tests/cases/conformance/dynamicImport/defaultPath")>' is not assignable to type 'Promise<typeof import("tests/cases/conformance/dynamicImport/anotherModule")>'.
Type 'typeof import("tests/cases/conformance/dynamicImport/defaultPath")' is not assignable to type 'typeof import("tests/cases/conformance/dynamicImport/anotherModule")'.
Property 'D' is missing in type 'typeof import("tests/cases/conformance/dynamicImport/defaultPath")'.
tests/cases/conformance/dynamicImport/1.ts(5,10): error TS2352: Type 'Promise<typeof import("tests/cases/conformance/dynamicImport/defaultPath")>' cannot be converted to type 'Promise<typeof import("tests/cases/conformance/dynamicImport/anotherModule")>'.
Type 'typeof import("tests/cases/conformance/dynamicImport/defaultPath")' is not comparable to type 'typeof import("tests/cases/conformance/dynamicImport/anotherModule")'.
Property 'D' is missing in type 'typeof import("tests/cases/conformance/dynamicImport/defaultPath")'.
==== tests/cases/conformance/dynamicImport/anotherModule.ts (0 errors) ====
@@ -18,13 +18,13 @@ tests/cases/conformance/dynamicImport/1.ts(5,10): error TS2352: Type 'Promise<ty
let p1: Promise<typeof anotherModule> = import("./defaultPath");
~~
!!! error TS2322: Type 'Promise<typeof "tests/cases/conformance/dynamicImport/defaultPath">' is not assignable to type 'Promise<typeof "tests/cases/conformance/dynamicImport/anotherModule">'.
!!! error TS2322: Type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"' is not assignable to type 'typeof "tests/cases/conformance/dynamicImport/anotherModule"'.
!!! error TS2322: Property 'D' is missing in type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"'.
!!! error TS2322: Type 'Promise<typeof import("tests/cases/conformance/dynamicImport/defaultPath")>' is not assignable to type 'Promise<typeof import("tests/cases/conformance/dynamicImport/anotherModule")>'.
!!! error TS2322: Type 'typeof import("tests/cases/conformance/dynamicImport/defaultPath")' is not assignable to type 'typeof import("tests/cases/conformance/dynamicImport/anotherModule")'.
!!! error TS2322: Property 'D' is missing in type 'typeof import("tests/cases/conformance/dynamicImport/defaultPath")'.
let p2 = import("./defaultPath") as Promise<typeof anotherModule>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2352: Type 'Promise<typeof "tests/cases/conformance/dynamicImport/defaultPath">' cannot be converted to type 'Promise<typeof "tests/cases/conformance/dynamicImport/anotherModule">'.
!!! error TS2352: Type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"' is not comparable to type 'typeof "tests/cases/conformance/dynamicImport/anotherModule"'.
!!! error TS2352: Property 'D' is missing in type 'typeof "tests/cases/conformance/dynamicImport/defaultPath"'.
!!! error TS2352: Type 'Promise<typeof import("tests/cases/conformance/dynamicImport/defaultPath")>' cannot be converted to type 'Promise<typeof import("tests/cases/conformance/dynamicImport/anotherModule")>'.
!!! error TS2352: Type 'typeof import("tests/cases/conformance/dynamicImport/defaultPath")' is not comparable to type 'typeof import("tests/cases/conformance/dynamicImport/anotherModule")'.
!!! error TS2352: Property 'D' is missing in type 'typeof import("tests/cases/conformance/dynamicImport/defaultPath")'.
let p3: Promise<any> = import("./defaultPath");
@@ -5,7 +5,7 @@ export function foo() { return "foo"; }
=== tests/cases/conformance/dynamicImport/1.ts ===
var p1 = import("./0");
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
@@ -5,41 +5,41 @@ export function foo() { return "foo"; }
=== tests/cases/conformance/dynamicImport/1.ts ===
import("./0");
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
var p1 = import("./0");
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
p1.then(zero => {
>p1.then(zero => { return zero.foo();}) : Promise<string>
>p1.then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>p1.then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof import("tests/cases/conformance/dynamicImport/0")) => string
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
return zero.foo();
>zero.foo() : string
>zero.foo : () => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
>foo : () => string
});
export var p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
function foo() {
>foo : () => void
const p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
@@ -50,8 +50,8 @@ class C {
>method : () => void
const loadAsync = import ("./0");
>loadAsync : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import ("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import ("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
}
@@ -63,8 +63,8 @@ export class D {
>method : () => void
const loadAsync = import ("./0");
>loadAsync : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import ("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import ("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
}
@@ -5,41 +5,41 @@ export function foo() { return "foo"; }
=== tests/cases/conformance/dynamicImport/1.ts ===
import("./0");
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
var p1 = import("./0");
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
p1.then(zero => {
>p1.then(zero => { return zero.foo();}) : Promise<string>
>p1.then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>p1.then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof import("tests/cases/conformance/dynamicImport/0")) => string
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
return zero.foo();
>zero.foo() : string
>zero.foo : () => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
>foo : () => string
});
export var p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
function foo() {
>foo : () => void
const p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
@@ -50,8 +50,8 @@ class C {
>method : () => void
const loadAsync = import ("./0");
>loadAsync : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import ("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import ("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
}
@@ -63,8 +63,8 @@ export class D {
>method : () => void
const loadAsync = import ("./0");
>loadAsync : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import ("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import ("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
}
@@ -5,41 +5,41 @@ export function foo() { return "foo"; }
=== tests/cases/conformance/dynamicImport/1.ts ===
import("./0");
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
var p1 = import("./0");
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
p1.then(zero => {
>p1.then(zero => { return zero.foo();}) : Promise<string>
>p1.then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>p1.then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof import("tests/cases/conformance/dynamicImport/0")) => string
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
return zero.foo();
>zero.foo() : string
>zero.foo : () => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
>foo : () => string
});
export var p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
function foo() {
>foo : () => void
const p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
@@ -50,8 +50,8 @@ class C {
>method : () => void
const loadAsync = import ("./0");
>loadAsync : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import ("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import ("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
}
@@ -63,8 +63,8 @@ export class D {
>method : () => void
const loadAsync = import ("./0");
>loadAsync : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import ("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import ("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
}
@@ -5,41 +5,41 @@ export function foo() { return "foo"; }
=== tests/cases/conformance/dynamicImport/1.ts ===
import("./0");
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
var p1 = import("./0");
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
p1.then(zero => {
>p1.then(zero => { return zero.foo();}) : Promise<string>
>p1.then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>p1.then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof import("tests/cases/conformance/dynamicImport/0")) => string
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
return zero.foo();
>zero.foo() : string
>zero.foo : () => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
>foo : () => string
});
export var p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
function foo() {
>foo : () => void
const p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
@@ -50,8 +50,8 @@ class C {
>method : () => void
const loadAsync = import ("./0");
>loadAsync : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import ("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import ("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
}
@@ -63,8 +63,8 @@ export class D {
>method : () => void
const loadAsync = import ("./0");
>loadAsync : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import ("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import ("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
}
@@ -5,41 +5,41 @@ export function foo() { return "foo"; }
=== tests/cases/conformance/dynamicImport/1.ts ===
import("./0");
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
var p1 = import("./0");
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
p1.then(zero => {
>p1.then(zero => { return zero.foo();}) : Promise<string>
>p1.then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>p1.then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof import("tests/cases/conformance/dynamicImport/0")) => string
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
return zero.foo();
>zero.foo() : string
>zero.foo : () => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
>foo : () => string
});
export var p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
function foo() {
>foo : () => void
const p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
@@ -50,8 +50,8 @@ class C {
>method : () => void
const loadAsync = import ("./0");
>loadAsync : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import ("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import ("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
}
@@ -63,8 +63,8 @@ export class D {
>method : () => void
const loadAsync = import ("./0");
>loadAsync : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import ("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import ("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
}
@@ -5,41 +5,41 @@ export function foo() { return "foo"; }
=== tests/cases/conformance/dynamicImport/1.ts ===
import("./0");
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
var p1 = import("./0");
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
p1.then(zero => {
>p1.then(zero => { return zero.foo();}) : Promise<string>
>p1.then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>p1.then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof import("tests/cases/conformance/dynamicImport/0")) => string
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
return zero.foo();
>zero.foo() : string
>zero.foo : () => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
>foo : () => string
});
export var p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
function foo() {
>foo : () => void
const p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
@@ -50,8 +50,8 @@ class C {
>method : () => void
const loadAsync = import ("./0");
>loadAsync : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import ("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import ("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
}
@@ -63,8 +63,8 @@ export class D {
>method : () => void
const loadAsync = import ("./0");
>loadAsync : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import ("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import ("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
}
@@ -5,41 +5,41 @@ export function foo() { return "foo"; }
=== tests/cases/conformance/dynamicImport/1.ts ===
import("./0");
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
var p1 = import("./0");
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
p1.then(zero => {
>p1.then(zero => { return zero.foo();}) : Promise<string>
>p1.then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>p1.then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof import("tests/cases/conformance/dynamicImport/0")) => string
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
return zero.foo();
>zero.foo() : string
>zero.foo : () => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
>foo : () => string
});
export var p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
function foo() {
>foo : () => void
const p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
@@ -50,8 +50,8 @@ class C {
>method : () => void
const loadAsync = import ("./0");
>loadAsync : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import ("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import ("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
}
@@ -63,8 +63,8 @@ export class D {
>method : () => void
const loadAsync = import ("./0");
>loadAsync : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import ("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import ("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
}
@@ -5,41 +5,41 @@ export function foo() { return "foo"; }
=== tests/cases/conformance/dynamicImport/1.ts ===
import("./0");
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
var p1 = import("./0");
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
p1.then(zero => {
>p1.then(zero => { return zero.foo();}) : Promise<string>
>p1.then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>p1.then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof import("tests/cases/conformance/dynamicImport/0")) => string
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
return zero.foo();
>zero.foo() : string
>zero.foo : () => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
>foo : () => string
});
export var p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
function foo() {
>foo : () => void
const p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
@@ -50,8 +50,8 @@ class C {
>method : () => void
const loadAsync = import ("./0");
>loadAsync : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import ("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import ("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
}
@@ -63,8 +63,8 @@ export class D {
>method : () => void
const loadAsync = import ("./0");
>loadAsync : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import ("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import ("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
}
@@ -5,26 +5,26 @@ export function foo() { return "foo"; }
=== tests/cases/conformance/dynamicImport/1.ts ===
import("./0");
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
var p1 = import("./0");
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
p1.then(zero => {
>p1.then(zero => { return zero.foo();}) : Promise<string>
>p1.then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>p1.then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof import("tests/cases/conformance/dynamicImport/0")) => string
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
return zero.foo();
>zero.foo() : string
>zero.foo : () => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
>foo : () => string
})
@@ -33,7 +33,7 @@ function foo() {
>foo : () => void
const p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
@@ -5,40 +5,40 @@ export function foo() { return "foo"; }
=== tests/cases/conformance/dynamicImport/1.ts ===
import("./0");
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
var p1 = import("./0");
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
p1.then(zero => {
>p1.then(zero => { return zero.foo();}) : Promise<string>
>p1.then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>p1.then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof import("tests/cases/conformance/dynamicImport/0")) => string
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
return zero.foo();
>zero.foo() : string
>zero.foo : () => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>zero : typeof import("tests/cases/conformance/dynamicImport/0")
>foo : () => string
});
export var p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
function foo() {
>foo : () => void
const p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>p2 : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
}
@@ -41,6 +41,6 @@ function foo(x: Promise<any>) {
foo(import("./0"));
>foo(import("./0")) : void
>foo : (x: Promise<any>) => void
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
@@ -14,9 +14,9 @@ async function foo() {
class C extends (await import("./0")).B {}
>C : C
>(await import("./0")).B : B
>(await import("./0")) : typeof "tests/cases/conformance/dynamicImport/0"
>await import("./0") : typeof "tests/cases/conformance/dynamicImport/0"
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>(await import("./0")) : typeof import("tests/cases/conformance/dynamicImport/0")
>await import("./0") : typeof import("tests/cases/conformance/dynamicImport/0")
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
>B : typeof B
@@ -24,27 +24,27 @@ class C {
>C : C
private myModule = import("./0");
>myModule : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>myModule : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
method() {
>method : () => void
const loadAsync = import("./0");
>loadAsync : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
this.myModule.then(Zero => {
>this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise<void>
>this.myModule.then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>this.myModule : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>this.myModule.then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>this.myModule : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>this : this
>myModule : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/dynamicImport/0") => void
>Zero : typeof "tests/cases/conformance/dynamicImport/0"
>myModule : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>Zero => { console.log(Zero.foo()); } : (Zero: typeof import("tests/cases/conformance/dynamicImport/0")) => void
>Zero : typeof import("tests/cases/conformance/dynamicImport/0")
console.log(Zero.foo());
>console.log(Zero.foo()) : any
@@ -53,7 +53,7 @@ class C {
>log : any
>Zero.foo() : string
>Zero.foo : () => string
>Zero : typeof "tests/cases/conformance/dynamicImport/0"
>Zero : typeof import("tests/cases/conformance/dynamicImport/0")
>foo : () => string
}, async err => {
@@ -68,9 +68,9 @@ class C {
>err : any
let one = await import("./1");
>one : typeof "tests/cases/conformance/dynamicImport/1"
>await import("./1") : typeof "tests/cases/conformance/dynamicImport/1"
>import("./1") : Promise<typeof "tests/cases/conformance/dynamicImport/1">
>one : typeof import("tests/cases/conformance/dynamicImport/1")
>await import("./1") : typeof import("tests/cases/conformance/dynamicImport/1")
>import("./1") : Promise<typeof import("tests/cases/conformance/dynamicImport/1")>
>"./1" : "./1"
console.log(one.backup());
@@ -80,7 +80,7 @@ class C {
>log : any
>one.backup() : string
>one.backup : () => string
>one : typeof "tests/cases/conformance/dynamicImport/1"
>one : typeof import("tests/cases/conformance/dynamicImport/1")
>backup : () => string
});
@@ -91,27 +91,27 @@ export class D {
>D : D
private myModule = import("./0");
>myModule : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>myModule : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
method() {
>method : () => void
const loadAsync = import("./0");
>loadAsync : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>loadAsync : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>import("./0") : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>"./0" : "./0"
this.myModule.then(Zero => {
>this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise<void>
>this.myModule.then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>this.myModule : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>this.myModule.then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>this.myModule : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>this : this
>myModule : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/dynamicImport/0") => void
>Zero : typeof "tests/cases/conformance/dynamicImport/0"
>myModule : Promise<typeof import("tests/cases/conformance/dynamicImport/0")>
>then : <TResult1 = typeof import("tests/cases/conformance/dynamicImport/0"), TResult2 = never>(onfulfilled?: (value: typeof import("tests/cases/conformance/dynamicImport/0")) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>Zero => { console.log(Zero.foo()); } : (Zero: typeof import("tests/cases/conformance/dynamicImport/0")) => void
>Zero : typeof import("tests/cases/conformance/dynamicImport/0")
console.log(Zero.foo());
>console.log(Zero.foo()) : any
@@ -120,7 +120,7 @@ export class D {
>log : any
>Zero.foo() : string
>Zero.foo : () => string
>Zero : typeof "tests/cases/conformance/dynamicImport/0"
>Zero : typeof import("tests/cases/conformance/dynamicImport/0")
>foo : () => string
}, async err => {
@@ -135,9 +135,9 @@ export class D {
>err : any
let one = await import("./1");
>one : typeof "tests/cases/conformance/dynamicImport/1"
>await import("./1") : typeof "tests/cases/conformance/dynamicImport/1"
>import("./1") : Promise<typeof "tests/cases/conformance/dynamicImport/1">
>one : typeof import("tests/cases/conformance/dynamicImport/1")
>await import("./1") : typeof import("tests/cases/conformance/dynamicImport/1")
>import("./1") : Promise<typeof import("tests/cases/conformance/dynamicImport/1")>
>"./1" : "./1"
console.log(one.backup());
@@ -147,7 +147,7 @@ export class D {
>log : any
>one.backup() : string
>one.backup : () => string
>one : typeof "tests/cases/conformance/dynamicImport/1"
>one : typeof import("tests/cases/conformance/dynamicImport/1")
>backup : () => string
});

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