diff --git a/.travis.yml b/.travis.yml index c16ae086448..2751337c708 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ matrix: branches: only: - master - - release-2.0 + - release-2.1 install: - npm uninstall typescript diff --git a/Jakefile.js b/Jakefile.js index cda7e2ca882..8ce70eb353f 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -70,15 +70,15 @@ var compilerSources = [ "visitor.ts", "transformers/destructuring.ts", "transformers/ts.ts", - "transformers/module/es2015.ts", - "transformers/module/system.ts", - "transformers/module/module.ts", "transformers/jsx.ts", "transformers/es2017.ts", "transformers/es2016.ts", "transformers/es2015.ts", "transformers/generators.ts", "transformers/es5.ts", + "transformers/module/es2015.ts", + "transformers/module/system.ts", + "transformers/module/module.ts", "transformer.ts", "sourcemap.ts", "comments.ts", @@ -106,15 +106,15 @@ var servicesSources = [ "visitor.ts", "transformers/destructuring.ts", "transformers/ts.ts", - "transformers/module/es2015.ts", - "transformers/module/system.ts", - "transformers/module/module.ts", "transformers/jsx.ts", "transformers/es2017.ts", "transformers/es2016.ts", "transformers/es2015.ts", "transformers/generators.ts", "transformers/es5.ts", + "transformers/module/es2015.ts", + "transformers/module/system.ts", + "transformers/module/module.ts", "transformer.ts", "sourcemap.ts", "comments.ts", diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 801bd2c35ba..c1011e57568 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -54,6 +54,11 @@ namespace ts { const body = (node).body; return body ? getModuleInstanceState(body) : ModuleInstanceState.Instantiated; } + // Only jsdoc typedef definition can exist in jsdoc namespace, and it should + // be considered the same as type alias + else if (node.kind === SyntaxKind.Identifier && (node).isInJSDocNamespace) { + return ModuleInstanceState.NonInstantiated; + } else { return ModuleInstanceState.Instantiated; } @@ -429,7 +434,11 @@ namespace ts { // during global merging in the checker. Why? The only case when ambient module is permitted inside another module is module augmentation // and this case is specially handled. Module augmentations should only be merged with original module definition // and should never be merged directly with other augmentation, and the latter case would be possible if automatic merge is allowed. - if (!isAmbientModule(node) && (hasExportModifier || container.flags & NodeFlags.ExportContext)) { + const isJSDocTypedefInJSDocNamespace = node.kind === SyntaxKind.JSDocTypedefTag && + node.name && + node.name.kind === SyntaxKind.Identifier && + (node.name).isInJSDocNamespace; + if ((!isAmbientModule(node) && (hasExportModifier || container.flags & NodeFlags.ExportContext)) || isJSDocTypedefInJSDocNamespace) { const exportKind = (symbolFlags & SymbolFlags.Value ? SymbolFlags.ExportValue : 0) | (symbolFlags & SymbolFlags.Type ? SymbolFlags.ExportType : 0) | @@ -490,8 +499,8 @@ namespace ts { const saveReturnTarget = currentReturnTarget; const saveActiveLabels = activeLabels; const saveHasExplicitReturn = hasExplicitReturn; - const isIIFE = containerFlags & ContainerFlags.IsFunctionExpression && !!getImmediatelyInvokedFunctionExpression(node); - // An IIFE is considered part of the containing control flow. Return statements behave + const isIIFE = containerFlags & ContainerFlags.IsFunctionExpression && !hasModifier(node, ModifierFlags.Async) && !!getImmediatelyInvokedFunctionExpression(node); + // A non-async IIFE is considered part of the containing control flow. Return statements behave // similarly to break statements that exit to a label just past the statement body. if (isIIFE) { currentReturnTarget = createBranchLabel(); @@ -883,8 +892,13 @@ namespace ts { function bindDoStatement(node: DoStatement): void { const preDoLabel = createLoopLabel(); - const preConditionLabel = createBranchLabel(); - const postDoLabel = createBranchLabel(); + const enclosingLabeledStatement = node.parent.kind === SyntaxKind.LabeledStatement + ? lastOrUndefined(activeLabels) + : undefined; + // if do statement is wrapped in labeled statement then target labels for break/continue with or without + // label should be the same + const preConditionLabel = enclosingLabeledStatement ? enclosingLabeledStatement.continueTarget : createBranchLabel(); + const postDoLabel = enclosingLabeledStatement ? enclosingLabeledStatement.breakTarget : createBranchLabel(); addAntecedent(preDoLabel, currentFlow); currentFlow = preDoLabel; bindIterativeStatement(node.statement, postDoLabel, preConditionLabel); @@ -1007,7 +1021,7 @@ namespace ts { currentFlow = finishFlowLabel(preFinallyLabel); bind(node.finallyBlock); // if flow after finally is unreachable - keep it - // otherwise check if flows after try and after catch are unreachable + // otherwise check if flows after try and after catch are unreachable // if yes - convert current flow to unreachable // i.e. // try { return "1" } finally { console.log(1); } @@ -1102,8 +1116,11 @@ namespace ts { if (!activeLabel.referenced && !options.allowUnusedLabels) { file.bindDiagnostics.push(createDiagnosticForNode(node.label, Diagnostics.Unused_label)); } - addAntecedent(postStatementLabel, currentFlow); - currentFlow = finishFlowLabel(postStatementLabel); + if (!node.statement || node.statement.kind !== SyntaxKind.DoStatement) { + // do statement sets current flow inside bindDoStatement + addAntecedent(postStatementLabel, currentFlow); + currentFlow = finishFlowLabel(postStatementLabel); + } } function bindDestructuringTargetFlow(node: Expression) { @@ -1828,6 +1845,17 @@ namespace ts { switch (node.kind) { /* Strict mode checks */ case SyntaxKind.Identifier: + // for typedef type names with namespaces, bind the new jsdoc type symbol here + // because it requires all containing namespaces to be in effect, namely the + // current "blockScopeContainer" needs to be set to its immediate namespace parent. + if ((node).isInJSDocNamespace) { + let parentNode = node.parent; + while (parentNode && parentNode.kind !== SyntaxKind.JSDocTypedefTag) { + parentNode = parentNode.parent; + } + bindBlockScopedDeclaration(parentNode, SymbolFlags.TypeAlias, SymbolFlags.TypeAliasExcludes); + break; + } case SyntaxKind.ThisKeyword: if (currentFlow && (isExpression(node) || parent.kind === SyntaxKind.ShorthandPropertyAssignment)) { node.flowNode = currentFlow; @@ -1951,6 +1979,10 @@ namespace ts { case SyntaxKind.InterfaceDeclaration: return bindBlockScopedDeclaration(node, SymbolFlags.Interface, SymbolFlags.InterfaceExcludes); case SyntaxKind.JSDocTypedefTag: + if (!(node).fullName || (node).fullName.kind === SyntaxKind.Identifier) { + return bindBlockScopedDeclaration(node, SymbolFlags.TypeAlias, SymbolFlags.TypeAliasExcludes); + } + break; case SyntaxKind.TypeAliasDeclaration: return bindBlockScopedDeclaration(node, SymbolFlags.TypeAlias, SymbolFlags.TypeAliasExcludes); case SyntaxKind.EnumDeclaration: @@ -2421,6 +2453,9 @@ namespace ts { case SyntaxKind.HeritageClause: return computeHeritageClause(node, subtreeFlags); + case SyntaxKind.CatchClause: + return computeCatchClause(node, subtreeFlags); + case SyntaxKind.ExpressionWithTypeArguments: return computeExpressionWithTypeArguments(node, subtreeFlags); @@ -2507,7 +2542,7 @@ namespace ts { && (leftKind === SyntaxKind.ObjectLiteralExpression || leftKind === SyntaxKind.ArrayLiteralExpression)) { // Destructuring assignments are ES6 syntax. - transformFlags |= TransformFlags.AssertES2015 | TransformFlags.DestructuringAssignment; + transformFlags |= TransformFlags.AssertES2015 | TransformFlags.AssertDestructuringAssignment; } else if (operatorTokenKind === SyntaxKind.AsteriskAsteriskToken || operatorTokenKind === SyntaxKind.AsteriskAsteriskEqualsToken) { @@ -2588,9 +2623,9 @@ namespace ts { // A class with a parameter property assignment, property initializer, or decorator is // TypeScript syntax. - // An exported declaration may be TypeScript syntax. + // An exported declaration may be TypeScript syntax, but is handled by the visitor + // for a namespace declaration. if ((subtreeFlags & TransformFlags.TypeScriptClassSyntaxMask) - || (modifierFlags & ModifierFlags.Export) || node.typeParameters) { transformFlags |= TransformFlags.AssertTypeScript; } @@ -2650,6 +2685,17 @@ namespace ts { return transformFlags & ~TransformFlags.NodeExcludes; } + function computeCatchClause(node: CatchClause, subtreeFlags: TransformFlags) { + let transformFlags = subtreeFlags; + + if (node.variableDeclaration && isBindingPattern(node.variableDeclaration.name)) { + transformFlags |= TransformFlags.AssertES2015; + } + + node.transformFlags = transformFlags | TransformFlags.HasComputedFlags; + return transformFlags & ~TransformFlags.NodeExcludes; + } + function computeExpressionWithTypeArguments(node: ExpressionWithTypeArguments, subtreeFlags: TransformFlags) { // An ExpressionWithTypeArguments is ES6 syntax, as it is used in the // extends clause of a class. @@ -2749,11 +2795,6 @@ namespace ts { else { transformFlags = subtreeFlags | TransformFlags.ContainsHoistedDeclarationOrCompletion; - // If a FunctionDeclaration is exported, then it is either ES6 or TypeScript syntax. - if (modifierFlags & ModifierFlags.Export) { - transformFlags |= TransformFlags.AssertTypeScript | TransformFlags.AssertES2015; - } - // TypeScript-specific modifiers, type parameters, and type annotations are TypeScript // syntax. if (modifierFlags & ModifierFlags.TypeScriptModifier @@ -2895,11 +2936,6 @@ namespace ts { else { transformFlags = subtreeFlags; - // If a VariableStatement is exported, then it is either ES6 or TypeScript syntax. - if (modifierFlags & ModifierFlags.Export) { - transformFlags |= TransformFlags.AssertES2015 | TransformFlags.AssertTypeScript; - } - if (declarationListTransformFlags & TransformFlags.ContainsBindingPattern) { transformFlags |= TransformFlags.AssertES2015; } @@ -3016,12 +3052,6 @@ namespace ts { transformFlags |= TransformFlags.AssertJsx; break; - case SyntaxKind.ExportKeyword: - // This node is both ES6 and TypeScript syntax. - transformFlags |= TransformFlags.AssertES2015 | TransformFlags.AssertTypeScript; - break; - - case SyntaxKind.DefaultKeyword: case SyntaxKind.NoSubstitutionTemplateLiteral: case SyntaxKind.TemplateHead: case SyntaxKind.TemplateMiddle: @@ -3030,6 +3060,7 @@ namespace ts { case SyntaxKind.TaggedTemplateExpression: case SyntaxKind.ShorthandPropertyAssignment: case SyntaxKind.ForOfStatement: + case SyntaxKind.StaticKeyword: // These nodes are ES6 syntax. transformFlags |= TransformFlags.AssertES2015; break; diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index fc89bfd764c..2feec887cc1 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -139,6 +139,11 @@ namespace ts { const stringOrNumberType = getUnionType([stringType, numberType]); const emptyObjectType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); + + const emptyTypeLiteralSymbol = createSymbol(SymbolFlags.TypeLiteral | SymbolFlags.Transient, "__type"); + emptyTypeLiteralSymbol.members = createMap(); + const emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, emptyArray, emptyArray, undefined, undefined); + const emptyGenericType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); emptyGenericType.instantiations = createMap(); @@ -494,7 +499,7 @@ namespace ts { const moduleNotFoundError = !isInAmbientContext(moduleName.parent.parent) ? Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found : undefined; - let mainModule = resolveExternalModuleNameWorker(moduleName, moduleName, moduleNotFoundError); + let mainModule = resolveExternalModuleNameWorker(moduleName, moduleName, moduleNotFoundError, /*isForAugmentation*/ true); if (!mainModule) { return; } @@ -1347,16 +1352,16 @@ namespace ts { return resolveExternalModuleNameWorker(location, moduleReferenceExpression, Diagnostics.Cannot_find_module_0); } - function resolveExternalModuleNameWorker(location: Node, moduleReferenceExpression: Expression, moduleNotFoundError: DiagnosticMessage): Symbol { + function resolveExternalModuleNameWorker(location: Node, moduleReferenceExpression: Expression, moduleNotFoundError: DiagnosticMessage, isForAugmentation = false): Symbol { if (moduleReferenceExpression.kind !== SyntaxKind.StringLiteral) { return; } const moduleReferenceLiteral = moduleReferenceExpression; - return resolveExternalModule(location, moduleReferenceLiteral.text, moduleNotFoundError, moduleReferenceLiteral); + return resolveExternalModule(location, moduleReferenceLiteral.text, moduleNotFoundError, moduleReferenceLiteral, isForAugmentation); } - function resolveExternalModule(location: Node, moduleReference: string, moduleNotFoundError: DiagnosticMessage, errorNode: Node): Symbol { + function resolveExternalModule(location: Node, moduleReference: string, moduleNotFoundError: DiagnosticMessage, errorNode: Node, isForAugmentation = false): Symbol { // Module names are escaped in our symbol table. However, string literal values aren't. // Escape the name in the "require(...)" clause to ensure we find the right symbol. const moduleName = escapeIdentifier(moduleReference); @@ -1366,8 +1371,9 @@ namespace ts { } const isRelative = isExternalModuleNameRelative(moduleName); + const quotedName = '"' + moduleName + '"'; if (!isRelative) { - const symbol = getSymbol(globals, '"' + moduleName + '"', SymbolFlags.ValueModule); + const symbol = getSymbol(globals, quotedName, SymbolFlags.ValueModule); if (symbol) { // merged symbol is module declaration symbol combined with all augmentations return getMergedSymbol(symbol); @@ -1375,7 +1381,8 @@ namespace ts { } const resolvedModule = getResolvedModule(getSourceFileOfNode(location), moduleReference); - const sourceFile = resolvedModule && host.getSourceFile(resolvedModule.resolvedFileName); + const resolutionDiagnostic = resolvedModule && getResolutionDiagnostic(compilerOptions, resolvedModule); + const sourceFile = resolvedModule && !resolutionDiagnostic && host.getSourceFile(resolvedModule.resolvedFileName); if (sourceFile) { if (sourceFile.symbol) { // merged symbol is module declaration symbol combined with all augmentations @@ -1395,15 +1402,37 @@ namespace ts { } } + // May be an untyped module. If so, ignore resolutionDiagnostic. + if (!isRelative && resolvedModule && !extensionIsTypeScript(resolvedModule.extension)) { + if (isForAugmentation) { + Debug.assert(!!moduleNotFoundError); + const diag = Diagnostics.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented; + error(errorNode, diag, moduleName, resolvedModule.resolvedFileName); + } + else if (compilerOptions.noImplicitAny && moduleNotFoundError) { + error(errorNode, + Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, + moduleReference, + resolvedModule.resolvedFileName); + } + // Failed imports and untyped modules are both treated in an untyped manner; only difference is whether we give a diagnostic first. + return undefined; + } + if (moduleNotFoundError) { // report errors only if it was requested - const tsExtension = tryExtractTypeScriptExtension(moduleName); - if (tsExtension) { - const diag = Diagnostics.An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead; - error(errorNode, diag, tsExtension, removeExtension(moduleName, tsExtension)); + if (resolutionDiagnostic) { + error(errorNode, resolutionDiagnostic, moduleName, resolvedModule.resolvedFileName); } else { - error(errorNode, moduleNotFoundError, moduleName); + const tsExtension = tryExtractTypeScriptExtension(moduleName); + if (tsExtension) { + const diag = Diagnostics.An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead; + error(errorNode, diag, tsExtension, removeExtension(moduleName, tsExtension)); + } + else { + error(errorNode, moduleNotFoundError, moduleName); + } } } return undefined; @@ -3320,7 +3349,7 @@ namespace ts { } // Handle catch clause variables const declaration = symbol.valueDeclaration; - if (declaration.parent.kind === SyntaxKind.CatchClause) { + if (isCatchClauseVariableDeclarationOrBindingElement(declaration)) { return links.type = anyType; } // Handle export default expressions @@ -3468,7 +3497,7 @@ namespace ts { function getTypeOfFuncClassEnumModule(symbol: Symbol): Type { const links = getSymbolLinks(symbol); if (!links.type) { - if (symbol.valueDeclaration.kind === SyntaxKind.ModuleDeclaration && isShorthandAmbientModuleSymbol(symbol)) { + if (symbol.flags & SymbolFlags.Module && isShorthandAmbientModuleSymbol(symbol)) { links.type = anyType; } else { @@ -5795,10 +5824,15 @@ namespace ts { const links = getNodeLinks(node); if (!links.resolvedType) { // Deferred resolution of members is handled by resolveObjectTypeMembers - const type = createObjectType(ObjectFlags.Anonymous, node.symbol); - type.aliasSymbol = aliasSymbol; - type.aliasTypeArguments = aliasTypeArguments; - links.resolvedType = type; + if (isEmpty(node.symbol.members) && !aliasSymbol && !aliasTypeArguments) { + links.resolvedType = emptyTypeLiteralType; + } + else { + const type = createObjectType(ObjectFlags.Anonymous, node.symbol); + type.aliasSymbol = aliasSymbol; + type.aliasTypeArguments = aliasTypeArguments; + links.resolvedType = type; + } } return links.resolvedType; } @@ -6139,6 +6173,9 @@ namespace ts { } function isSymbolInScopeOfMappedTypeParameter(symbol: Symbol, mapper: TypeMapper) { + if (!(symbol.declarations && symbol.declarations.length)) { + return false; + } const mappedTypes = mapper.mappedTypes; // Starting with the parent of the symbol's declaration, check if the mapper maps any of // the type parameters introduced by enclosing declarations. We just pick the first @@ -10447,16 +10484,32 @@ namespace ts { // If the given type is an object or union type, if that type has a single signature, and if // that signature is non-generic, return the signature. Otherwise return undefined. - function getNonGenericSignature(type: Type): Signature { + function getNonGenericSignature(type: Type, node: FunctionExpression | ArrowFunction | MethodDeclaration): Signature { const signatures = getSignaturesOfStructuredType(type, SignatureKind.Call); if (signatures.length === 1) { const signature = signatures[0]; - if (!signature.typeParameters) { + if (!signature.typeParameters && !isAritySmaller(signature, node)) { return signature; } } } + /** If the contextual signature has fewer parameters than the function expression, do not use it */ + function isAritySmaller(signature: Signature, target: FunctionExpression | ArrowFunction | MethodDeclaration) { + let targetParameterCount = 0; + for (; targetParameterCount < target.parameters.length; targetParameterCount++) { + const param = target.parameters[targetParameterCount]; + if (param.initializer || param.questionToken || param.dotDotDotToken || isJSDocOptionalParameter(param)) { + break; + } + } + if (target.parameters.length && parameterIsThisKeyword(target.parameters[0])) { + targetParameterCount--; + } + const sourceLength = signature.hasRestParameter ? Number.MAX_VALUE : signature.parameters.length; + return sourceLength < targetParameterCount; + } + function isFunctionExpressionOrArrowFunction(node: Node): node is FunctionExpression | ArrowFunction { return node.kind === SyntaxKind.FunctionExpression || node.kind === SyntaxKind.ArrowFunction; } @@ -10486,12 +10539,12 @@ namespace ts { return undefined; } if (!(type.flags & TypeFlags.Union)) { - return getNonGenericSignature(type); + return getNonGenericSignature(type, node); } let signatureList: Signature[]; const types = (type).types; for (const current of types) { - const signature = getNonGenericSignature(current); + const signature = getNonGenericSignature(current, node); if (signature) { if (!signatureList) { // This signature will contribute to contextual union signature @@ -12937,16 +12990,41 @@ namespace ts { } // In JavaScript files, calls to any identifier 'require' are treated as external module imports - if (isInJavaScriptFile(node) && - isRequireCall(node, /*checkArgumentIsStringLiteral*/true) && - // Make sure require is not a local function - !resolveName(node.expression, (node.expression).text, SymbolFlags.Value, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined)) { + if (isInJavaScriptFile(node) && isCommonJsRequire(node)) { return resolveExternalModuleTypeByLiteral(node.arguments[0]); } return getReturnTypeOfSignature(signature); } + function isCommonJsRequire(node: Node) { + if (!isRequireCall(node, /*checkArgumentIsStringLiteral*/true)) { + return false; + } + // Make sure require is not a local function + const resolvedRequire = resolveName(node.expression, (node.expression).text, SymbolFlags.Value, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); + if (!resolvedRequire) { + // project does not contain symbol named 'require' - assume commonjs require + return true; + } + // project includes symbol named 'require' - make sure that it it ambient and local non-alias + if (resolvedRequire.flags & SymbolFlags.Alias) { + return false; + } + + const targetDeclarationKind = resolvedRequire.flags & SymbolFlags.Function + ? SyntaxKind.FunctionDeclaration + : resolvedRequire.flags & SymbolFlags.Variable + ? SyntaxKind.VariableDeclaration + : SyntaxKind.Unknown; + if (targetDeclarationKind !== SyntaxKind.Unknown) { + const decl = getDeclarationOfKind(resolvedRequire, targetDeclarationKind); + // function/variable declaration should be ambient + return isInAmbientContext(decl); + } + return false; + } + function checkTaggedTemplateExpression(node: TaggedTemplateExpression): Type { return getReturnTypeOfSignature(getResolvedSignature(node)); } @@ -15551,31 +15629,24 @@ namespace ts { } /** - * Checks the return type of an async function to ensure it is a compatible - * Promise implementation. - * @param node The signature to check - * @param returnType The return type for the function - * @remarks - * This checks that an async function has a valid Promise-compatible return type, - * and returns the *awaited type* of the promise. An async function has a valid - * Promise-compatible return type if the resolved value of the return type has a - * construct signature that takes in an `initializer` function that in turn supplies - * a `resolve` function as one of its arguments and results in an object with a - * callable `then` signature. - */ + * Checks the return type of an async function to ensure it is a compatible + * Promise implementation. + * + * This checks that an async function has a valid Promise-compatible return type, + * and returns the *awaited type* of the promise. An async function has a valid + * Promise-compatible return type if the resolved value of the return type has a + * construct signature that takes in an `initializer` function that in turn supplies + * a `resolve` function as one of its arguments and results in an object with a + * callable `then` signature. + * + * @param node The signature to check + */ function checkAsyncFunctionReturnType(node: FunctionLikeDeclaration): Type { if (languageVersion >= ScriptTarget.ES2015) { const returnType = getTypeFromTypeNode(node.type); return checkCorrectPromiseType(returnType, node.type, Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type); } - const globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType(); - if (globalPromiseConstructorLikeType === emptyObjectType) { - // If we couldn't resolve the global PromiseConstructorLike type we cannot verify - // compatibility with __awaiter. - return unknownType; - } - // As part of our emit for an async function, we will need to emit the entity name of // the return type annotation as an expression. To meet the necessary runtime semantics // for __awaiter, we must also check that the type of the declaration (e.g. the static @@ -15600,42 +15671,56 @@ namespace ts { // then(...): Promise; // } // - // When we get the type of the `Promise` symbol here, we get the type of the static - // side of the `Promise` class, which would be `{ new (...): Promise }`. + // Always mark the type node as referenced if it points to a value + markTypeNodeAsReferenced(node.type); + + const promiseConstructorName = getEntityNameFromTypeNode(node.type); const promiseType = getTypeFromTypeNode(node.type); - if (promiseType === unknownType && compilerOptions.isolatedModules) { - // If we are compiling with isolatedModules, we may not be able to resolve the - // type as a value. As such, we will just return unknownType; + if (promiseType === unknownType) { + if (!compilerOptions.isolatedModules) { + if (promiseConstructorName) { + error(node.type, Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, entityNameToString(promiseConstructorName)); + } + else { + error(node.type, Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type); + } + } return unknownType; } - const promiseConstructor = getNodeLinks(node.type).resolvedSymbol; - if (!promiseConstructor || !symbolIsValue(promiseConstructor)) { - // try to fall back to global promise type. - const typeName = promiseConstructor - ? symbolToString(promiseConstructor) - : typeToString(promiseType); - return checkCorrectPromiseType(promiseType, node.type, Diagnostics.Type_0_is_not_a_valid_async_function_return_type, typeName); + if (promiseConstructorName === undefined) { + error(node.type, Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, typeToString(promiseType)); + return unknownType; } - // If the Promise constructor, resolved locally, is an alias symbol we should mark it as referenced. - checkReturnTypeAnnotationAsExpression(node); + const promiseConstructorSymbol = resolveEntityName(promiseConstructorName, SymbolFlags.Value, /*ignoreErrors*/ true); + const promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : unknownType; + if (promiseConstructorType === unknownType) { + error(node.type, Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, entityNameToString(promiseConstructorName)); + return unknownType; + } - // Validate the promise constructor type. - const promiseConstructorType = getTypeOfSymbol(promiseConstructor); - if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, node.type, Diagnostics.Type_0_is_not_a_valid_async_function_return_type)) { + const globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType(); + if (globalPromiseConstructorLikeType === emptyObjectType) { + // If we couldn't resolve the global PromiseConstructorLike type we cannot verify + // compatibility with __awaiter. + error(node.type, Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, entityNameToString(promiseConstructorName)); + return unknownType; + } + + if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, node.type, + Diagnostics.Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value)) { return unknownType; } // Verify there is no local declaration that could collide with the promise constructor. - const promiseName = getEntityNameFromTypeNode(node.type); - const promiseNameOrNamespaceRoot = getFirstIdentifier(promiseName); - const rootSymbol = getSymbol(node.locals, promiseNameOrNamespaceRoot.text, SymbolFlags.Value); - if (rootSymbol) { - error(rootSymbol.valueDeclaration, Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, - promiseNameOrNamespaceRoot.text, - getFullyQualifiedName(promiseConstructor)); + const rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName); + const collidingSymbol = getSymbol(node.locals, rootName.text, SymbolFlags.Value); + if (collidingSymbol) { + error(collidingSymbol.valueDeclaration, Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, + rootName.text, + entityNameToString(promiseConstructorName)); return unknownType; } @@ -15693,44 +15778,19 @@ namespace ts { errorInfo); } - /** Checks a type reference node as an expression. */ - function checkTypeNodeAsExpression(node: TypeNode) { - // When we are emitting type metadata for decorators, we need to try to check the type - // as if it were an expression so that we can emit the type in a value position when we - // serialize the type metadata. - if (node && node.kind === SyntaxKind.TypeReference) { - const root = getFirstIdentifier((node).typeName); - const meaning = root.parent.kind === SyntaxKind.TypeReference ? SymbolFlags.Type : SymbolFlags.Namespace; - // Resolve type so we know which symbol is referenced - const rootSymbol = resolveName(root, root.text, meaning | SymbolFlags.Alias, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); - // Resolved symbol is alias - if (rootSymbol && rootSymbol.flags & SymbolFlags.Alias) { - const aliasTarget = resolveAlias(rootSymbol); - // If alias has value symbol - mark alias as referenced - if (aliasTarget.flags & SymbolFlags.Value && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol))) { - markAliasSymbolAsReferenced(rootSymbol); - } - } - } - } - /** - * Checks the type annotation of an accessor declaration or property declaration as - * an expression if it is a type reference to a type with a value declaration. - */ - function checkTypeAnnotationAsExpression(node: VariableLikeDeclaration) { - checkTypeNodeAsExpression((node).type); - } - - function checkReturnTypeAnnotationAsExpression(node: FunctionLikeDeclaration) { - checkTypeNodeAsExpression(node.type); - } - - /** Checks the type annotation of the parameters of a function/method or the constructor of a class as expressions */ - function checkParameterTypeAnnotationsAsExpressions(node: FunctionLikeDeclaration) { - // ensure all type annotations with a value declaration are checked as an expression - for (const parameter of node.parameters) { - checkTypeAnnotationAsExpression(parameter); + * If a TypeNode can be resolved to a value symbol imported from an external module, it is + * marked as referenced to prevent import elision. + */ + function markTypeNodeAsReferenced(node: TypeNode) { + const typeName = node && getEntityNameFromTypeNode(node); + const rootName = typeName && getFirstIdentifier(typeName); + const rootSymbol = rootName && resolveName(rootName, rootName.text, (typeName.kind === SyntaxKind.Identifier ? SymbolFlags.Type : SymbolFlags.Namespace) | SymbolFlags.Alias, /*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined); + if (rootSymbol + && rootSymbol.flags & SymbolFlags.Alias + && symbolIsValue(rootSymbol) + && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol))) { + markAliasSymbolAsReferenced(rootSymbol); } } @@ -15756,20 +15816,25 @@ namespace ts { case SyntaxKind.ClassDeclaration: const constructor = getFirstConstructorWithBody(node); if (constructor) { - checkParameterTypeAnnotationsAsExpressions(constructor); + for (const parameter of constructor.parameters) { + markTypeNodeAsReferenced(parameter.type); + } } break; case SyntaxKind.MethodDeclaration: case SyntaxKind.GetAccessor: case SyntaxKind.SetAccessor: - checkParameterTypeAnnotationsAsExpressions(node); - checkReturnTypeAnnotationAsExpression(node); + for (const parameter of (node).parameters) { + markTypeNodeAsReferenced(parameter.type); + } + + markTypeNodeAsReferenced((node).type); break; case SyntaxKind.PropertyDeclaration: case SyntaxKind.Parameter: - checkTypeAnnotationAsExpression(node); + markTypeNodeAsReferenced((node).type); break; } } @@ -15915,12 +15980,12 @@ namespace ts { for (const key in node.locals) { const local = node.locals[key]; if (!local.isReferenced) { - if (local.valueDeclaration && local.valueDeclaration.kind === SyntaxKind.Parameter) { - const parameter = local.valueDeclaration; + if (local.valueDeclaration && getRootDeclaration(local.valueDeclaration).kind === SyntaxKind.Parameter) { + const parameter = getRootDeclaration(local.valueDeclaration); if (compilerOptions.noUnusedParameters && !isParameterPropertyDeclaration(parameter) && !parameterIsThisKeyword(parameter) && - !parameterNameStartsWithUnderscore(parameter)) { + !parameterNameStartsWithUnderscore(local.valueDeclaration.name)) { error(local.valueDeclaration.name, Diagnostics._0_is_declared_but_never_used, local.name); } } @@ -15944,8 +16009,8 @@ namespace ts { error(node, Diagnostics._0_is_declared_but_never_used, name); } - function parameterNameStartsWithUnderscore(parameter: ParameterDeclaration) { - return parameter.name && isIdentifierThatStartsWithUnderScore(parameter.name); + function parameterNameStartsWithUnderscore(parameterName: DeclarationName) { + return parameterName && isIdentifierThatStartsWithUnderScore(parameterName); } function isIdentifierThatStartsWithUnderScore(node: Node) { @@ -17009,22 +17074,20 @@ namespace ts { if (catchClause) { // Grammar checking if (catchClause.variableDeclaration) { - if (catchClause.variableDeclaration.name.kind !== SyntaxKind.Identifier) { - grammarErrorOnFirstToken(catchClause.variableDeclaration.name, Diagnostics.Catch_clause_variable_name_must_be_an_identifier); - } - else if (catchClause.variableDeclaration.type) { + if (catchClause.variableDeclaration.type) { grammarErrorOnFirstToken(catchClause.variableDeclaration.type, Diagnostics.Catch_clause_variable_cannot_have_a_type_annotation); } else if (catchClause.variableDeclaration.initializer) { grammarErrorOnFirstToken(catchClause.variableDeclaration.initializer, Diagnostics.Catch_clause_variable_cannot_have_an_initializer); } else { - const identifierName = (catchClause.variableDeclaration.name).text; - const locals = catchClause.block.locals; - if (locals) { - const localSymbol = locals[identifierName]; - if (localSymbol && (localSymbol.flags & SymbolFlags.BlockScopedVariable) !== 0) { - grammarErrorOnNode(localSymbol.valueDeclaration, Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, identifierName); + const blockLocals = catchClause.block.locals; + if (blockLocals) { + for (const caughtName in catchClause.locals) { + const blockLocal = blockLocals[caughtName]; + if (blockLocal && (blockLocal.flags & SymbolFlags.BlockScopedVariable) !== 0) { + grammarErrorOnNode(blockLocal.valueDeclaration, Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, caughtName); + } } } } @@ -17292,7 +17355,7 @@ namespace ts { if (declaration && getModifierFlags(declaration) & ModifierFlags.Private) { const typeClassDeclaration = getClassLikeDeclarationOfSymbol(type.symbol); if (!isNodeWithinClass(node, typeClassDeclaration)) { - error(node, Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, (node.expression).text); + error(node, Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, getFullyQualifiedName(type.symbol)); } } } @@ -18484,9 +18547,33 @@ namespace ts { function getDiagnosticsWorker(sourceFile: SourceFile): Diagnostic[] { throwIfNonDiagnosticsProducing(); if (sourceFile) { + // Some global diagnostics are deferred until they are needed and + // may not be reported in the firt call to getGlobalDiagnostics. + // We should catch these changes and report them. + const previousGlobalDiagnostics = diagnostics.getGlobalDiagnostics(); + const previousGlobalDiagnosticsSize = previousGlobalDiagnostics.length; + checkSourceFile(sourceFile); - return diagnostics.getDiagnostics(sourceFile.fileName); + + const semanticDiagnostics = diagnostics.getDiagnostics(sourceFile.fileName); + const currentGlobalDiagnostics = diagnostics.getGlobalDiagnostics(); + if (currentGlobalDiagnostics !== previousGlobalDiagnostics) { + // If the arrays are not the same reference, new diagnostics were added. + const deferredGlobalDiagnostics = relativeComplement(previousGlobalDiagnostics, currentGlobalDiagnostics, compareDiagnostics); + return concatenate(deferredGlobalDiagnostics, semanticDiagnostics); + } + else if (previousGlobalDiagnosticsSize === 0 && currentGlobalDiagnostics.length > 0) { + // If the arrays are the same reference, but the length has changed, a single + // new diagnostic was added as DiagnosticCollection attempts to reuse the + // same array. + return concatenate(currentGlobalDiagnostics, semanticDiagnostics); + } + + return semanticDiagnostics; } + + // Global diagnostics are always added when a file is not provided to + // getDiagnostics forEach(host.getSourceFiles(), checkSourceFile); return diagnostics.getDiagnostics(); } @@ -19566,6 +19653,10 @@ namespace ts { if (typeReferenceDirective) { (typeReferenceDirectives || (typeReferenceDirectives = [])).push(typeReferenceDirective); } + else { + // found at least one entry that does not originate from type reference directive + return undefined; + } } } return typeReferenceDirectives; diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index c4e079c6a13..50399fd5c38 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -912,6 +912,9 @@ namespace ts { if (hasProperty(json, "files")) { if (isArray(json["files"])) { fileNames = json["files"]; + if (fileNames.length === 0) { + errors.push(createCompilerDiagnostic(Diagnostics.The_files_list_in_config_file_0_is_empty, configFileName || "tsconfig.json")); + } } else { errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "files", "Array")); @@ -954,7 +957,18 @@ namespace ts { includeSpecs = ["**/*"]; } - return matchFileNames(fileNames, includeSpecs, excludeSpecs, basePath, options, host, errors); + const result = matchFileNames(fileNames, includeSpecs, excludeSpecs, basePath, options, host, errors); + + if (result.fileNames.length === 0 && !hasProperty(json, "files") && resolutionStack.length === 0) { + errors.push( + createCompilerDiagnostic( + Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, + configFileName || "tsconfig.json", + JSON.stringify(includeSpecs || []), + JSON.stringify(excludeSpecs || []))); + } + + return result; } } @@ -994,9 +1008,7 @@ namespace ts { function convertTypingOptionsFromJsonWorker(jsonOptions: any, basePath: string, errors: Diagnostic[], configFileName?: string): TypingOptions { - const options: TypingOptions = getBaseFileName(configFileName) === "jsconfig.json" - ? { enableAutoDiscovery: true, include: [], exclude: [] } - : { enableAutoDiscovery: false, include: [], exclude: [] }; + const options: TypingOptions = { enableAutoDiscovery: getBaseFileName(configFileName) === "jsconfig.json", include: [], exclude: [] }; convertOptionsFromJson(typingOptionDeclarations, jsonOptions, basePath, options, Diagnostics.Unknown_typing_option_0, errors); return options; } @@ -1249,12 +1261,13 @@ namespace ts { /** * Gets directories in a set of include patterns that should be watched for changes. */ - function getWildcardDirectories(include: string[], exclude: string[], path: string, useCaseSensitiveFileNames: boolean) { + function getWildcardDirectories(include: string[], exclude: string[], path: string, useCaseSensitiveFileNames: boolean): Map { // We watch a directory recursively if it contains a wildcard anywhere in a directory segment // of the pattern: // // /a/b/**/d - Watch /a/b recursively to catch changes to any d in any subfolder recursively // /a/b/*/d - Watch /a/b recursively to catch any d in any immediate subfolder, even if a new subfolder is added + // /a/b - Watch /a/b recursively to catch changes to anything in any recursive subfoler // // We watch a directory without recursion if it contains a wildcard in the file segment of // the pattern: @@ -1267,15 +1280,14 @@ namespace ts { if (include !== undefined) { const recursiveKeys: string[] = []; for (const file of include) { - const name = normalizePath(combinePaths(path, file)); - if (excludeRegex && excludeRegex.test(name)) { + const spec = normalizePath(combinePaths(path, file)); + if (excludeRegex && excludeRegex.test(spec)) { continue; } - const match = wildcardDirectoryPattern.exec(name); + const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames); if (match) { - const key = useCaseSensitiveFileNames ? match[0] : match[0].toLowerCase(); - const flags = watchRecursivePattern.test(name) ? WatchDirectoryFlags.Recursive : WatchDirectoryFlags.None; + const { key, flags } = match; const existingFlags = wildcardDirectories[key]; if (existingFlags === undefined || existingFlags < flags) { wildcardDirectories[key] = flags; @@ -1299,6 +1311,20 @@ namespace ts { return wildcardDirectories; } + function getWildcardDirectoryFromSpec(spec: string, useCaseSensitiveFileNames: boolean): { key: string, flags: WatchDirectoryFlags } | undefined { + const match = wildcardDirectoryPattern.exec(spec); + if (match) { + return { + key: useCaseSensitiveFileNames ? match[0] : match[0].toLowerCase(), + flags: watchRecursivePattern.test(spec) ? WatchDirectoryFlags.Recursive : WatchDirectoryFlags.None + }; + } + if (isImplicitGlob(spec)) { + return { key: spec, flags: WatchDirectoryFlags.Recursive }; + } + return undefined; + } + /** * Determines whether a literal or wildcard file has already been included that has a higher * extension priority. diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 395ddb40574..dd71877930a 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -124,6 +124,13 @@ namespace ts { return undefined; } + export function zipWith(arrayA: T[], arrayB: U[], callback: (a: T, b: U, index: number) => void): void { + Debug.assert(arrayA.length === arrayB.length); + for (let i = 0; i < arrayA.length; i++) { + callback(arrayA[i], arrayB[i], i); + } + } + /** * Iterates through `array` by index and performs the callback on each element of array until the callback * returns a falsey value, then returns false. @@ -424,18 +431,23 @@ namespace ts { export function some(array: T[], predicate?: (value: T) => boolean): boolean { if (array) { - for (const v of array) { - if (!predicate || predicate(v)) { - return true; + if (predicate) { + for (const v of array) { + if (predicate(v)) { + return true; + } } } + else { + return array.length > 0; + } } return false; } export function concatenate(array1: T[], array2: T[]): T[] { - if (!array2 || !array2.length) return array1; - if (!array1 || !array1.length) return array2; + if (!some(array2)) return array1; + if (!some(array1)) return array2; return [...array1, ...array2]; } @@ -456,6 +468,44 @@ namespace ts { return result; } + export function arrayIsEqualTo(array1: ReadonlyArray, array2: ReadonlyArray, equaler?: (a: T, b: T) => boolean): boolean { + if (!array1 || !array2) { + return array1 === array2; + } + + if (array1.length !== array2.length) { + return false; + } + + for (let i = 0; i < array1.length; i++) { + const equals = equaler ? equaler(array1[i], array2[i]) : array1[i] === array2[i]; + if (!equals) { + return false; + } + } + + return true; + } + + export function changesAffectModuleResolution(oldOptions: CompilerOptions, newOptions: CompilerOptions): boolean { + return !oldOptions || + (oldOptions.module !== newOptions.module) || + (oldOptions.moduleResolution !== newOptions.moduleResolution) || + (oldOptions.noResolve !== newOptions.noResolve) || + (oldOptions.target !== newOptions.target) || + (oldOptions.noLib !== newOptions.noLib) || + (oldOptions.jsx !== newOptions.jsx) || + (oldOptions.allowJs !== newOptions.allowJs) || + (oldOptions.rootDir !== newOptions.rootDir) || + (oldOptions.configFilePath !== newOptions.configFilePath) || + (oldOptions.baseUrl !== newOptions.baseUrl) || + (oldOptions.maxNodeModuleJsDepth !== newOptions.maxNodeModuleJsDepth) || + !arrayIsEqualTo(oldOptions.lib, newOptions.lib) || + !arrayIsEqualTo(oldOptions.typeRoots, newOptions.typeRoots) || + !arrayIsEqualTo(oldOptions.rootDirs, newOptions.rootDirs) || + !equalOwnProperties(oldOptions.paths, newOptions.paths); + } + /** * Compacts an array, removing any falsey elements. */ @@ -477,6 +527,27 @@ namespace ts { return result || array; } + /** + * Gets the relative complement of `arrayA` with respect to `b`, returning the elements that + * are not present in `arrayA` but are present in `arrayB`. Assumes both arrays are sorted + * based on the provided comparer. + */ + export function relativeComplement(arrayA: T[] | undefined, arrayB: T[] | undefined, comparer: (x: T, y: T) => Comparison = compareValues, offsetA = 0, offsetB = 0): T[] | undefined { + if (!arrayB || !arrayA || arrayB.length === 0 || arrayA.length === 0) return arrayB; + const result: T[] = []; + outer: for (; offsetB < arrayB.length; offsetB++) { + inner: for (; offsetA < arrayA.length; offsetA++) { + switch (comparer(arrayB[offsetB], arrayA[offsetA])) { + case Comparison.LessThan: break inner; + case Comparison.EqualTo: continue outer; + case Comparison.GreaterThan: continue inner; + } + } + result.push(arrayB[offsetB]); + } + return result; + } + export function sum(array: any[], prop: string): number { let result = 0; for (const v of array) { @@ -485,14 +556,35 @@ namespace ts { return result; } - export function addRange(to: T[], from: T[]): void { - if (to && from) { - for (const v of from) { - if (v !== undefined) { - to.push(v); - } - } + /** + * Appends a value to an array, returning the array. + * + * @param to The array to which `value` is to be appended. If `to` is `undefined`, a new array + * is created if `value` was appended. + * @param value The value to append to the array. If `value` is `undefined`, nothing is + * appended. + */ + export function append(to: T[] | undefined, value: T | undefined): T[] | undefined { + if (value === undefined) return to; + if (to === undefined) to = []; + to.push(value); + return to; + } + + /** + * Appends a range of value to an array, returning the array. + * + * @param to The array to which `value` is to be appended. If `to` is `undefined`, a new array + * is created if `value` was appended. + * @param from The values to append to the array. If `from` is `undefined`, nothing is + * appended. If an element of `from` is `undefined`, that element is not appended. + */ + export function addRange(to: T[] | undefined, from: T[] | undefined): T[] | undefined { + if (from === undefined) return to; + for (const v of from) { + to = append(to, v); } + return to; } export function rangeEquals(array1: T[], array2: T[], pos: number, end: number) { @@ -505,33 +597,43 @@ namespace ts { return true; } + /** + * Returns the first element of an array if non-empty, `undefined` otherwise. + */ export function firstOrUndefined(array: T[]): T { return array && array.length > 0 ? array[0] : undefined; } + /** + * Returns the last element of an array if non-empty, `undefined` otherwise. + */ + export function lastOrUndefined(array: T[]): T { + return array && array.length > 0 + ? array[array.length - 1] + : undefined; + } + + /** + * Returns the only element of an array if it contains only one element, `undefined` otherwise. + */ export function singleOrUndefined(array: T[]): T { return array && array.length === 1 ? array[0] : undefined; } + /** + * Returns the only element of an array if it contains only one element; otheriwse, returns the + * array. + */ export function singleOrMany(array: T[]): T | T[] { return array && array.length === 1 ? array[0] : array; } - /** - * Returns the last element of an array if non-empty, undefined otherwise. - */ - export function lastOrUndefined(array: T[]): T { - return array && array.length > 0 - ? array[array.length - 1] - : undefined; - } - export function replaceElement(array: T[], index: number, value: T): T[] { const result = array.slice(0); result[index] = value; @@ -545,12 +647,12 @@ namespace ts { * @param array A sorted array whose first element must be no larger than number * @param number The value to be searched for in the array. */ - export function binarySearch(array: T[], value: T, comparer?: (v1: T, v2: T) => number): number { + export function binarySearch(array: T[], value: T, comparer?: (v1: T, v2: T) => number, offset?: number): number { if (!array || array.length === 0) { return -1; } - let low = 0; + let low = offset || 0; let high = array.length - 1; comparer = comparer !== undefined ? comparer @@ -821,7 +923,7 @@ namespace ts { return result; } - export function extend(first: T1 , second: T2): T1 & T2 { + export function extend(first: T1, second: T2): T1 & T2 { const result: T1 & T2 = {}; for (const id in second) if (hasOwnProperty.call(second, id)) { (result as any)[id] = (second as any)[id]; @@ -836,7 +938,7 @@ namespace ts { * Adds the value to an array of values associated with the key, and returns the array. * Creates the array if it does not already exist. */ - export function multiMapAdd(map: Map, key: string, value: V): V[] { + export function multiMapAdd(map: Map, key: string | number, value: V): V[] { const values = map[key]; if (values) { values.push(value); @@ -974,8 +1076,8 @@ namespace ts { Debug.assert(length >= 0, "length must be non-negative, is " + length); if (file) { - Debug.assert(start <= file.text.length, `start must be within the bounds of the file. ${ start } > ${ file.text.length }`); - Debug.assert(end <= file.text.length, `end must be the bounds of the file. ${ end } > ${ file.text.length }`); + Debug.assert(start <= file.text.length, `start must be within the bounds of the file. ${start} > ${file.text.length}`); + Debug.assert(end <= file.text.length, `end must be the bounds of the file. ${end} > ${file.text.length}`); } let text = getLocaleSpecificMessage(message); @@ -1231,7 +1333,7 @@ namespace ts { */ export function getDirectoryPath(path: Path): Path; export function getDirectoryPath(path: string): string; - export function getDirectoryPath(path: string): any { + export function getDirectoryPath(path: string): string { return path.substr(0, Math.max(getRootLength(path), path.lastIndexOf(directorySeparator))); } @@ -1491,6 +1593,10 @@ namespace ts { return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos; } + export function hasExtension(fileName: string): boolean { + return getBaseFileName(fileName).indexOf(".") >= 0; + } + export function fileExtensionIs(path: string, extension: string): boolean { return path.length > extension.length && endsWith(path, extension); } @@ -1525,7 +1631,7 @@ namespace ts { return undefined; } - const replaceWildcardCharacter = usage === "files" ? replaceWildCardCharacterFiles : replaceWildCardCharacterOther; + const replaceWildcardCharacter = usage === "files" ? replaceWildCardCharacterFiles : replaceWildCardCharacterOther; const singleAsteriskRegexFragment = usage === "files" ? singleAsteriskRegexFragmentFiles : singleAsteriskRegexFragmentOther; /** @@ -1536,73 +1642,21 @@ namespace ts { let pattern = ""; let hasWrittenSubpattern = false; - spec: for (const spec of specs) { + for (const spec of specs) { if (!spec) { continue; } - let subpattern = ""; - let hasRecursiveDirectoryWildcard = false; - let hasWrittenComponent = false; - const components = getNormalizedPathComponents(spec, basePath); - if (usage !== "exclude" && components[components.length - 1] === "**") { - continue spec; - } - - // getNormalizedPathComponents includes the separator for the root component. - // We need to remove to create our regex correctly. - components[0] = removeTrailingDirectorySeparator(components[0]); - - let optionalCount = 0; - for (let component of components) { - if (component === "**") { - if (hasRecursiveDirectoryWildcard) { - continue spec; - } - - subpattern += doubleAsteriskRegexFragment; - hasRecursiveDirectoryWildcard = true; - hasWrittenComponent = true; - } - else { - if (usage === "directories") { - subpattern += "("; - optionalCount++; - } - - if (hasWrittenComponent) { - subpattern += directorySeparator; - } - - if (usage !== "exclude") { - // The * and ? wildcards should not match directories or files that start with . if they - // appear first in a component. Dotted directories and files can be included explicitly - // like so: **/.*/.* - if (component.charCodeAt(0) === CharacterCodes.asterisk) { - subpattern += "([^./]" + singleAsteriskRegexFragment + ")?"; - component = component.substr(1); - } - else if (component.charCodeAt(0) === CharacterCodes.question) { - subpattern += "[^./]"; - component = component.substr(1); - } - } - - subpattern += component.replace(reservedCharacterPattern, replaceWildcardCharacter); - hasWrittenComponent = true; - } - } - - while (optionalCount > 0) { - subpattern += ")?"; - optionalCount--; + const subPattern = getSubPatternFromSpec(spec, basePath, usage, singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter); + if (subPattern === undefined) { + continue; } if (hasWrittenSubpattern) { pattern += "|"; } - pattern += "(" + subpattern + ")"; + pattern += "(" + subPattern + ")"; hasWrittenSubpattern = true; } @@ -1610,7 +1664,83 @@ namespace ts { return undefined; } - return "^(" + pattern + (usage === "exclude" ? ")($|/)" : ")$"); + // If excluding, match "foo/bar/baz...", but if including, only allow "foo". + const terminator = usage === "exclude" ? "($|/)" : "$"; + return `^(${pattern})${terminator}`; + } + + /** + * An "includes" path "foo" is implicitly a glob "foo/** /*" (without the space) if its last component has no extension, + * and does not contain any glob characters itself. + */ + export function isImplicitGlob(lastPathComponent: string): boolean { + return !/[.*?]/.test(lastPathComponent); + } + + function getSubPatternFromSpec(spec: string, basePath: string, usage: "files" | "directories" | "exclude", singleAsteriskRegexFragment: string, doubleAsteriskRegexFragment: string, replaceWildcardCharacter: (match: string) => string): string | undefined { + let subpattern = ""; + let hasRecursiveDirectoryWildcard = false; + let hasWrittenComponent = false; + const components = getNormalizedPathComponents(spec, basePath); + const lastComponent = lastOrUndefined(components); + if (usage !== "exclude" && lastComponent === "**") { + return undefined; + } + + // getNormalizedPathComponents includes the separator for the root component. + // We need to remove to create our regex correctly. + components[0] = removeTrailingDirectorySeparator(components[0]); + + if (isImplicitGlob(lastComponent)) { + components.push("**", "*"); + } + + let optionalCount = 0; + for (let component of components) { + if (component === "**") { + if (hasRecursiveDirectoryWildcard) { + return undefined; + } + + subpattern += doubleAsteriskRegexFragment; + hasRecursiveDirectoryWildcard = true; + } + else { + if (usage === "directories") { + subpattern += "("; + optionalCount++; + } + + if (hasWrittenComponent) { + subpattern += directorySeparator; + } + + if (usage !== "exclude") { + // The * and ? wildcards should not match directories or files that start with . if they + // appear first in a component. Dotted directories and files can be included explicitly + // like so: **/.*/.* + if (component.charCodeAt(0) === CharacterCodes.asterisk) { + subpattern += "([^./]" + singleAsteriskRegexFragment + ")?"; + component = component.substr(1); + } + else if (component.charCodeAt(0) === CharacterCodes.question) { + subpattern += "[^./]"; + component = component.substr(1); + } + } + + subpattern += component.replace(reservedCharacterPattern, replaceWildcardCharacter); + } + + hasWrittenComponent = true; + } + + while (optionalCount > 0) { + subpattern += ")?"; + optionalCount--; + } + + return subpattern; } function replaceWildCardCharacterFiles(match: string) { @@ -1697,6 +1827,7 @@ namespace ts { function getBasePaths(path: string, includes: string[], useCaseSensitiveFileNames: boolean) { // Storage for our results in the form of literal paths (e.g. the paths as written by the user). const basePaths: string[] = [path]; + if (includes) { // Storage for literal base paths amongst the include patterns. const includeBasePaths: string[] = []; @@ -1704,14 +1835,8 @@ namespace ts { // We also need to check the relative paths by converting them to absolute and normalizing // in case they escape the base path (e.g "..\somedirectory") const absolute: string = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path, include)); - - const wildcardOffset = indexOfAnyCharCode(absolute, wildcardCharCodes); - const includeBasePath = wildcardOffset < 0 - ? removeTrailingDirectorySeparator(getDirectoryPath(absolute)) - : absolute.substring(0, absolute.lastIndexOf(directorySeparator, wildcardOffset)); - // Append the literal and canonical candidate base paths. - includeBasePaths.push(includeBasePath); + includeBasePaths.push(getIncludeBasePath(absolute)); } // Sort the offsets array using either the literal or canonical path representations. @@ -1719,21 +1844,27 @@ namespace ts { // Iterate over each include base path and include unique base paths that are not a // subpath of an existing base path - include: for (let i = 0; i < includeBasePaths.length; i++) { - const includeBasePath = includeBasePaths[i]; - for (let j = 0; j < basePaths.length; j++) { - if (containsPath(basePaths[j], includeBasePath, path, !useCaseSensitiveFileNames)) { - continue include; - } + for (const includeBasePath of includeBasePaths) { + if (ts.every(basePaths, basePath => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames))) { + basePaths.push(includeBasePath); } - - basePaths.push(includeBasePath); } } return basePaths; } + function getIncludeBasePath(absolute: string): string { + const wildcardOffset = indexOfAnyCharCode(absolute, wildcardCharCodes); + if (wildcardOffset < 0) { + // No "*" or "?" in the path + return !hasExtension(absolute) + ? absolute + : removeTrailingDirectorySeparator(getDirectoryPath(absolute)); + } + return absolute.substring(0, absolute.lastIndexOf(directorySeparator, wildcardOffset)); + } + export function ensureScriptKind(fileName: string, scriptKind?: ScriptKind): ScriptKind { // Using scriptKind as a condition handles both: // - 'scriptKind' is unspecified and thus it is `undefined` @@ -1767,7 +1898,7 @@ namespace ts { /** Must have ".d.ts" first because if ".ts" goes first, that will be detected as the extension instead of ".d.ts". */ export const supportedTypescriptExtensionsForExtractExtension = [".d.ts", ".ts", ".tsx"]; export const supportedJavascriptExtensions = [".js", ".jsx"]; - const allSupportedExtensions = supportedTypeScriptExtensions.concat(supportedJavascriptExtensions); + const allSupportedExtensions = supportedTypeScriptExtensions.concat(supportedJavascriptExtensions); export function getSupportedExtensions(options?: CompilerOptions): string[] { return options && options.allowJs ? allSupportedExtensions : supportedTypeScriptExtensions; @@ -1864,10 +1995,6 @@ namespace ts { return path.substring(0, path.length - extension.length); } - export function isJsxOrTsxExtension(ext: string): boolean { - return ext === ".jsx" || ext === ".tsx"; - } - export function changeExtension(path: T, newExtension: string): T { return (removeFileExtension(path) + newExtension); } @@ -2060,4 +2187,33 @@ namespace ts { // pos === undefined || pos === null || isNaN(pos) || pos < 0; return !(pos >= 0); } + + /** True if an extension is one of the supported TypeScript extensions. */ + export function extensionIsTypeScript(ext: Extension): boolean { + return ext <= Extension.LastTypeScriptExtension; + } + + /** + * Gets the extension from a path. + * Path must have a valid extension. + */ + export function extensionFromPath(path: string): Extension { + if (fileExtensionIs(path, ".d.ts")) { + return Extension.Dts; + } + if (fileExtensionIs(path, ".ts")) { + return Extension.Ts; + } + if (fileExtensionIs(path, ".tsx")) { + return Extension.Tsx; + } + if (fileExtensionIs(path, ".js")) { + return Extension.Js; + } + if (fileExtensionIs(path, ".jsx")) { + return Extension.Jsx; + } + Debug.fail(`File ${path} has unknown extension.`); + return Extension.Js; + } } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index e4fc2b7982d..98c8e3693a2 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -163,7 +163,7 @@ "category": "Error", "code": 1054 }, - "Type '{0}' is not a valid async function return type.": { + "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.": { "category": "Error", "code": 1055 }, @@ -603,10 +603,6 @@ "category": "Error", "code": 1194 }, - "Catch clause variable name must be an identifier.": { - "category": "Error", - "code": 1195 - }, "Catch clause variable cannot have a type annotation.": { "category": "Error", "code": 1196 @@ -1855,6 +1851,10 @@ "category": "Error", "code": 2664 }, + "Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented.": { + "category": "Error", + "code": 2665 + }, "Exports and export assignments are not permitted in module augmentations.": { "category": "Error", "code": 2666 @@ -2709,7 +2709,7 @@ "category": "Message", "code": 6099 }, - "'package.json' does not have 'types' field.": { + "'package.json' does not have a 'types' or 'main' field.": { "category": "Message", "code": 6100 }, @@ -2857,7 +2857,7 @@ "category": "Message", "code": 6136 }, - "No types specified in 'package.json' but 'allowJs' is set, so returning 'main' value of '{0}'": { + "No types specified in 'package.json', so returning 'main' value of '{0}'": { "category": "Message", "code": 6137 }, @@ -2877,6 +2877,14 @@ "category": "Message", "code": 6141 }, + "Module '{0}' was resolved to '{1}', but '--jsx' is not set.": { + "category": "Error", + "code": 6142 + }, + "Module '{0}' was resolved to '{1}', but '--allowJs' is not set.": { + "category": "Error", + "code": 6143 + }, "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", "code": 7005 @@ -2909,6 +2917,10 @@ "category": "Error", "code": 7015 }, + "Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type.": { + "category": "Error", + "code": 7016 + }, "Element implicitly has an 'any' type because type '{0}' has no index signature.": { "category": "Error", "code": 7017 @@ -3089,6 +3101,7 @@ "category": "Error", "code": 17010 }, + "Circularity detected while resolving configuration: {0}": { "category": "Error", "code": 18000 @@ -3097,6 +3110,15 @@ "category": "Error", "code": 18001 }, + "The 'files' list in config file '{0}' is empty.": { + "category": "Error", + "code": 18002 + }, + "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'.": { + "category": "Error", + "code": 18003 + }, + "Add missing 'super()' call.": { "category": "Message", "code": 90001 diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts index 4194b7aaf5f..c557e3514a5 100644 --- a/src/compiler/factory.ts +++ b/src/compiler/factory.ts @@ -109,12 +109,12 @@ namespace ts { export function createLiteral(value: string | number | boolean, location?: TextRange): PrimaryExpression; export function createLiteral(value: string | number | boolean | StringLiteral | Identifier, location?: TextRange): PrimaryExpression { if (typeof value === "number") { - const node = createNode(SyntaxKind.NumericLiteral, location, /*flags*/ undefined); + const node = createNode(SyntaxKind.NumericLiteral, location, /*flags*/ undefined); node.text = value.toString(); return node; } else if (typeof value === "boolean") { - return createNode(value ? SyntaxKind.TrueKeyword : SyntaxKind.FalseKeyword, location, /*flags*/ undefined); + return createNode(value ? SyntaxKind.TrueKeyword : SyntaxKind.FalseKeyword, location, /*flags*/ undefined); } else if (typeof value === "string") { const node = createNode(SyntaxKind.StringLiteral, location, /*flags*/ undefined); @@ -226,20 +226,7 @@ namespace ts { // Signature elements - export function createParameter(name: string | Identifier | BindingPattern, initializer?: Expression, location?: TextRange) { - return createParameterDeclaration( - /*decorators*/ undefined, - /*modifiers*/ undefined, - /*dotDotDotToken*/ undefined, - name, - /*questionToken*/ undefined, - /*type*/ undefined, - initializer, - location - ); - } - - export function createParameterDeclaration(decorators: Decorator[], modifiers: Modifier[], dotDotDotToken: DotDotDotToken, name: string | Identifier | BindingPattern, questionToken: QuestionToken, type: TypeNode, initializer: Expression, location?: TextRange, flags?: NodeFlags) { + export function createParameter(decorators: Decorator[], modifiers: Modifier[], dotDotDotToken: DotDotDotToken, name: string | Identifier | BindingPattern, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression, location?: TextRange, flags?: NodeFlags) { const node = createNode(SyntaxKind.Parameter, location, flags); node.decorators = decorators ? createNodeArray(decorators) : undefined; node.modifiers = modifiers ? createNodeArray(modifiers) : undefined; @@ -251,9 +238,9 @@ namespace ts { return node; } - export function updateParameterDeclaration(node: ParameterDeclaration, decorators: Decorator[], modifiers: Modifier[], name: BindingName, type: TypeNode, initializer: Expression) { + export function updateParameter(node: ParameterDeclaration, decorators: Decorator[], modifiers: Modifier[], name: BindingName, type: TypeNode, initializer: Expression) { if (node.decorators !== decorators || node.modifiers !== modifiers || node.name !== name || node.type !== type || node.initializer !== initializer) { - return updateNode(createParameterDeclaration(decorators, modifiers, node.dotDotDotToken, name, node.questionToken, type, initializer, /*location*/ node, /*flags*/ node.flags), node); + return updateNode(createParameter(decorators, modifiers, node.dotDotDotToken, name, node.questionToken, type, initializer, /*location*/ node, /*flags*/ node.flags), node); } return node; @@ -1474,6 +1461,28 @@ namespace ts { return node; } + /** + * Creates a synthetic element to act as a placeholder for the end of an emitted declaration in + * order to properly emit exports. + */ + export function createEndOfDeclarationMarker(original: Node) { + const node = createNode(SyntaxKind.EndOfDeclarationMarker); + node.emitNode = {}; + node.original = original; + return node; + } + + /** + * Creates a synthetic element to act as a placeholder for the beginning of a merged declaration in + * order to properly emit exports. + */ + export function createMergeDeclarationMarker(original: Node) { + const node = createNode(SyntaxKind.MergeDeclarationMarker); + node.emitNode = {}; + node.original = original; + return node; + } + /** * Creates a synthetic expression to act as a placeholder for a not-emitted expression in * order to preserve comments or sourcemap positions. @@ -1557,18 +1566,6 @@ namespace ts { } } - export function createRestParameter(name: string | Identifier) { - return createParameterDeclaration( - /*decorators*/ undefined, - /*modifiers*/ undefined, - createToken(SyntaxKind.DotDotDotToken), - name, - /*questionToken*/ undefined, - /*type*/ undefined, - /*initializer*/ undefined - ); - } - export function createFunctionCall(func: Expression, thisArg: Expression, argumentsList: Expression[], location?: TextRange) { return createCall( createPropertyAccess(func, "call"), @@ -1625,7 +1622,9 @@ namespace ts { // flag and setting a parent node. const react = createIdentifier(reactNamespace || "React"); react.flags &= ~NodeFlags.Synthesized; - react.parent = parent; + // Set the parent that is in parse tree + // this makes sure that parent chain is intact for checker to traverse complete scope tree + react.parent = getParseTreeNode(parent); return react; } @@ -1662,6 +1661,18 @@ namespace ts { ); } + export function createExportDefault(expression: Expression) { + return createExportAssignment(/*decorators*/ undefined, /*modifiers*/ undefined, /*isExportEquals*/ false, expression); + } + + export function createExternalModuleExport(exportName: Identifier) { + return createExportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, createNamedExports([createExportSpecifier(exportName)])); + } + + export function createLetStatement(name: Identifier, initializer: Expression, location?: TextRange) { + return createVariableStatement(/*modifiers*/ undefined, createLetDeclarationList([createVariableDeclaration(name, /*type*/ undefined, initializer)]), location); + } + export function createLetDeclarationList(declarations: VariableDeclaration[], location?: TextRange) { return createVariableDeclarationList(declarations, location, NodeFlags.Let); } @@ -1781,13 +1792,10 @@ namespace ts { return createArrowFunction( /*modifiers*/ undefined, /*typeParameters*/ undefined, - [createParameter("name")], + [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "name")], /*type*/ undefined, - /*equalsGreaterThanToken*/ undefined, - createElementAccess( - target, - createIdentifier("name") - ) + createToken(SyntaxKind.EqualsGreaterThanToken), + createElementAccess(target, createIdentifier("name")) ); } @@ -1797,11 +1805,11 @@ namespace ts { /*modifiers*/ undefined, /*typeParameters*/ undefined, [ - createParameter("name"), - createParameter("value") + createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "name"), + createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "value") ], /*type*/ undefined, - /*equalsGreaterThanToken*/ undefined, + createToken(SyntaxKind.EqualsGreaterThanToken), createAssignment( createElementAccess( target, @@ -1853,7 +1861,7 @@ namespace ts { /*decorators*/ undefined, /*modifiers*/ undefined, "value", - [createParameter("v")], + [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "v")], createBlock([ createStatement( createCall( @@ -1873,9 +1881,9 @@ namespace ts { createArrowFunction( /*modifiers*/ undefined, /*typeParameters*/ undefined, - [createParameter("name")], + [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "name")], /*type*/ undefined, - /*equalsGreaterThanToken*/ undefined, + createToken(SyntaxKind.EqualsGreaterThanToken), createLogicalOr( createElementAccess( createIdentifier("cache"), @@ -1915,8 +1923,8 @@ namespace ts { /*name*/ undefined, /*typeParameters*/ undefined, [ - createParameter("geti"), - createParameter("seti") + createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "geti"), + createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "seti") ], /*type*/ undefined, createBlock([ @@ -2193,6 +2201,107 @@ namespace ts { ); } + /** + * Gets the local name of a declaration. This is primarily used for declarations that can be + * referred to by name in the declaration's immediate scope (classes, enums, namespaces). A + * local name will *never* be prefixed with an module or namespace export modifier like + * "exports." when emitted as an expression. + * + * @param node The declaration. + * @param allowComments A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + */ + export function getLocalName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean) { + return getName(node, allowComments, allowSourceMaps, EmitFlags.LocalName); + } + + /** + * Gets whether an identifier should only be referred to by its local name. + */ + export function isLocalName(node: Identifier) { + return (getEmitFlags(node) & EmitFlags.LocalName) !== 0; + } + + /** + * Gets the export name of a declaration. This is primarily used for declarations that can be + * referred to by name in the declaration's immediate scope (classes, enums, namespaces). An + * export name will *always* be prefixed with an module or namespace export modifier like + * `"exports."` when emitted as an expression if the name points to an exported symbol. + * + * @param node The declaration. + * @param allowComments A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + */ + export function getExportName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean): Identifier { + return getName(node, allowComments, allowSourceMaps, EmitFlags.ExportName); + } + + /** + * Gets whether an identifier should only be referred to by its export representation if the + * name points to an exported symbol. + */ + export function isExportName(node: Identifier) { + return (getEmitFlags(node) & EmitFlags.ExportName) !== 0; + } + + /** + * Gets the name of a declaration for use in declarations. + * + * @param node The declaration. + * @param allowComments A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + */ + export function getDeclarationName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean) { + return getName(node, allowComments, allowSourceMaps); + } + + function getName(node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean, emitFlags?: EmitFlags) { + if (node.name && isIdentifier(node.name) && !isGeneratedIdentifier(node.name)) { + const name = getMutableClone(node.name); + emitFlags |= getEmitFlags(node.name); + if (!allowSourceMaps) emitFlags |= EmitFlags.NoSourceMap; + if (!allowComments) emitFlags |= EmitFlags.NoComments; + if (emitFlags) setEmitFlags(name, emitFlags); + return name; + } + return getGeneratedNameForNode(node); + } + + /** + * Gets the exported name of a declaration for use in expressions. + * + * An exported name will *always* be prefixed with an module or namespace export modifier like + * "exports." if the name points to an exported symbol. + * + * @param ns The namespace identifier. + * @param node The declaration. + * @param allowComments A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + */ + export function getExternalModuleOrNamespaceExportName(ns: Identifier | undefined, node: Declaration, allowComments?: boolean, allowSourceMaps?: boolean): Identifier | PropertyAccessExpression { + if (ns && hasModifier(node, ModifierFlags.Export)) { + return getNamespaceMemberName(ns, getName(node), allowComments, allowSourceMaps); + } + return getExportName(node, allowComments, allowSourceMaps); + } + + /** + * Gets a namespace-qualified name for use in expressions. + * + * @param ns The namespace identifier. + * @param name The name. + * @param allowComments A value indicating whether comments may be emitted for the name. + * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. + */ + export function getNamespaceMemberName(ns: Identifier, name: Identifier, allowComments?: boolean, allowSourceMaps?: boolean): PropertyAccessExpression { + const qualifiedName = createPropertyAccess(ns, nodeIsSynthesized(name) ? name : getSynthesizedClone(name), /*location*/ name); + let emitFlags: EmitFlags; + if (!allowSourceMaps) emitFlags |= EmitFlags.NoSourceMap; + if (!allowComments) emitFlags |= EmitFlags.NoComments; + if (emitFlags) setEmitFlags(qualifiedName, emitFlags); + return qualifiedName; + } + // Utilities function isUseStrictPrologue(node: ExpressionStatement): boolean { @@ -2246,7 +2355,7 @@ namespace ts { /** * Ensures "use strict" directive is added - * + * * @param node source file */ export function ensureUseStrict(node: SourceFile): SourceFile { diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index 3fa54f127e1..9e159a356c7 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -2,39 +2,86 @@ /// namespace ts { - - /* @internal */ - export function trace(host: ModuleResolutionHost, message: DiagnosticMessage, ...args: any[]): void; - export function trace(host: ModuleResolutionHost): void { + function trace(host: ModuleResolutionHost, message: DiagnosticMessage, ...args: any[]): void; + function trace(host: ModuleResolutionHost): void { host.trace(formatMessage.apply(undefined, arguments)); } - /* @internal */ - export function isTraceEnabled(compilerOptions: CompilerOptions, host: ModuleResolutionHost): boolean { + function isTraceEnabled(compilerOptions: CompilerOptions, host: ModuleResolutionHost): boolean { return compilerOptions.traceResolution && host.trace !== undefined; } - /* @internal */ - export function createResolvedModule(resolvedFileName: string, isExternalLibraryImport: boolean, failedLookupLocations: string[]): ResolvedModuleWithFailedLookupLocations { - return { resolvedModule: resolvedFileName ? { resolvedFileName, isExternalLibraryImport } : undefined, failedLookupLocations }; + /** + * Result of trying to resolve a module. + * At least one of `ts` and `js` should be defined, or the whole thing should be `undefined`. + */ + interface Resolved { + path: string; + extension: Extension; + } + + /** + * Kinds of file that we are currently looking for. + * Typically there is one pass with Extensions.TypeScript, then a second pass with Extensions.JavaScript. + */ + const enum Extensions { + TypeScript, /** '.ts', '.tsx', or '.d.ts' */ + JavaScript, /** '.js' or '.jsx' */ + DtsOnly /** Only '.d.ts' */ + } + + /** Used with `Extensions.DtsOnly` to extract the path from TypeScript results. */ + function resolvedTypeScriptOnly(resolved: Resolved | undefined): string | undefined { + if (!resolved) { + return undefined; + } + Debug.assert(extensionIsTypeScript(resolved.extension)); + return resolved.path; + } + + /** Create Resolved from a file with unknown extension. */ + function resolvedFromAnyFile(path: string): Resolved | undefined { + return { path, extension: extensionFromPath(path) }; + } + + /** Adds `isExernalLibraryImport` to a Resolved to get a ResolvedModule. */ + function resolvedModuleFromResolved({ path, extension }: Resolved, isExternalLibraryImport: boolean): ResolvedModuleFull { + return { resolvedFileName: path, extension, isExternalLibraryImport }; + } + + function createResolvedModuleWithFailedLookupLocations(resolved: Resolved | undefined, isExternalLibraryImport: boolean, failedLookupLocations: string[]): ResolvedModuleWithFailedLookupLocations { + return { resolvedModule: resolved && resolvedModuleFromResolved(resolved, isExternalLibraryImport), failedLookupLocations }; } function moduleHasNonRelativeName(moduleName: string): boolean { return !(isRootedDiskPath(moduleName) || isExternalModuleNameRelative(moduleName)); } - /* @internal */ - export interface ModuleResolutionState { + interface ModuleResolutionState { host: ModuleResolutionHost; - compilerOptions: CompilerOptions; + // We only use this subset of the compiler options. + compilerOptions: { rootDirs?: string[], baseUrl?: string, paths?: MapLike }; traceEnabled: boolean; - // skip .tsx files if jsx is not enabled - skipTsx: boolean; } - function tryReadTypesSection(packageJsonPath: string, baseDirectory: string, state: ModuleResolutionState): string { + function tryReadTypesSection(extensions: Extensions, packageJsonPath: string, baseDirectory: string, state: ModuleResolutionState): string { const jsonContent = readJson(packageJsonPath, state.host); + switch (extensions) { + case Extensions.DtsOnly: + case Extensions.TypeScript: + return tryReadFromField("typings") || tryReadFromField("types"); + + case Extensions.JavaScript: + if (typeof jsonContent.main === "string") { + if (state.traceEnabled) { + trace(state.host, Diagnostics.No_types_specified_in_package_json_so_returning_main_value_of_0, jsonContent.main); + } + return normalizePath(combinePaths(baseDirectory, jsonContent.main)); + } + return undefined; + } + function tryReadFromField(fieldName: string) { if (hasProperty(jsonContent, fieldName)) { const typesFile = (jsonContent)[fieldName]; @@ -52,21 +99,6 @@ namespace ts { } } } - - const typesFilePath = tryReadFromField("typings") || tryReadFromField("types"); - if (typesFilePath) { - return typesFilePath; - } - - // Use the main module for inferring types if no types package specified and the allowJs is set - if (state.compilerOptions.allowJs && jsonContent.main && typeof jsonContent.main === "string") { - if (state.traceEnabled) { - trace(state.host, Diagnostics.No_types_specified_in_package_json_but_allowJs_is_set_so_returning_main_value_of_0, jsonContent.main); - } - const mainFilePath = normalizePath(combinePaths(baseDirectory, jsonContent.main)); - return mainFilePath; - } - return undefined; } function readJson(path: string, host: ModuleResolutionHost): { typings?: string, types?: string, main?: string } { @@ -80,8 +112,6 @@ namespace ts { } } - const typeReferenceExtensions = [".d.ts"]; - export function getEffectiveTypeRoots(options: CompilerOptions, host: { directoryExists?: (directoryName: string) => boolean, getCurrentDirectory?: () => string }): string[] | undefined { if (options.typeRoots) { return options.typeRoots; @@ -132,12 +162,11 @@ namespace ts { * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups * is assumed to be the same as root directory of the project. */ - export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string, options: CompilerOptions, host: ModuleResolutionHost): ResolvedTypeReferenceDirectiveWithFailedLookupLocations { + export function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost): ResolvedTypeReferenceDirectiveWithFailedLookupLocations { const traceEnabled = isTraceEnabled(options, host); const moduleResolutionState: ModuleResolutionState = { compilerOptions: options, host: host, - skipTsx: true, traceEnabled }; @@ -168,19 +197,20 @@ namespace ts { if (traceEnabled) { trace(host, Diagnostics.Resolving_with_primary_search_path_0, typeRoots.join(", ")); } - const primarySearchPaths = typeRoots; - for (const typeRoot of primarySearchPaths) { + for (const typeRoot of typeRoots) { const candidate = combinePaths(typeRoot, typeReferenceDirectiveName); const candidateDirectory = getDirectoryPath(candidate); - const resolvedFile = loadNodeModuleFromDirectory(typeReferenceExtensions, candidate, failedLookupLocations, - !directoryProbablyExists(candidateDirectory, host), moduleResolutionState); - if (resolvedFile) { + const resolved = resolvedTypeScriptOnly( + loadNodeModuleFromDirectory(Extensions.DtsOnly, candidate, failedLookupLocations, + !directoryProbablyExists(candidateDirectory, host), moduleResolutionState)); + + if (resolved) { if (traceEnabled) { - trace(host, Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2, typeReferenceDirectiveName, resolvedFile, true); + trace(host, Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2, typeReferenceDirectiveName, resolved, true); } return { - resolvedTypeReferenceDirective: { primary: true, resolvedFileName: resolvedFile }, + resolvedTypeReferenceDirective: { primary: true, resolvedFileName: resolved }, failedLookupLocations }; } @@ -193,17 +223,14 @@ namespace ts { } let resolvedFile: string; - let initialLocationForSecondaryLookup: string; - if (containingFile) { - initialLocationForSecondaryLookup = getDirectoryPath(containingFile); - } + const initialLocationForSecondaryLookup = containingFile && getDirectoryPath(containingFile); if (initialLocationForSecondaryLookup !== undefined) { // check secondary locations if (traceEnabled) { trace(host, Diagnostics.Looking_up_in_node_modules_folder_initial_location_0, initialLocationForSecondaryLookup); } - resolvedFile = loadModuleFromNodeModules(typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState, /*checkOneLevel*/ false); + resolvedFile = resolvedTypeScriptOnly(loadModuleFromNodeModules(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, failedLookupLocations, moduleResolutionState, /*checkOneLevel*/ false)); if (traceEnabled) { if (resolvedFile) { trace(host, Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2, typeReferenceDirectiveName, resolvedFile, false); @@ -219,9 +246,7 @@ namespace ts { } } return { - resolvedTypeReferenceDirective: resolvedFile - ? { primary: false, resolvedFileName: resolvedFile } - : undefined, + resolvedTypeReferenceDirective: resolvedFile ? { primary: false, resolvedFileName: resolvedFile } : undefined, failedLookupLocations }; } @@ -313,7 +338,7 @@ namespace ts { * 'typings' entry or file 'index' with some supported extension * - Classic loader will only try to interpret '/a/b/c' as file. */ - type ResolutionKindSpecificLoader = (candidate: string, extensions: string[], failedLookupLocations: string[], onlyRecordFailures: boolean, state: ModuleResolutionState) => string; + type ResolutionKindSpecificLoader = (extensions: Extensions, candidate: string, failedLookupLocations: string[], onlyRecordFailures: boolean, state: ModuleResolutionState) => Resolved | undefined; /** * Any module resolution kind can be augmented with optional settings: 'baseUrl', 'paths' and 'rootDirs' - they are used to @@ -375,19 +400,19 @@ namespace ts { * be converted to a path relative to found rootDir entry './content/protocols/file2' (*). As a last step compiler will check all remaining * entries in 'rootDirs', use them to build absolute path out of (*) and try to resolve module from this location. */ - function tryLoadModuleUsingOptionalResolutionSettings(moduleName: string, containingDirectory: string, loader: ResolutionKindSpecificLoader, - failedLookupLocations: string[], supportedExtensions: string[], state: ModuleResolutionState): string { + function tryLoadModuleUsingOptionalResolutionSettings(extensions: Extensions, moduleName: string, containingDirectory: string, loader: ResolutionKindSpecificLoader, + failedLookupLocations: string[], state: ModuleResolutionState): Resolved | undefined { if (moduleHasNonRelativeName(moduleName)) { - return tryLoadModuleUsingBaseUrl(moduleName, loader, failedLookupLocations, supportedExtensions, state); + return tryLoadModuleUsingBaseUrl(extensions, moduleName, loader, failedLookupLocations, state); } else { - return tryLoadModuleUsingRootDirs(moduleName, containingDirectory, loader, failedLookupLocations, supportedExtensions, state); + return tryLoadModuleUsingRootDirs(extensions, moduleName, containingDirectory, loader, failedLookupLocations, state); } } - function tryLoadModuleUsingRootDirs(moduleName: string, containingDirectory: string, loader: ResolutionKindSpecificLoader, - failedLookupLocations: string[], supportedExtensions: string[], state: ModuleResolutionState): string { + function tryLoadModuleUsingRootDirs(extensions: Extensions, moduleName: string, containingDirectory: string, loader: ResolutionKindSpecificLoader, + failedLookupLocations: string[], state: ModuleResolutionState): Resolved | undefined { if (!state.compilerOptions.rootDirs) { return undefined; @@ -432,7 +457,7 @@ namespace ts { if (state.traceEnabled) { trace(state.host, Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2, suffix, matchedNormalizedPrefix, candidate); } - const resolvedFileName = loader(candidate, supportedExtensions, failedLookupLocations, !directoryProbablyExists(containingDirectory, state.host), state); + const resolvedFileName = loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(containingDirectory, state.host), state); if (resolvedFileName) { return resolvedFileName; } @@ -451,7 +476,7 @@ namespace ts { trace(state.host, Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2, suffix, rootDir, candidate); } const baseDirectory = getDirectoryPath(candidate); - const resolvedFileName = loader(candidate, supportedExtensions, failedLookupLocations, !directoryProbablyExists(baseDirectory, state.host), state); + const resolvedFileName = loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(baseDirectory, state.host), state); if (resolvedFileName) { return resolvedFileName; } @@ -463,9 +488,7 @@ namespace ts { return undefined; } - function tryLoadModuleUsingBaseUrl(moduleName: string, loader: ResolutionKindSpecificLoader, failedLookupLocations: string[], - supportedExtensions: string[], state: ModuleResolutionState): string { - + function tryLoadModuleUsingBaseUrl(extensions: Extensions, moduleName: string, loader: ResolutionKindSpecificLoader, failedLookupLocations: string[], state: ModuleResolutionState): Resolved | undefined { if (!state.compilerOptions.baseUrl) { return undefined; } @@ -494,9 +517,9 @@ namespace ts { if (state.traceEnabled) { trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path); } - const resolvedFileName = loader(candidate, supportedExtensions, failedLookupLocations, !directoryProbablyExists(getDirectoryPath(candidate), state.host), state); - if (resolvedFileName) { - return resolvedFileName; + const resolved = loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(getDirectoryPath(candidate), state.host), state); + if (resolved) { + return resolved; } } return undefined; @@ -508,56 +531,64 @@ namespace ts { trace(state.host, Diagnostics.Resolving_module_name_0_relative_to_base_url_1_2, moduleName, state.compilerOptions.baseUrl, candidate); } - return loader(candidate, supportedExtensions, failedLookupLocations, !directoryProbablyExists(getDirectoryPath(candidate), state.host), state); + return loader(extensions, candidate, failedLookupLocations, !directoryProbablyExists(getDirectoryPath(candidate), state.host), state); } } export function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { const containingDirectory = getDirectoryPath(containingFile); - const supportedExtensions = getSupportedExtensions(compilerOptions); const traceEnabled = isTraceEnabled(compilerOptions, host); const failedLookupLocations: string[] = []; - const state = { compilerOptions, host, traceEnabled, skipTsx: false }; - let resolvedFileName = tryLoadModuleUsingOptionalResolutionSettings(moduleName, containingDirectory, nodeLoadModuleByRelativeName, - failedLookupLocations, supportedExtensions, state); + const state: ModuleResolutionState = { compilerOptions, host, traceEnabled }; + + const result = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript); + if (result) { + const { resolved, isExternalLibraryImport } = result; + return createResolvedModuleWithFailedLookupLocations(resolved && resolvedWithRealpath(resolved, host, traceEnabled), isExternalLibraryImport, failedLookupLocations); + } + return { resolvedModule: undefined, failedLookupLocations }; + + function tryResolve(extensions: Extensions): { resolved: Resolved, isExternalLibraryImport: boolean } | undefined { + const resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, nodeLoadModuleByRelativeName, failedLookupLocations, state); + if (resolved) { + return { resolved, isExternalLibraryImport: false }; + } - let isExternalLibraryImport = false; - if (!resolvedFileName) { if (moduleHasNonRelativeName(moduleName)) { if (traceEnabled) { trace(host, Diagnostics.Loading_module_0_from_node_modules_folder, moduleName); } - resolvedFileName = loadModuleFromNodeModules(moduleName, containingDirectory, failedLookupLocations, state, /*checkOneLevel*/ false); - isExternalLibraryImport = resolvedFileName !== undefined; + const resolved = loadModuleFromNodeModules(extensions, moduleName, containingDirectory, failedLookupLocations, state, /*checkOneLevel*/ false); + return resolved && { resolved, isExternalLibraryImport: true }; } else { const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); - resolvedFileName = nodeLoadModuleByRelativeName(candidate, supportedExtensions, failedLookupLocations, /*onlyRecordFailures*/ false, state); + const resolved = nodeLoadModuleByRelativeName(extensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state); + return resolved && { resolved, isExternalLibraryImport: false }; } } - - if (resolvedFileName && host.realpath) { - const originalFileName = resolvedFileName; - resolvedFileName = normalizePath(host.realpath(resolvedFileName)); - if (traceEnabled) { - trace(host, Diagnostics.Resolving_real_path_for_0_result_1, originalFileName, resolvedFileName); - } - } - - return createResolvedModule(resolvedFileName, isExternalLibraryImport, failedLookupLocations); } - function nodeLoadModuleByRelativeName(candidate: string, supportedExtensions: string[], failedLookupLocations: string[], - onlyRecordFailures: boolean, state: ModuleResolutionState): string { + function resolvedWithRealpath(resolved: Resolved, host: ModuleResolutionHost, traceEnabled: boolean): Resolved { + if (!host.realpath) { + return resolved; + } + const real = normalizePath(host.realpath(resolved.path)); + if (traceEnabled) { + trace(host, Diagnostics.Resolving_real_path_for_0_result_1, resolved.path, real); + } + return { path: real, extension: resolved.extension }; + } + + function nodeLoadModuleByRelativeName(extensions: Extensions, candidate: string, failedLookupLocations: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): Resolved | undefined { if (state.traceEnabled) { trace(state.host, Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0, candidate); } - const resolvedFileName = !pathEndsWithDirectorySeparator(candidate) && loadModuleFromFile(candidate, supportedExtensions, failedLookupLocations, onlyRecordFailures, state); - - return resolvedFileName || loadNodeModuleFromDirectory(supportedExtensions, candidate, failedLookupLocations, onlyRecordFailures, state); + const resolvedFromFile = !pathEndsWithDirectorySeparator(candidate) && loadModuleFromFile(extensions, candidate, failedLookupLocations, onlyRecordFailures, state); + return resolvedFromFile || loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, onlyRecordFailures, state); } /* @internal */ @@ -570,9 +601,9 @@ namespace ts { * @param {boolean} onlyRecordFailures - if true then function won't try to actually load files but instead record all attempts as failures. This flag is necessary * in cases when we know upfront that all load attempts will fail (because containing folder does not exists) however we still need to record all failed lookup locations. */ - function loadModuleFromFile(candidate: string, extensions: string[], failedLookupLocation: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): string | undefined { + function loadModuleFromFile(extensions: Extensions, candidate: string, failedLookupLocations: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): Resolved | undefined { // First, try adding an extension. An import of "foo" could be matched by a file "foo.ts", or "foo.js" by "foo.js.ts" - const resolvedByAddingExtension = tryAddingExtensions(candidate, extensions, failedLookupLocation, onlyRecordFailures, state); + const resolvedByAddingExtension = tryAddingExtensions(candidate, extensions, failedLookupLocations, onlyRecordFailures, state); if (resolvedByAddingExtension) { return resolvedByAddingExtension; } @@ -585,12 +616,12 @@ namespace ts { const extension = candidate.substring(extensionless.length); trace(state.host, Diagnostics.File_name_0_has_a_1_extension_stripping_it, candidate, extension); } - return tryAddingExtensions(extensionless, extensions, failedLookupLocation, onlyRecordFailures, state); + return tryAddingExtensions(extensionless, extensions, failedLookupLocations, onlyRecordFailures, state); } } /** Try to return an existing file that adds one of the `extensions` to `candidate`. */ - function tryAddingExtensions(candidate: string, extensions: string[], failedLookupLocation: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): string | undefined { + function tryAddingExtensions(candidate: string, extensions: Extensions, failedLookupLocations: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): Resolved | undefined { if (!onlyRecordFailures) { // check if containing folder exists - if it doesn't then just record failures for all supported extensions without disk probing const directory = getDirectoryPath(candidate); @@ -598,8 +629,20 @@ namespace ts { onlyRecordFailures = !directoryProbablyExists(directory, state.host); } } - return forEach(extensions, ext => - !(state.skipTsx && isJsxOrTsxExtension(ext)) && tryFile(candidate + ext, failedLookupLocation, onlyRecordFailures, state)); + + switch (extensions) { + case Extensions.DtsOnly: + return tryExtension(".d.ts", Extension.Dts); + case Extensions.TypeScript: + return tryExtension(".ts", Extension.Ts) || tryExtension(".tsx", Extension.Tsx) || tryExtension(".d.ts", Extension.Dts); + case Extensions.JavaScript: + return tryExtension(".js", Extension.Js) || tryExtension(".jsx", Extension.Jsx); + } + + function tryExtension(ext: string, extension: Extension): Resolved | undefined { + const path = tryFile(candidate + ext, failedLookupLocations, onlyRecordFailures, state); + return path && { path, extension }; + } } /** Return the file if it exists. */ @@ -619,26 +662,31 @@ namespace ts { } } - function loadNodeModuleFromDirectory(extensions: string[], candidate: string, failedLookupLocation: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): string { + function loadNodeModuleFromDirectory(extensions: Extensions, candidate: string, failedLookupLocation: string[], onlyRecordFailures: boolean, state: ModuleResolutionState): Resolved | undefined { const packageJsonPath = pathToPackageJson(candidate); const directoryExists = !onlyRecordFailures && directoryProbablyExists(candidate, state.host); + if (directoryExists && state.host.fileExists(packageJsonPath)) { if (state.traceEnabled) { trace(state.host, Diagnostics.Found_package_json_at_0, packageJsonPath); } - const typesFile = tryReadTypesSection(packageJsonPath, candidate, state); + const typesFile = tryReadTypesSection(extensions, packageJsonPath, candidate, state); if (typesFile) { const onlyRecordFailures = !directoryProbablyExists(getDirectoryPath(typesFile), state.host); // A package.json "typings" may specify an exact filename, or may choose to omit an extension. - const result = tryFile(typesFile, failedLookupLocation, onlyRecordFailures, state) || - tryAddingExtensions(typesFile, extensions, failedLookupLocation, onlyRecordFailures, state); - if (result) { - return result; + const fromFile = tryFile(typesFile, failedLookupLocation, onlyRecordFailures, state); + if (fromFile) { + // Note: this would allow a package.json to specify a ".js" file as typings. Maybe that should be forbidden. + return resolvedFromAnyFile(fromFile); + } + const x = tryAddingExtensions(typesFile, Extensions.TypeScript, failedLookupLocation, onlyRecordFailures, state); + if (x) { + return x; } } else { if (state.traceEnabled) { - trace(state.host, Diagnostics.package_json_does_not_have_types_field); + trace(state.host, Diagnostics.package_json_does_not_have_a_types_or_main_field); } } } @@ -650,104 +698,90 @@ namespace ts { failedLookupLocation.push(packageJsonPath); } - return loadModuleFromFile(combinePaths(candidate, "index"), extensions, failedLookupLocation, !directoryExists, state); + return loadModuleFromFile(extensions, combinePaths(candidate, "index"), failedLookupLocation, !directoryExists, state); } function pathToPackageJson(directory: string): string { return combinePaths(directory, "package.json"); } - function loadModuleFromNodeModulesFolder(moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState): string { + function loadModuleFromNodeModulesFolder(extensions: Extensions, moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState): Resolved | undefined { const nodeModulesFolder = combinePaths(directory, "node_modules"); const nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host); const candidate = normalizePath(combinePaths(nodeModulesFolder, moduleName)); - const supportedExtensions = getSupportedExtensions(state.compilerOptions); - let result = loadModuleFromFile(candidate, supportedExtensions, failedLookupLocations, !nodeModulesFolderExists, state); - if (result) { - return result; - } - result = loadNodeModuleFromDirectory(supportedExtensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state); - if (result) { - return result; - } + return loadModuleFromFile(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state) || + loadNodeModuleFromDirectory(extensions, candidate, failedLookupLocations, !nodeModulesFolderExists, state); } - /* @internal */ - export function loadModuleFromNodeModules(moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState, checkOneLevel: boolean): string { - return loadModuleFromNodeModulesWorker(moduleName, directory, failedLookupLocations, state, checkOneLevel, /*typesOnly*/ false); + function loadModuleFromNodeModules(extensions: Extensions, moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState, checkOneLevel: boolean): Resolved | undefined { + return loadModuleFromNodeModulesWorker(extensions, moduleName, directory, failedLookupLocations, state, checkOneLevel, /*typesOnly*/ false); + } + function loadModuleFromNodeModulesAtTypes(moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState): Resolved | undefined { + return loadModuleFromNodeModulesWorker(Extensions.TypeScript, moduleName, directory, failedLookupLocations, state, /*checkOneLevel*/ false, /*typesOnly*/ true); } - function loadModuleFromNodeModulesAtTypes(moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState): string { - return loadModuleFromNodeModulesWorker(moduleName, directory, failedLookupLocations, state, /*checkOneLevel*/ false, /*typesOnly*/ true); - } - - function loadModuleFromNodeModulesWorker(moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState, checkOneLevel: boolean, typesOnly: boolean): string { + function loadModuleFromNodeModulesWorker(extensions: Extensions, moduleName: string, directory: string, failedLookupLocations: string[], state: ModuleResolutionState, checkOneLevel: boolean, typesOnly: boolean): Resolved | undefined { directory = normalizeSlashes(directory); while (true) { - const baseName = getBaseFileName(directory); - if (baseName !== "node_modules") { - let packageResult: string | undefined; - if (!typesOnly) { - // Try to load source from the package - packageResult = loadModuleFromNodeModulesFolder(moduleName, directory, failedLookupLocations, state); - if (packageResult && hasTypeScriptFileExtension(packageResult)) { - // Always prefer a TypeScript (.ts, .tsx, .d.ts) file shipped with the package - return packageResult; - } - } - - // Else prefer a types package over non-TypeScript results (e.g. JavaScript files) - const typesResult = loadModuleFromNodeModulesFolder(combinePaths("@types", moduleName), directory, failedLookupLocations, state); - if (typesResult || packageResult) { - return typesResult || packageResult; + if (getBaseFileName(directory) !== "node_modules") { + const resolved = tryInDirectory(); + if (resolved) { + return resolved; } } const parentPath = getDirectoryPath(directory); if (parentPath === directory || checkOneLevel) { - break; + return undefined; } directory = parentPath; } - return undefined; + + function tryInDirectory(): Resolved | undefined { + const packageResult = typesOnly ? undefined : loadModuleFromNodeModulesFolder(extensions, moduleName, directory, failedLookupLocations, state); + return packageResult || loadModuleFromNodeModulesFolder(extensions, combinePaths("@types", moduleName), directory, failedLookupLocations, state); + } } export function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations { const traceEnabled = isTraceEnabled(compilerOptions, host); - const state = { compilerOptions, host, traceEnabled, skipTsx: !compilerOptions.jsx }; + const state: ModuleResolutionState = { compilerOptions, host, traceEnabled }; const failedLookupLocations: string[] = []; - const supportedExtensions = getSupportedExtensions(compilerOptions); const containingDirectory = getDirectoryPath(containingFile); - const resolvedFileName = tryLoadModuleUsingOptionalResolutionSettings(moduleName, containingDirectory, loadModuleFromFile, failedLookupLocations, supportedExtensions, state); - if (resolvedFileName) { - return createResolvedModule(resolvedFileName, /*isExternalLibraryImport*/false, failedLookupLocations); - } + const resolved = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript); + return createResolvedModuleWithFailedLookupLocations(resolved, /*isExternalLibraryImport*/ false, failedLookupLocations); - let referencedSourceFile: string; - if (moduleHasNonRelativeName(moduleName)) { - referencedSourceFile = referencedSourceFile = loadModuleFromAncestorDirectories(moduleName, containingDirectory, supportedExtensions, failedLookupLocations, state) || - // If we didn't find the file normally, look it up in @types. - loadModuleFromNodeModulesAtTypes(moduleName, containingDirectory, failedLookupLocations, state); - } - else { - const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); - referencedSourceFile = loadModuleFromFile(candidate, supportedExtensions, failedLookupLocations, /*onlyRecordFailures*/ false, state); - } + function tryResolve(extensions: Extensions): Resolved | undefined { + const resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFile, failedLookupLocations, state); + if (resolvedUsingSettings) { + return resolvedUsingSettings; + } - - return referencedSourceFile - ? { resolvedModule: { resolvedFileName: referencedSourceFile }, failedLookupLocations } - : { resolvedModule: undefined, failedLookupLocations }; + if (moduleHasNonRelativeName(moduleName)) { + const resolved = loadModuleFromAncestorDirectories(extensions, moduleName, containingDirectory, failedLookupLocations, state); + if (resolved) { + return resolved; + } + if (extensions === Extensions.TypeScript) { + // If we didn't find the file normally, look it up in @types. + return loadModuleFromNodeModulesAtTypes(moduleName, containingDirectory, failedLookupLocations, state); + } + } + else { + const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); + return loadModuleFromFile(extensions, candidate, failedLookupLocations, /*onlyRecordFailures*/ false, state); + } + } } /** Climb up parent directories looking for a module. */ - function loadModuleFromAncestorDirectories(moduleName: string, containingDirectory: string, supportedExtensions: string[], failedLookupLocations: string[], state: ModuleResolutionState): string | undefined { + function loadModuleFromAncestorDirectories(extensions: Extensions, moduleName: string, containingDirectory: string, failedLookupLocations: string[], state: ModuleResolutionState): Resolved | undefined { while (true) { const searchName = normalizePath(combinePaths(containingDirectory, moduleName)); - const referencedSourceFile = loadModuleFromFile(searchName, supportedExtensions, failedLookupLocations, /*onlyRecordFailures*/ false, state); + const referencedSourceFile = loadModuleFromFile(extensions, searchName, failedLookupLocations, /*onlyRecordFailures*/ false, state); if (referencedSourceFile) { return referencedSourceFile; } @@ -758,4 +792,21 @@ namespace ts { containingDirectory = parentPath; } } + + /** + * LSHost may load a module from a global cache of typings. + * This is the minumum code needed to expose that functionality; the rest is in LSHost. + */ + /* @internal */ + export function loadModuleFromGlobalCache(moduleName: string, projectName: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, globalCache: string): ResolvedModuleWithFailedLookupLocations { + const traceEnabled = isTraceEnabled(compilerOptions, host); + if (traceEnabled) { + trace(host, Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, projectName, moduleName, globalCache); + } + const state: ModuleResolutionState = { compilerOptions, host, traceEnabled }; + const failedLookupLocations: string[] = []; + const resolved = loadModuleFromNodeModules(Extensions.TypeScript, moduleName, globalCache, failedLookupLocations, state, /*checkOneLevel*/ true) || + loadModuleFromNodeModules(Extensions.JavaScript, moduleName, globalCache, failedLookupLocations, state, /*checkOneLevel*/ true); + return createResolvedModuleWithFailedLookupLocations(resolved, /*isExternalLibraryImport*/ true, failedLookupLocations); + } } \ No newline at end of file diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 7b09327c1b8..92a3dcbef11 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -415,6 +415,7 @@ namespace ts { return visitNodes(cbNodes, (node).typeParameters); case SyntaxKind.JSDocTypedefTag: return visitNode(cbNode, (node).typeExpression) || + visitNode(cbNode, (node).fullName) || visitNode(cbNode, (node).name) || visitNode(cbNode, (node).jsDocTypeLiteral); case SyntaxKind.JSDocTypeLiteral: @@ -5501,7 +5502,7 @@ namespace ts { exportDeclaration.name = parseIdentifier(); - parseExpected(SyntaxKind.SemicolonToken); + parseSemicolon(); return finishNode(exportDeclaration); } @@ -6581,7 +6582,14 @@ namespace ts { const typedefTag = createNode(SyntaxKind.JSDocTypedefTag, atToken.pos); typedefTag.atToken = atToken; typedefTag.tagName = tagName; - typedefTag.name = parseJSDocIdentifierName(); + typedefTag.fullName = parseJSDocTypeNameWithNamespace(/*flags*/ 0); + if (typedefTag.fullName) { + let rightNode = typedefTag.fullName; + while (rightNode.kind !== SyntaxKind.Identifier) { + rightNode = rightNode.body; + } + typedefTag.name = rightNode; + } typedefTag.typeExpression = typeExpression; skipWhitespace(); @@ -6644,8 +6652,27 @@ namespace ts { scanner.setTextPos(resumePos); return finishNode(jsDocTypeLiteral); } + + function parseJSDocTypeNameWithNamespace(flags: NodeFlags) { + const pos = scanner.getTokenPos(); + const typeNameOrNamespaceName = parseJSDocIdentifierName(); + + if (typeNameOrNamespaceName && parseOptional(SyntaxKind.DotToken)) { + const jsDocNamespaceNode = createNode(SyntaxKind.ModuleDeclaration, pos); + jsDocNamespaceNode.flags |= flags; + jsDocNamespaceNode.name = typeNameOrNamespaceName; + jsDocNamespaceNode.body = parseJSDocTypeNameWithNamespace(NodeFlags.NestedNamespace); + return jsDocNamespaceNode; + } + + if (typeNameOrNamespaceName && flags & NodeFlags.NestedNamespace) { + typeNameOrNamespaceName.isInJSDocNamespace = true; + } + return typeNameOrNamespaceName; + } } + function tryParseChildTag(parentTag: JSDocTypeLiteral): boolean { Debug.assert(token() === SyntaxKind.AtToken); const atToken = createNode(SyntaxKind.AtToken, scanner.getStartPos()); @@ -6668,12 +6695,16 @@ namespace ts { return true; case "prop": case "property": - if (!parentTag.jsDocPropertyTags) { - parentTag.jsDocPropertyTags = >[]; - } const propertyTag = parsePropertyTag(atToken, tagName); - parentTag.jsDocPropertyTags.push(propertyTag); - return true; + if (propertyTag) { + if (!parentTag.jsDocPropertyTags) { + parentTag.jsDocPropertyTags = >[]; + } + parentTag.jsDocPropertyTags.push(propertyTag); + return true; + } + // Error parsing property tag + return false; } return false; } diff --git a/src/compiler/program.ts b/src/compiler/program.ts index a9c64f3ecbe..726df380e81 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -307,7 +307,7 @@ namespace ts { // - This calls resolveModuleNames, and then calls findSourceFile for each resolved module. // As all these operations happen - and are nested - within the createProgram call, they close over the below variables. // The current resolution depth is tracked by incrementing/decrementing as the depth first search progresses. - const maxNodeModulesJsDepth = typeof options.maxNodeModuleJsDepth === "number" ? options.maxNodeModuleJsDepth : 0; + const maxNodeModuleJsDepth = typeof options.maxNodeModuleJsDepth === "number" ? options.maxNodeModuleJsDepth : 0; let currentNodeModulesDepth = 0; // If a module has some of its imports skipped due to being at the depth limit under node_modules, then track @@ -329,9 +329,17 @@ namespace ts { // Map storing if there is emit blocking diagnostics for given input const hasEmitBlockingDiagnostics = createFileMap(getCanonicalFileName); - let resolveModuleNamesWorker: (moduleNames: string[], containingFile: string) => ResolvedModule[]; + let resolveModuleNamesWorker: (moduleNames: string[], containingFile: string) => ResolvedModuleFull[]; if (host.resolveModuleNames) { - resolveModuleNamesWorker = (moduleNames, containingFile) => host.resolveModuleNames(moduleNames, containingFile); + resolveModuleNamesWorker = (moduleNames, containingFile) => host.resolveModuleNames(moduleNames, containingFile).map(resolved => { + // An older host may have omitted extension, in which case we should infer it from the file extension of resolvedFileName. + if (!resolved || (resolved as ResolvedModuleFull).extension !== undefined) { + return resolved as ResolvedModuleFull; + } + const withExtension = clone(resolved) as ResolvedModuleFull; + withExtension.extension = extensionFromPath(resolved.resolvedFileName); + return withExtension; + }); } else { const loader = (moduleName: string, containingFile: string) => resolveModuleName(moduleName, containingFile, options, host).resolvedModule; @@ -462,21 +470,7 @@ namespace ts { // check properties that can affect structure of the program or module resolution strategy // if any of these properties has changed - structure cannot be reused const oldOptions = oldProgram.getCompilerOptions(); - if ((oldOptions.module !== options.module) || - (oldOptions.moduleResolution !== options.moduleResolution) || - (oldOptions.noResolve !== options.noResolve) || - (oldOptions.target !== options.target) || - (oldOptions.noLib !== options.noLib) || - (oldOptions.jsx !== options.jsx) || - (oldOptions.allowJs !== options.allowJs) || - (oldOptions.rootDir !== options.rootDir) || - (oldOptions.configFilePath !== options.configFilePath) || - (oldOptions.baseUrl !== options.baseUrl) || - (oldOptions.maxNodeModuleJsDepth !== options.maxNodeModuleJsDepth) || - !arrayIsEqualTo(oldOptions.lib, options.lib) || - !arrayIsEqualTo(oldOptions.typeRoots, options.typeRoots) || - !arrayIsEqualTo(oldOptions.rootDirs, options.rootDirs) || - !equalOwnProperties(oldOptions.paths, options.paths)) { + if (changesAffectModuleResolution(oldOptions, options)) { return false; } @@ -725,6 +719,14 @@ namespace ts { } function getSyntacticDiagnosticsForFile(sourceFile: SourceFile): Diagnostic[] { + // For JavaScript files, we report semantic errors for using TypeScript-only + // constructs from within a JavaScript file as syntactic errors. + if (isSourceFileJavaScript(sourceFile)) { + if (!sourceFile.additionalSyntacticDiagnostics) { + sourceFile.additionalSyntacticDiagnostics = getJavaScriptSyntacticDiagnosticsForFile(sourceFile); + } + return concatenate(sourceFile.additionalSyntacticDiagnostics, sourceFile.parseDiagnostics); + } return sourceFile.parseDiagnostics; } @@ -757,12 +759,10 @@ namespace ts { Debug.assert(!!sourceFile.bindDiagnostics); const bindDiagnostics = sourceFile.bindDiagnostics; - // For JavaScript files, we don't want to report the normal typescript semantic errors. - // Instead, we just report errors for using TypeScript-only constructs from within a - // JavaScript file. - const checkDiagnostics = isSourceFileJavaScript(sourceFile) ? - getJavaScriptSemanticDiagnosticsForFile(sourceFile) : - typeChecker.getDiagnostics(sourceFile, cancellationToken); + // For JavaScript files, we don't want to report semantic errors. + // Instead, we'll report errors for using TypeScript-only constructs from within a + // JavaScript file when we get syntactic diagnostics for the file. + const checkDiagnostics = isSourceFileJavaScript(sourceFile) ? [] : typeChecker.getDiagnostics(sourceFile, cancellationToken); const fileProcessingDiagnosticsInFile = fileProcessingDiagnostics.getDiagnostics(sourceFile.fileName); const programDiagnosticsInFile = programDiagnostics.getDiagnostics(sourceFile.fileName); @@ -770,7 +770,7 @@ namespace ts { }); } - function getJavaScriptSemanticDiagnosticsForFile(sourceFile: SourceFile): Diagnostic[] { + function getJavaScriptSyntacticDiagnosticsForFile(sourceFile: SourceFile): Diagnostic[] { return runWithCancellationToken(() => { const diagnostics: Diagnostic[] = []; walk(sourceFile); @@ -971,10 +971,6 @@ namespace ts { return sortAndDeduplicateDiagnostics(allDiagnostics); } - function hasExtension(fileName: string): boolean { - return getBaseFileName(fileName).indexOf(".") >= 0; - } - function processRootFile(fileName: string, isDefaultLib: boolean) { processSourceFile(normalizePath(fileName), isDefaultLib); } @@ -1084,9 +1080,6 @@ namespace ts { } } - /** - * 'isReference' indicates whether the file was brought in via a reference directive (rather than an import declaration) - */ function processSourceFile(fileName: string, isDefaultLib: boolean, refFile?: SourceFile, refPos?: number, refEnd?: number) { let diagnosticArgument: string[]; let diagnostic: DiagnosticMessage; @@ -1163,7 +1156,7 @@ namespace ts { } // See if we need to reprocess the imports due to prior skipped imports else if (file && modulesWithElidedImports[file.path]) { - if (currentNodeModulesDepth < maxNodeModulesJsDepth) { + if (currentNodeModulesDepth < maxNodeModuleJsDepth) { modulesWithElidedImports[file.path] = false; processImportedModules(file); } @@ -1303,38 +1296,43 @@ namespace ts { function processImportedModules(file: SourceFile) { collectExternalModuleReferences(file); if (file.imports.length || file.moduleAugmentations.length) { - file.resolvedModules = createMap(); + file.resolvedModules = createMap(); const moduleNames = map(concatenate(file.imports, file.moduleAugmentations), getTextOfLiteral); const resolutions = resolveModuleNamesWorker(moduleNames, getNormalizedAbsolutePath(file.fileName, currentDirectory)); + Debug.assert(resolutions.length === moduleNames.length); for (let i = 0; i < moduleNames.length; i++) { const resolution = resolutions[i]; setResolvedModule(file, moduleNames[i], resolution); + if (!resolution) { + continue; + } + + const isFromNodeModulesSearch = resolution.isExternalLibraryImport; + const isJsFileFromNodeModules = isFromNodeModulesSearch && !extensionIsTypeScript(resolution.extension); + const resolvedFileName = resolution.resolvedFileName; + + if (isFromNodeModulesSearch) { + currentNodeModulesDepth++; + } + // add file to program only if: // - resolution was successful // - noResolve is falsy // - module name comes from the list of imports // - it's not a top level JavaScript module that exceeded the search max - const isFromNodeModulesSearch = resolution && resolution.isExternalLibraryImport; - const isJsFileFromNodeModules = isFromNodeModulesSearch && hasJavaScriptFileExtension(resolution.resolvedFileName); - - if (isFromNodeModulesSearch) { - currentNodeModulesDepth++; - } - - const elideImport = isJsFileFromNodeModules && currentNodeModulesDepth > maxNodeModulesJsDepth; - const shouldAddFile = resolution && !options.noResolve && i < file.imports.length && !elideImport; + const elideImport = isJsFileFromNodeModules && currentNodeModulesDepth > maxNodeModuleJsDepth; + // Don't add the file if it has a bad extension (e.g. 'tsx' if we don't have '--allowJs') + // This may still end up being an untyped module -- the file won't be included but imports will be allowed. + const shouldAddFile = resolvedFileName && !getResolutionDiagnostic(options, resolution) && !options.noResolve && i < file.imports.length && !elideImport; if (elideImport) { modulesWithElidedImports[file.path] = true; } else if (shouldAddFile) { - findSourceFile(resolution.resolvedFileName, - toPath(resolution.resolvedFileName, currentDirectory, getCanonicalFileName), - /*isDefaultLib*/ false, - file, - skipTrivia(file.text, file.imports[i].pos), - file.imports[i].end); + const path = toPath(resolvedFileName, currentDirectory, getCanonicalFileName); + const pos = skipTrivia(file.text, file.imports[i].pos); + findSourceFile(resolvedFileName, path, /*isDefaultLib*/ false, file, pos, file.imports[i].end); } if (isFromNodeModulesSearch) { @@ -1346,7 +1344,6 @@ namespace ts { // no imports - drop cached module resolutions file.resolvedModules = undefined; } - return; } function computeCommonSourceDirectory(sourceFiles: SourceFile[]): string { @@ -1571,4 +1568,32 @@ namespace ts { programDiagnostics.add(createCompilerDiagnostic(message, emitFileName)); } } + + /* @internal */ + /** + * Returns a DiagnosticMessage if we won't include a resolved module due to its extension. + * The DiagnosticMessage's parameters are the imported module name, and the filename it resolved to. + * This returns a diagnostic even if the module will be an untyped module. + */ + export function getResolutionDiagnostic(options: CompilerOptions, { extension }: ResolvedModuleFull): DiagnosticMessage | undefined { + switch (extension) { + case Extension.Ts: + case Extension.Dts: + // These are always allowed. + return undefined; + case Extension.Tsx: + return needJsx(); + case Extension.Jsx: + return needJsx() || needAllowJs(); + case Extension.Js: + return needAllowJs(); + } + + function needJsx() { + return options.jsx ? undefined : Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set; + } + function needAllowJs() { + return options.allowJs ? undefined : Diagnostics.Module_0_was_resolved_to_1_but_allowJs_is_not_set; + } + } } diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index d0b051049de..82302e98e37 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -1800,6 +1800,9 @@ namespace ts { case CharacterCodes.comma: pos++; return token = SyntaxKind.CommaToken; + case CharacterCodes.dot: + pos++; + return token = SyntaxKind.DotToken; } if (isIdentifierStart(ch, ScriptTarget.Latest)) { diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index b27c8f6e79f..ee9c081e6eb 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -111,7 +111,6 @@ namespace ts { const transformers: Transformer[] = []; transformers.push(transformTypeScript); - transformers.push(moduleTransformerMap[moduleKind] || moduleTransformerMap[ModuleKind.None]); if (jsx === JsxEmit.React) { transformers.push(transformJsx); @@ -130,6 +129,10 @@ namespace ts { transformers.push(transformGenerators); } + transformers.push(moduleTransformerMap[moduleKind] || moduleTransformerMap[ModuleKind.None]); + + // The ES5 transformer is last so that it can substitute expressions like `exports.default` + // for ES3. if (languageVersion < ScriptTarget.ES5) { transformers.push(transformES5); } @@ -351,4 +354,4 @@ namespace ts { return statements; } } -} \ No newline at end of file +} diff --git a/src/compiler/transformers/destructuring.ts b/src/compiler/transformers/destructuring.ts index 3eaa1b764a9..ab5c4629e95 100644 --- a/src/compiler/transformers/destructuring.ts +++ b/src/compiler/transformers/destructuring.ts @@ -174,13 +174,14 @@ namespace ts { * * @param node The VariableDeclaration to flatten. * @param recordTempVariable A callback used to record new temporary variables. - * @param nameSubstitution An optional callback used to substitute binding names. + * @param createAssignmentCallback An optional callback used to create assignment expressions + * for non-temporary variables. * @param visitor An optional visitor to use to visit expressions. */ export function flattenVariableDestructuringToExpression( node: VariableDeclaration, recordTempVariable: (name: Identifier) => void, - nameSubstitution?: (name: Identifier) => Expression, + createAssignmentCallback?: (name: Identifier, value: Expression, location?: TextRange) => Expression, visitor?: (node: Node) => VisitResult) { const pendingAssignments: Expression[] = []; @@ -192,18 +193,20 @@ namespace ts { return expression; function emitAssignment(name: Identifier, value: Expression, location: TextRange, original: Node) { - const left = nameSubstitution && nameSubstitution(name) || name; - emitPendingAssignment(left, value, location, original); + const expression = createAssignmentCallback + ? createAssignmentCallback(name, value, location) + : createAssignment(name, value, location); + + emitPendingAssignment(expression, original); } function emitTempVariableAssignment(value: Expression, location: TextRange) { const name = createTempVariable(recordTempVariable); - emitPendingAssignment(name, value, location, /*original*/ undefined); + emitPendingAssignment(createAssignment(name, value, location), /*original*/ undefined); return name; } - function emitPendingAssignment(name: Expression, value: Expression, location: TextRange, original: Node) { - const expression = createAssignment(name, value, location); + function emitPendingAssignment(expression: Expression, original: Node) { expression.original = original; // NOTE: this completely disables source maps, but aligns with the behavior of @@ -211,7 +214,6 @@ namespace ts { setEmitFlags(expression, EmitFlags.NoNestedSourceMaps); pendingAssignments.push(expression); - return expression; } } diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 9972f339c16..25c15305c4a 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -186,6 +186,7 @@ namespace ts { let enclosingFunction: FunctionLikeDeclaration; let enclosingNonArrowFunction: FunctionLikeDeclaration; let enclosingNonAsyncFunctionBody: FunctionLikeDeclaration | ClassElement; + let isInConstructorWithCapturedSuper: boolean; /** * Used to track if we are emitting body of the converted loop @@ -231,14 +232,17 @@ namespace ts { const savedCurrentParent = currentParent; const savedCurrentNode = currentNode; const savedConvertedLoopState = convertedLoopState; + const savedIsInConstructorWithCapturedSuper = isInConstructorWithCapturedSuper; if (nodeStartsNewLexicalEnvironment(node)) { - // don't treat content of nodes that start new lexical environment as part of converted loop copy + // don't treat content of nodes that start new lexical environment as part of converted loop copy or constructor body + isInConstructorWithCapturedSuper = false; convertedLoopState = undefined; } onBeforeVisitNode(node); const visited = f(node); + isInConstructorWithCapturedSuper = savedIsInConstructorWithCapturedSuper; convertedLoopState = savedConvertedLoopState; enclosingFunction = savedEnclosingFunction; enclosingNonArrowFunction = savedEnclosingNonArrowFunction; @@ -251,6 +255,14 @@ namespace ts { return visited; } + function returnCapturedThis(node: Node): Node { + return setOriginalNode(createReturn(createIdentifier("_this")), node); + } + + function isReturnVoidStatementInConstructorWithCapturedSuper(node: Node): boolean { + return isInConstructorWithCapturedSuper && node.kind === SyntaxKind.ReturnStatement && !(node).expression; + } + function shouldCheckNode(node: Node): boolean { return (node.transformFlags & TransformFlags.ES2015) !== 0 || node.kind === SyntaxKind.LabeledStatement || @@ -258,10 +270,16 @@ namespace ts { } function visitorWorker(node: Node): VisitResult { - if (shouldCheckNode(node)) { + if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) { + return returnCapturedThis(node); + } + else if (shouldCheckNode(node)) { return visitJavaScript(node); } - else if (node.transformFlags & TransformFlags.ContainsES2015) { + else if (node.transformFlags & TransformFlags.ContainsES2015 || (isInConstructorWithCapturedSuper && !isExpression(node))) { + // we want to dive in this branch either if node has children with ES2015 specific syntax + // or we are inside constructor that captures result of the super call so all returns without expression should be + // rewritten. Note: we skip expressions since returns should never appear there return visitEachChild(node, visitor, context); } else { @@ -283,6 +301,7 @@ namespace ts { function visitNodesInConvertedLoop(node: Node): VisitResult { switch (node.kind) { case SyntaxKind.ReturnStatement: + node = isReturnVoidStatementInConstructorWithCapturedSuper(node) ? returnCapturedThis(node) : node; return visitReturnStatement(node); case SyntaxKind.VariableStatement: @@ -308,8 +327,8 @@ namespace ts { function visitJavaScript(node: Node): VisitResult { switch (node.kind) { - case SyntaxKind.ExportKeyword: - return node; + case SyntaxKind.StaticKeyword: + return undefined; // elide static keyword case SyntaxKind.ClassDeclaration: return visitClassDeclaration(node); @@ -362,6 +381,9 @@ namespace ts { case SyntaxKind.ObjectLiteralExpression: return visitObjectLiteralExpression(node); + case SyntaxKind.CatchClause: + return visitCatchClause(node); + case SyntaxKind.ShorthandPropertyAssignment: return visitShorthandPropertyAssignment(node); @@ -584,47 +606,39 @@ namespace ts { // return C; // }()); - const modifierFlags = getModifierFlags(node); - const isExported = modifierFlags & ModifierFlags.Export; - const isDefault = modifierFlags & ModifierFlags.Default; - - // Add an `export` modifier to the statement if needed (for `--target es5 --module es6`) - const modifiers = isExported && !isDefault - ? filter(node.modifiers, isExportModifier) - : undefined; - - const statement = createVariableStatement( - modifiers, - createVariableDeclarationList([ - createVariableDeclaration( - getDeclarationName(node, /*allowComments*/ true), - /*type*/ undefined, - transformClassLikeDeclarationToExpression(node) - ) - ]), - /*location*/ node + const variable = createVariableDeclaration( + getLocalName(node, /*allowComments*/ true), + /*type*/ undefined, + transformClassLikeDeclarationToExpression(node) ); + setOriginalNode(variable, node); + + const statements: Statement[] = []; + const statement = createVariableStatement(/*modifiers*/ undefined, createVariableDeclarationList([variable]), /*location*/ node); + setOriginalNode(statement, node); startOnNewLine(statement); + statements.push(statement); // Add an `export default` statement for default exports (for `--target es5 --module es6`) - if (isExported && isDefault) { - const statements: Statement[] = [statement]; - statements.push(createExportAssignment( - /*decorators*/ undefined, - /*modifiers*/ undefined, - /*isExportEquals*/ false, - getDeclarationName(node, /*allowComments*/ false) - )); - return statements; + if (hasModifier(node, ModifierFlags.Export)) { + const exportStatement = hasModifier(node, ModifierFlags.Default) + ? createExportDefault(getLocalName(node)) + : createExternalModuleExport(getLocalName(node)); + + setOriginalNode(exportStatement, statement); + statements.push(exportStatement); } - return statement; - } + const emitFlags = getEmitFlags(node); + if ((emitFlags & EmitFlags.HasEndOfDeclarationMarker) === 0) { + // Add a DeclarationMarker as a marker for the end of the declaration + statements.push(createEndOfDeclarationMarker(node)); + setEmitFlags(statement, emitFlags | EmitFlags.HasEndOfDeclarationMarker); + } - function isExportModifier(node: Modifier) { - return node.kind === SyntaxKind.ExportKeyword; + return singleOrMany(statements); } /** @@ -685,7 +699,7 @@ namespace ts { /*asteriskToken*/ undefined, /*name*/ undefined, /*typeParameters*/ undefined, - extendsClauseElement ? [createParameter("_super")] : [], + extendsClauseElement ? [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "_super")] : [], /*type*/ undefined, transformClassBody(node, extendsClauseElement) ); @@ -764,7 +778,7 @@ namespace ts { if (extendsClauseElement) { statements.push( createStatement( - createExtendsHelper(currentSourceFile.externalHelpersModuleName, getDeclarationName(node)), + createExtendsHelper(currentSourceFile.externalHelpersModuleName, getLocalName(node)), /*location*/ extendsClauseElement ) ); @@ -861,7 +875,10 @@ namespace ts { } if (constructor) { - const body = saveStateAndInvoke(constructor, constructor => visitNodes(constructor.body.statements, visitor, isStatement, /*start*/ statementOffset)); + const body = saveStateAndInvoke(constructor, constructor => { + isInConstructorWithCapturedSuper = superCaptureStatus === SuperCaptureResult.ReplaceSuperCapture; + return visitNodes(constructor.body.statements, visitor, isStatement, /*start*/ statementOffset); + }); addRange(statements, body); } @@ -1035,7 +1052,12 @@ namespace ts { // evaluated inside the function body. return setOriginalNode( createParameter( + /*decorators*/ undefined, + /*modifiers*/ undefined, + /*dotDotDotToken*/ undefined, getGeneratedNameForNode(node), + /*questionToken*/ undefined, + /*type*/ undefined, /*initializer*/ undefined, /*location*/ node ), @@ -1046,7 +1068,12 @@ namespace ts { // Initializers are elided return setOriginalNode( createParameter( + /*decorators*/ undefined, + /*modifiers*/ undefined, + /*dotDotDotToken*/ undefined, node.name, + /*questionToken*/ undefined, + /*type*/ undefined, /*initializer*/ undefined, /*location*/ node ), @@ -1690,7 +1717,7 @@ namespace ts { if (decl.initializer) { let assignment: Expression; if (isBindingPattern(decl.name)) { - assignment = flattenVariableDestructuringToExpression(decl, hoistVariableDeclaration, /*nameSubstitution*/ undefined, visitor); + assignment = flattenVariableDestructuringToExpression(decl, hoistVariableDeclaration, /*createAssignmentCallback*/ undefined, visitor); } else { assignment = createBinary(decl.name, SyntaxKind.EqualsToken, visitNode(decl.initializer, visitor, isExpression)); @@ -1973,13 +2000,16 @@ namespace ts { statements.push( createVariableStatement( /*modifiers*/ undefined, - createVariableDeclarationList([ - createVariableDeclaration( - firstOriginalDeclaration ? firstOriginalDeclaration.name : createTempVariable(/*recordTempVariable*/ undefined), - /*type*/ undefined, - createElementAccess(rhsReference, counter) - ) - ], /*location*/ moveRangePos(initializer, -1)), + setOriginalNode( + createVariableDeclarationList([ + createVariableDeclaration( + firstOriginalDeclaration ? firstOriginalDeclaration.name : createTempVariable(/*recordTempVariable*/ undefined), + /*type*/ undefined, + createElementAccess(rhsReference, counter) + ) + ], /*location*/ moveRangePos(initializer, -1)), + initializer + ), /*location*/ moveRangeEnd(initializer, -1) ) ); @@ -2041,10 +2071,13 @@ namespace ts { setEmitFlags(body, EmitFlags.NoSourceMap | EmitFlags.NoTokenSourceMaps); const forStatement = createFor( - createVariableDeclarationList([ - createVariableDeclaration(counter, /*type*/ undefined, createLiteral(0), /*location*/ moveRangePos(node.expression, -1)), - createVariableDeclaration(rhsReference, /*type*/ undefined, expression, /*location*/ node.expression) - ], /*location*/ node.expression), + setEmitFlags( + createVariableDeclarationList([ + createVariableDeclaration(counter, /*type*/ undefined, createLiteral(0), /*location*/ moveRangePos(node.expression, -1)), + createVariableDeclaration(rhsReference, /*type*/ undefined, expression, /*location*/ node.expression) + ], /*location*/ node.expression), + EmitFlags.NoHoisting + ), createLessThan( counter, createPropertyAccess(rhsReference, "length"), @@ -2236,25 +2269,28 @@ namespace ts { const convertedLoopVariable = createVariableStatement( /*modifiers*/ undefined, - createVariableDeclarationList( - [ - createVariableDeclaration( - functionName, - /*type*/ undefined, - setEmitFlags( - createFunctionExpression( - /*modifiers*/ undefined, - isAsyncBlockContainingAwait ? createToken(SyntaxKind.AsteriskToken) : undefined, - /*name*/ undefined, - /*typeParameters*/ undefined, - loopParameters, - /*type*/ undefined, - loopBody - ), - loopBodyFlags + setEmitFlags( + createVariableDeclarationList( + [ + createVariableDeclaration( + functionName, + /*type*/ undefined, + setEmitFlags( + createFunctionExpression( + /*modifiers*/ undefined, + isAsyncBlockContainingAwait ? createToken(SyntaxKind.AsteriskToken) : undefined, + /*name*/ undefined, + /*typeParameters*/ undefined, + loopParameters, + /*type*/ undefined, + loopBody + ), + loopBodyFlags + ) ) - ) - ] + ] + ), + EmitFlags.NoHoisting ) ); @@ -2505,7 +2541,7 @@ namespace ts { } } else { - loopParameters.push(createParameter(name)); + loopParameters.push(createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, name)); if (resolver.getNodeCheckFlags(decl) & NodeCheckFlags.NeedsLoopOutParameter) { const outParamName = createUniqueName("out_" + name.text); loopOutParameters.push({ originalName: name, outParamName }); @@ -2622,6 +2658,24 @@ namespace ts { return expression; } + function visitCatchClause(node: CatchClause): CatchClause { + Debug.assert(isBindingPattern(node.variableDeclaration.name)); + + const temp = createTempVariable(undefined); + const newVariableDeclaration = createVariableDeclaration(temp, undefined, undefined, node.variableDeclaration); + + const vars = flattenVariableDestructuring(node.variableDeclaration, temp, visitor); + const list = createVariableDeclarationList(vars, /*location*/node.variableDeclaration, /*flags*/node.variableDeclaration.flags); + const destructure = createVariableStatement(undefined, list); + + return updateCatchClause(node, newVariableDeclaration, addStatementToStartOfBlock(node.block, destructure)); + } + + function addStatementToStartOfBlock(block: Block, statement: Statement): Block { + const transformedStatements = visitNodes(block.statements, visitor, isStatement); + return updateBlock(block, [statement].concat(transformedStatements)); + } + /** * Visits a MethodDeclaration of an ObjectLiteralExpression and transforms it into a * PropertyAssignment. @@ -3080,9 +3134,8 @@ namespace ts { /** * Hooks node substitutions. * + * @param emitContext The context for the emitter. * @param node The node to substitute. - * @param isExpression A value indicating whether the node is to be used in an expression - * position. */ function onSubstituteNode(emitContext: EmitContext, node: Node) { node = previousOnSubstituteNode(emitContext, node); @@ -3182,45 +3235,6 @@ namespace ts { return node; } - /** - * Gets the local name for a declaration for use in expressions. - * - * A local name will *never* be prefixed with an module or namespace export modifier like - * "exports.". - * - * @param node The declaration. - * @param allowComments A value indicating whether comments may be emitted for the name. - * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. - */ - function getLocalName(node: ClassDeclaration | ClassExpression | FunctionDeclaration, allowComments?: boolean, allowSourceMaps?: boolean) { - return getDeclarationName(node, allowComments, allowSourceMaps, EmitFlags.LocalName); - } - - /** - * Gets the name of a declaration, without source map or comments. - * - * @param node The declaration. - * @param allowComments Allow comments for the name. - */ - function getDeclarationName(node: ClassDeclaration | ClassExpression | FunctionDeclaration, allowComments?: boolean, allowSourceMaps?: boolean, emitFlags?: EmitFlags) { - if (node.name && !isGeneratedIdentifier(node.name)) { - const name = getMutableClone(node.name); - emitFlags |= getEmitFlags(node.name); - if (!allowSourceMaps) { - emitFlags |= EmitFlags.NoSourceMap; - } - if (!allowComments) { - emitFlags |= EmitFlags.NoComments; - } - if (emitFlags) { - setEmitFlags(name, emitFlags); - } - return name; - } - - return getGeneratedNameForNode(node); - } - function getClassMemberPrefix(node: ClassExpression | ClassDeclaration, member: ClassElement) { const expression = getLocalName(node); return hasModifier(member, ModifierFlags.Static) ? expression : createPropertyAccess(expression, "prototype"); diff --git a/src/compiler/transformers/es2017.ts b/src/compiler/transformers/es2017.ts index 7800a41e147..548609d676c 100644 --- a/src/compiler/transformers/es2017.ts +++ b/src/compiler/transformers/es2017.ts @@ -262,7 +262,8 @@ namespace ts { } function transformAsyncFunctionBody(node: FunctionLikeDeclaration): ConciseBody | FunctionBody { - const nodeType = node.original ? (node.original).type : node.type; + const original = getOriginalNode(node, isFunctionLike); + const nodeType = original.type; const promiseConstructor = languageVersion < ScriptTarget.ES2015 ? getPromiseConstructor(nodeType) : undefined; const isArrowFunction = node.kind === SyntaxKind.ArrowFunction; const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & NodeCheckFlags.CaptureArguments) !== 0; @@ -336,15 +337,16 @@ namespace ts { } function getPromiseConstructor(type: TypeNode) { - const typeName = getEntityNameFromTypeNode(type); - if (typeName && isEntityName(typeName)) { - const serializationKind = resolver.getTypeReferenceSerializationKind(typeName); - if (serializationKind === TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue - || serializationKind === TypeReferenceSerializationKind.Unknown) { - return typeName; + if (type) { + const typeName = getEntityNameFromTypeNode(type); + if (typeName && isEntityName(typeName)) { + const serializationKind = resolver.getTypeReferenceSerializationKind(typeName); + if (serializationKind === TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue + || serializationKind === TypeReferenceSerializationKind.Unknown) { + return typeName; + } } } - return undefined; } diff --git a/src/compiler/transformers/generators.ts b/src/compiler/transformers/generators.ts index 200e5ec7296..7c9cde59fde 100644 --- a/src/compiler/transformers/generators.ts +++ b/src/compiler/transformers/generators.ts @@ -2369,7 +2369,7 @@ namespace ts { labelExpressions = []; } - const expression = createSynthesizedNode(SyntaxKind.NumericLiteral); + const expression = createLiteral(-1); if (labelExpressions[label] === undefined) { labelExpressions[label] = [expression]; } @@ -2380,7 +2380,7 @@ namespace ts { return expression; } - return createNode(SyntaxKind.OmittedExpression); + return createOmittedExpression(); } /** @@ -2596,7 +2596,7 @@ namespace ts { /*asteriskToken*/ undefined, /*name*/ undefined, /*typeParameters*/ undefined, - [createParameter(state)], + [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, state)], /*type*/ undefined, createBlock( buildResult, diff --git a/src/compiler/transformers/module/module.ts b/src/compiler/transformers/module/module.ts index 1f56670c932..87d02b44025 100644 --- a/src/compiler/transformers/module/module.ts +++ b/src/compiler/transformers/module/module.ts @@ -4,6 +4,12 @@ /*@internal*/ namespace ts { export function transformModule(context: TransformationContext) { + interface AsynchronousDependencies { + aliasedModuleNames: Expression[]; + unaliasedModuleNames: Expression[]; + importAliasNames: ParameterDeclaration[]; + } + const transformModuleDelegates = createMap<(node: SourceFile) => SourceFile>({ [ModuleKind.None]: transformCommonJSModule, [ModuleKind.CommonJS]: transformCommonJSModule, @@ -26,22 +32,19 @@ namespace ts { const previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(SyntaxKind.Identifier); - context.enableSubstitution(SyntaxKind.BinaryExpression); - context.enableSubstitution(SyntaxKind.PrefixUnaryExpression); - context.enableSubstitution(SyntaxKind.PostfixUnaryExpression); - context.enableSubstitution(SyntaxKind.ShorthandPropertyAssignment); - context.enableEmitNotification(SyntaxKind.SourceFile); + context.enableSubstitution(SyntaxKind.Identifier); // Substitutes expression identifiers with imported/exported symbols. + context.enableSubstitution(SyntaxKind.BinaryExpression); // Substitutes assignments to exported symbols. + context.enableSubstitution(SyntaxKind.PrefixUnaryExpression); // Substitutes updates to exported symbols. + context.enableSubstitution(SyntaxKind.PostfixUnaryExpression); // Substitutes updates to exported symbols. + context.enableSubstitution(SyntaxKind.ShorthandPropertyAssignment); // Substitutes shorthand property assignments for imported/exported symbols. + context.enableEmitNotification(SyntaxKind.SourceFile); // Restore state when substituting nodes in a file. - let currentSourceFile: SourceFile; - let externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[]; - let exportSpecifiers: Map; - let exportEquals: ExportAssignment; - let bindingNameExportSpecifiersMap: Map; - // Subset of exportSpecifiers that is a binding-name. - // This is to reduce amount of memory we have to keep around even after we done with module-transformer - const bindingNameExportSpecifiersForFileMap = createMap>(); - let hasExportStarsToExportValues: boolean; + const moduleInfoMap = createMap(); // The ExternalModuleInfo for each file. + const deferredExports = createMap(); // Exports to defer until an EndOfDeclarationMarker is found. + + let currentSourceFile: SourceFile; // The current file. + let currentModuleInfo: ExternalModuleInfo; // The ExternalModuleInfo for the current file. + let noSubstitution: Map; // Set of nodes for which substitution rules should be ignored. return transformSourceFile; @@ -51,30 +54,22 @@ namespace ts { * @param node The SourceFile node. */ function transformSourceFile(node: SourceFile) { - if (isDeclarationFile(node)) { + if (isDeclarationFile(node) + || !(isExternalModule(node) + || compilerOptions.isolatedModules)) { return node; } - if (isExternalModule(node) || compilerOptions.isolatedModules) { - currentSourceFile = node; + currentSourceFile = node; + currentModuleInfo = moduleInfoMap[getOriginalNodeId(node)] = collectExternalModuleInfo(node, resolver); - // Collect information about the external module. - ({ externalImports, exportSpecifiers, exportEquals, hasExportStarsToExportValues } = collectExternalModuleInfo(node)); + // Perform the transformation. + const transformModule = transformModuleDelegates[moduleKind] || transformModuleDelegates[ModuleKind.None]; + const updated = transformModule(node); - // Perform the transformation. - const transformModule = transformModuleDelegates[moduleKind] || transformModuleDelegates[ModuleKind.None]; - const updated = transformModule(node); - aggregateTransformFlags(updated); - - currentSourceFile = undefined; - externalImports = undefined; - exportSpecifiers = undefined; - exportEquals = undefined; - hasExportStarsToExportValues = false; - return updated; - } - - return node; + currentSourceFile = undefined; + currentModuleInfo = undefined; + return aggregateTransformFlags(updated); } /** @@ -86,13 +81,13 @@ namespace ts { startLexicalEnvironment(); const statements: Statement[] = []; - const statementOffset = addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, visitor); - addRange(statements, visitNodes(node.statements, visitor, isStatement, statementOffset)); + const statementOffset = addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, sourceElementVisitor); + addRange(statements, visitNodes(node.statements, sourceElementVisitor, isStatement, statementOffset)); addRange(statements, endLexicalEnvironment()); addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false); - const updated = updateSourceFile(node, statements); - if (hasExportStarsToExportValues) { + const updated = updateSourceFileNode(node, createNodeArray(statements, node.statements)); + if (currentModuleInfo.hasExportStarsToExportValues) { setEmitFlags(updated, EmitFlags.EmitExportStar | getEmitFlags(node)); } @@ -156,45 +151,98 @@ namespace ts { // Create an updated SourceFile: // // define(moduleName?, ["module1", "module2"], function ... - return updateSourceFile(node, [ - createStatement( - createCall( - define, - /*typeArguments*/ undefined, - [ - // Add the module name (if provided). - ...(moduleName ? [moduleName] : []), + return updateSourceFileNode(node, createNodeArray( + [ + createStatement( + createCall( + define, + /*typeArguments*/ undefined, + [ + // Add the module name (if provided). + ...(moduleName ? [moduleName] : []), - // Add the dependency array argument: - // - // ["require", "exports", module1", "module2", ...] - createArrayLiteral([ - createLiteral("require"), - createLiteral("exports"), - ...aliasedModuleNames, - ...unaliasedModuleNames - ]), + // Add the dependency array argument: + // + // ["require", "exports", module1", "module2", ...] + createArrayLiteral([ + createLiteral("require"), + createLiteral("exports"), + ...aliasedModuleNames, + ...unaliasedModuleNames + ]), - // Add the module body function argument: - // - // function (require, exports, module1, module2) ... - createFunctionExpression( - /*modifiers*/ undefined, - /*asteriskToken*/ undefined, - /*name*/ undefined, - /*typeParameters*/ undefined, - [ - createParameter("require"), - createParameter("exports"), - ...importAliasNames - ], - /*type*/ undefined, - transformAsynchronousModuleBody(node) - ) - ] + // Add the module body function argument: + // + // function (require, exports, module1, module2) ... + createFunctionExpression( + /*modifiers*/ undefined, + /*asteriskToken*/ undefined, + /*name*/ undefined, + /*typeParameters*/ undefined, + [ + createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "require"), + createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "exports"), + ...importAliasNames + ], + /*type*/ undefined, + transformAsynchronousModuleBody(node) + ) + ] + ) ) - ) - ]); + ], + /*location*/ node.statements) + ); + } + + /** + * Collect the additional asynchronous dependencies for the module. + * + * @param node The source file. + * @param includeNonAmdDependencies A value indicating whether to include non-AMD dependencies. + */ + function collectAsynchronousDependencies(node: SourceFile, includeNonAmdDependencies: boolean): AsynchronousDependencies { + // names of modules with corresponding parameter in the factory function + const aliasedModuleNames: Expression[] = []; + + // names of modules with no corresponding parameters in factory function + const unaliasedModuleNames: Expression[] = []; + + // names of the parameters in the factory function; these + // parameters need to match the indexes of the corresponding + // module names in aliasedModuleNames. + const importAliasNames: ParameterDeclaration[] = []; + + // Fill in amd-dependency tags + for (const amdDependency of node.amdDependencies) { + if (amdDependency.name) { + aliasedModuleNames.push(createLiteral(amdDependency.path)); + importAliasNames.push(createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, amdDependency.name)); + } + else { + unaliasedModuleNames.push(createLiteral(amdDependency.path)); + } + } + + for (const importNode of currentModuleInfo.externalImports) { + // Find the name of the external module + const externalModuleName = getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions); + + // Find the name of the module alias, if there is one + const importAliasName = getLocalNameForExternalImport(importNode, currentSourceFile); + if (includeNonAmdDependencies && importAliasName) { + // Set emitFlags on the name of the classDeclaration + // This is so that when printer will not substitute the identifier + setEmitFlags(importAliasName, EmitFlags.NoSubstitution); + aliasedModuleNames.push(externalModuleName); + importAliasNames.push(createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, importAliasName)); + } + else { + unaliasedModuleNames.push(externalModuleName); + } + } + + return { aliasedModuleNames, unaliasedModuleNames, importAliasNames }; } /** @@ -206,10 +254,10 @@ namespace ts { startLexicalEnvironment(); const statements: Statement[] = []; - const statementOffset = addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, visitor); + const statementOffset = addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, sourceElementVisitor); // Visit each statement of the module body. - addRange(statements, visitNodes(node.statements, visitor, isStatement, statementOffset)); + addRange(statements, visitNodes(node.statements, sourceElementVisitor, isStatement, statementOffset)); // End the lexical environment for the module body // and merge any new lexical declarations. @@ -219,7 +267,7 @@ namespace ts { addExportEqualsIfNeeded(statements, /*emitAsReturn*/ true); const body = createBlock(statements, /*location*/ undefined, /*multiLine*/ true); - if (hasExportStarsToExportValues) { + if (currentModuleInfo.hasExportStarsToExportValues) { // If we have any `export * from ...` declarations // we need to inform the emitter to add the __export helper. setEmitFlags(body, EmitFlags.EmitExportStar); @@ -228,12 +276,20 @@ namespace ts { return body; } + /** + * Adds the down-level representation of `export=` to the statement list if one exists + * in the source file. + * + * @param statements The Statement list to modify. + * @param emitAsReturn A value indicating whether to emit the `export=` statement as a + * return statement. + */ function addExportEqualsIfNeeded(statements: Statement[], emitAsReturn: boolean) { - if (exportEquals) { + if (currentModuleInfo.exportEquals) { if (emitAsReturn) { const statement = createReturn( - exportEquals.expression, - /*location*/ exportEquals + currentModuleInfo.exportEquals.expression, + /*location*/ currentModuleInfo.exportEquals ); setEmitFlags(statement, EmitFlags.NoTokenSourceMaps | EmitFlags.NoComments); @@ -246,9 +302,9 @@ namespace ts { createIdentifier("module"), "exports" ), - exportEquals.expression + currentModuleInfo.exportEquals.expression ), - /*location*/ exportEquals + /*location*/ currentModuleInfo.exportEquals ); setEmitFlags(statement, EmitFlags.NoComments); @@ -257,12 +313,16 @@ namespace ts { } } + // + // Top-Level Source Element Visitors + // + /** * Visits a node at the top level of the source file. * - * @param node The node. + * @param node The node to visit. */ - function visitor(node: Node): VisitResult { + function sourceElementVisitor(node: Node): VisitResult { switch (node.kind) { case SyntaxKind.ImportDeclaration: return visitImportDeclaration(node); @@ -285,8 +345,11 @@ namespace ts { case SyntaxKind.ClassDeclaration: return visitClassDeclaration(node); - case SyntaxKind.ExpressionStatement: - return visitExpressionStatement(node); + case SyntaxKind.MergeDeclarationMarker: + return visitMergeDeclarationMarker(node); + + case SyntaxKind.EndOfDeclarationMarker: + return visitEndOfDeclarationMarker(node); default: // This visitor does not descend into the tree, as export/import statements @@ -298,24 +361,15 @@ namespace ts { /** * Visits an ImportDeclaration node. * - * @param node The ImportDeclaration node. + * @param node The node to visit. */ function visitImportDeclaration(node: ImportDeclaration): VisitResult { - if (!contains(externalImports, node)) { - return undefined; - } - - const statements: Statement[] = []; + let statements: Statement[]; const namespaceDeclaration = getNamespaceDeclarationNode(node); if (moduleKind !== ModuleKind.AMD) { if (!node.importClause) { // import "mod"; - statements.push( - createStatement( - createRequireCall(node), - /*location*/ node - ) - ); + return createStatement(createRequireCall(node), /*location*/ node); } else { const variables: VariableDeclaration[] = []; @@ -353,10 +407,14 @@ namespace ts { } } - statements.push( + statements = append(statements, createVariableStatement( /*modifiers*/ undefined, - createConstDeclarationList(variables), + createVariableDeclarationList( + variables, + /*location*/ undefined, + languageVersion >= ScriptTarget.ES2015 ? NodeFlags.Const : NodeFlags.None + ), /*location*/ node ) ); @@ -364,39 +422,66 @@ namespace ts { } else if (namespaceDeclaration && isDefaultImport(node)) { // import d, * as n from "mod"; - statements.push( + statements = append(statements, createVariableStatement( /*modifiers*/ undefined, - createVariableDeclarationList([ - createVariableDeclaration( - getSynthesizedClone(namespaceDeclaration.name), - /*type*/ undefined, - getGeneratedNameForNode(node), - /*location*/ node - ) - ]) + createVariableDeclarationList( + [ + createVariableDeclaration( + getSynthesizedClone(namespaceDeclaration.name), + /*type*/ undefined, + getGeneratedNameForNode(node), + /*location*/ node + ) + ], + /*location*/ undefined, + languageVersion >= ScriptTarget.ES2015 ? NodeFlags.Const : NodeFlags.None + ) ) ); } - addExportImportAssignments(statements, node); + if (hasAssociatedEndOfDeclarationMarker(node)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfImportDeclaration(deferredExports[id], node); + } + else { + statements = appendExportsOfImportDeclaration(statements, node); + } + return singleOrMany(statements); } - function visitImportEqualsDeclaration(node: ImportEqualsDeclaration): VisitResult { - if (!contains(externalImports, node)) { - return undefined; + /** + * Creates a `require()` call to import an external module. + * + * @param importNode The declararation to import. + */ + function createRequireCall(importNode: ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration) { + const moduleName = getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions); + const args: Expression[] = []; + if (moduleName) { + args.push(moduleName); } - // Set emitFlags on the name of the importEqualsDeclaration - // This is so the printer will not substitute the identifier - setEmitFlags(node.name, EmitFlags.NoSubstitution); - const statements: Statement[] = []; + return createCall(createIdentifier("require"), /*typeArguments*/ undefined, args); + } + + /** + * Visits an ImportEqualsDeclaration node. + * + * @param node The node to visit. + */ + function visitImportEqualsDeclaration(node: ImportEqualsDeclaration): VisitResult { + Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer."); + + let statements: Statement[]; if (moduleKind !== ModuleKind.AMD) { if (hasModifier(node, ModifierFlags.Export)) { - statements.push( + statements = append(statements, createStatement( - createExportAssignment( + createExportExpression( node.name, createRequireCall(node) ), @@ -405,18 +490,20 @@ namespace ts { ); } else { - statements.push( + statements = append(statements, createVariableStatement( /*modifiers*/ undefined, - createVariableDeclarationList([ - createVariableDeclaration( - getSynthesizedClone(node.name), - /*type*/ undefined, - createRequireCall(node) - ) - ], - /*location*/ undefined, - /*flags*/ languageVersion >= ScriptTarget.ES2015 ? NodeFlags.Const : NodeFlags.None), + createVariableDeclarationList( + [ + createVariableDeclaration( + getSynthesizedClone(node.name), + /*type*/ undefined, + createRequireCall(node) + ) + ], + /*location*/ undefined, + /*flags*/ languageVersion >= ScriptTarget.ES2015 ? NodeFlags.Const : NodeFlags.None + ), /*location*/ node ) ); @@ -424,21 +511,36 @@ namespace ts { } else { if (hasModifier(node, ModifierFlags.Export)) { - statements.push( + statements = append(statements, createStatement( - createExportAssignment(node.name, node.name), + createExportExpression(getExportName(node), getLocalName(node)), /*location*/ node ) ); } } - addExportImportAssignments(statements, node); - return statements; + if (hasAssociatedEndOfDeclarationMarker(node)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfImportEqualsDeclaration(deferredExports[id], node); + } + else { + statements = appendExportsOfImportEqualsDeclaration(statements, node); + } + + return singleOrMany(statements); } + /** + * Visits an ExportDeclaration node. + * + * @param The node to visit. + */ function visitExportDeclaration(node: ExportDeclaration): VisitResult { - if (!contains(externalImports, node)) { + if (!node.moduleSpecifier) { + // Elide export declarations with no module specifier as they are handled + // elsewhere. return undefined; } @@ -468,7 +570,7 @@ namespace ts { ); statements.push( createStatement( - createExportAssignment(specifier.name, exportedValue), + createExportExpression(getExportName(specifier), exportedValue), /*location*/ specifier ) ); @@ -493,220 +595,45 @@ namespace ts { } } + /** + * Visits an ExportAssignment node. + * + * @param node The node to visit. + */ function visitExportAssignment(node: ExportAssignment): VisitResult { if (node.isExportEquals) { - // Elide as `export=` is handled in addExportEqualsIfNeeded return undefined; } - const statements: Statement[] = []; - addExportDefault(statements, node.expression, /*location*/ node); - return statements; - } - - function addExportDefault(statements: Statement[], expression: Expression, location: TextRange): void { - tryAddExportDefaultCompat(statements); - - statements.push( - createStatement( - createExportAssignment( - createIdentifier("default"), - expression - ), - location - ) - ); - } - - function tryAddExportDefaultCompat(statements: Statement[]) { - const original = getOriginalNode(currentSourceFile); - Debug.assert(original.kind === SyntaxKind.SourceFile); - - if (!original.symbol.exports["___esModule"]) { - if (languageVersion === ScriptTarget.ES3) { - statements.push( - createStatement( - createExportAssignment( - createIdentifier("__esModule"), - createLiteral(true) - ) - ) - ); - } - else { - statements.push( - createStatement( - createCall( - createPropertyAccess(createIdentifier("Object"), "defineProperty"), - /*typeArguments*/ undefined, - [ - createIdentifier("exports"), - createLiteral("__esModule"), - createObjectLiteral([ - createPropertyAssignment("value", createLiteral(true)) - ]) - ] - ) - ) - ); - } - } - } - - function addExportImportAssignments(statements: Statement[], node: ImportEqualsDeclaration | ImportDeclaration) { - if (isImportEqualsDeclaration(node)) { - addExportMemberAssignments(statements, node.name); + let statements: Statement[]; + const original = node.original; + if (original && hasAssociatedEndOfDeclarationMarker(original)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportStatement(deferredExports[id], createIdentifier("default"), node.expression, /*location*/ node, /*allowComments*/ true); } else { - const names = reduceEachChild(node, collectExportMembers, []); - for (const name of names) { - addExportMemberAssignments(statements, name); - } - } - } - - function collectExportMembers(names: Identifier[], node: Node): Identifier[] { - if (isAliasSymbolDeclaration(node) && isDeclaration(node)) { - const name = node.name; - if (isIdentifier(name)) { - names.push(name); - } + statements = appendExportStatement(statements, createIdentifier("default"), node.expression, /*location*/ node, /*allowComments*/ true); } - return reduceEachChild(node, collectExportMembers, names); - } - - function addExportMemberAssignments(statements: Statement[], name: Identifier): void { - if (!exportEquals && exportSpecifiers && hasProperty(exportSpecifiers, name.text)) { - for (const specifier of exportSpecifiers[name.text]) { - statements.push( - startOnNewLine( - createStatement( - createExportAssignment(specifier.name, name), - /*location*/ specifier.name - ) - ) - ); - } - } - } - - function addExportMemberAssignment(statements: Statement[], node: DeclarationStatement) { - if (hasModifier(node, ModifierFlags.Default)) { - addExportDefault(statements, getDeclarationName(node), /*location*/ node); - } - else { - statements.push( - createExportStatement(node.name, setEmitFlags(getSynthesizedClone(node.name), EmitFlags.LocalName), /*location*/ node) - ); - } - } - - function visitVariableStatement(node: VariableStatement): VisitResult { - // If the variable is for a generated declaration, - // we should maintain it and just strip off the 'export' modifier if necessary. - const originalKind = getOriginalNode(node).kind; - if (originalKind === SyntaxKind.ModuleDeclaration || - originalKind === SyntaxKind.EnumDeclaration || - originalKind === SyntaxKind.ClassDeclaration) { - - if (!hasModifier(node, ModifierFlags.Export)) { - return node; - } - - return setOriginalNode( - createVariableStatement( - /*modifiers*/ undefined, - node.declarationList - ), - node - ); - } - - const resultStatements: Statement[] = []; - - // If we're exporting these variables, then these just become assignments to 'exports.blah'. - // We only want to emit assignments for variables with initializers. - if (hasModifier(node, ModifierFlags.Export)) { - const variables = getInitializedVariables(node.declarationList); - if (variables.length > 0) { - const inlineAssignments = createStatement( - inlineExpressions( - map(variables, transformInitializedVariable) - ), - node - ); - resultStatements.push(inlineAssignments); - } - } - else { - resultStatements.push(node); - } - - // While we might not have been exported here, each variable might have been exported - // later on in an export specifier (e.g. `export {foo as blah, bar}`). - for (const decl of node.declarationList.declarations) { - addExportMemberAssignmentsForBindingName(resultStatements, decl.name); - } - - return resultStatements; + return singleOrMany(statements); } /** - * Creates appropriate assignments for each binding identifier that is exported in an export specifier, - * and inserts it into 'resultStatements'. + * Visits a FunctionDeclaration node. + * + * @param node The node to visit. */ - function addExportMemberAssignmentsForBindingName(resultStatements: Statement[], name: BindingName): void { - if (isBindingPattern(name)) { - for (const element of name.elements) { - if (!isOmittedExpression(element)) { - addExportMemberAssignmentsForBindingName(resultStatements, element.name); - } - } - } - else { - if (!exportEquals && exportSpecifiers && hasProperty(exportSpecifiers, name.text)) { - const sourceFileId = getOriginalNodeId(currentSourceFile); - if (!bindingNameExportSpecifiersForFileMap[sourceFileId]) { - bindingNameExportSpecifiersForFileMap[sourceFileId] = createMap(); - } - bindingNameExportSpecifiersForFileMap[sourceFileId][name.text] = exportSpecifiers[name.text]; - addExportMemberAssignments(resultStatements, name); - } - } - } - - function transformInitializedVariable(node: VariableDeclaration): Expression { - const name = node.name; - if (isBindingPattern(name)) { - return flattenVariableDestructuringToExpression( - node, - hoistVariableDeclaration, - getModuleMemberName, - visitor - ); - } - else { - return createAssignment( - getModuleMemberName(name), - visitNode(node.initializer, visitor, isExpression) - ); - } - } - function visitFunctionDeclaration(node: FunctionDeclaration): VisitResult { - const statements: Statement[] = []; - const name = node.name || getGeneratedNameForNode(node); + let statements: Statement[]; if (hasModifier(node, ModifierFlags.Export)) { - // Keep async modifier for ES2017 transformer - const isAsync = hasModifier(node, ModifierFlags.Async); - statements.push( + statements = append(statements, setOriginalNode( createFunctionDeclaration( /*decorators*/ undefined, - isAsync ? [createNode(SyntaxKind.AsyncKeyword)] : undefined, + visitNodes(node.modifiers, modifierVisitor, isModifier), node.asteriskToken, - name, + getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true), /*typeParameters*/ undefined, node.parameters, /*type*/ undefined, @@ -716,30 +643,37 @@ namespace ts { /*original*/ node ) ); - - addExportMemberAssignment(statements, node); } else { - statements.push(node); + statements = append(statements, node); } - if (node.name) { - addExportMemberAssignments(statements, node.name); + if (hasAssociatedEndOfDeclarationMarker(node)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node); + } + else { + statements = appendExportsOfHoistedDeclaration(statements, node); } return singleOrMany(statements); } + /** + * Visits a ClassDeclaration node. + * + * @param node The node to visit. + */ function visitClassDeclaration(node: ClassDeclaration): VisitResult { - const statements: Statement[] = []; - const name = node.name || getGeneratedNameForNode(node); + let statements: Statement[]; if (hasModifier(node, ModifierFlags.Export)) { - statements.push( + statements = append(statements, setOriginalNode( createClassDeclaration( /*decorators*/ undefined, - /*modifiers*/ undefined, - name, + visitNodes(node.modifiers, modifierVisitor, isModifier), + getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true), /*typeParameters*/ undefined, node.heritageClauses, node.members, @@ -748,108 +682,469 @@ namespace ts { /*original*/ node ) ); - - addExportMemberAssignment(statements, node); } else { - statements.push(node); + statements = append(statements, node); } - // Decorators end up creating a series of assignment expressions which overwrite - // the local binding that we export, so we need to defer from exporting decorated classes - // until the decoration assignments take place. We do this when visiting expression-statements. - if (node.name && !(node.decorators && node.decorators.length)) { - addExportMemberAssignments(statements, node.name); + if (hasAssociatedEndOfDeclarationMarker(node)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node); + } + else { + statements = appendExportsOfHoistedDeclaration(statements, node); } return singleOrMany(statements); } - function visitExpressionStatement(node: ExpressionStatement): VisitResult { - const original = getOriginalNode(node); - const origKind = original.kind; + /** + * Visits a VariableStatement node. + * + * @param node The node to visit. + */ + function visitVariableStatement(node: VariableStatement): VisitResult { + let statements: Statement[]; + let variables: VariableDeclaration[]; + let expressions: Expression[]; + if (hasModifier(node, ModifierFlags.Export)) { + let modifiers: NodeArray; - if (origKind === SyntaxKind.EnumDeclaration || origKind === SyntaxKind.ModuleDeclaration) { - return visitExpressionStatementForEnumOrNamespaceDeclaration(node, original); - } - else if (origKind === SyntaxKind.ClassDeclaration) { - // The decorated assignment for a class name may need to be transformed. - const classDecl = original as ClassDeclaration; - if (classDecl.name) { - const statements = [node]; - addExportMemberAssignments(statements, classDecl.name); - return statements; + // If we're exporting these variables, then these just become assignments to 'exports.x'. + // We only want to emit assignments for variables with initializers. + for (const variable of node.declarationList.declarations) { + if (isIdentifier(variable.name) && isLocalName(variable.name)) { + if (!modifiers) { + modifiers = visitNodes(node.modifiers, modifierVisitor, isModifier); + } + + variables = append(variables, variable); + } + else if (variable.initializer) { + expressions = append(expressions, transformInitializedVariable(variable)); + } } + + if (variables) { + statements = append(statements, updateVariableStatement(node, modifiers, updateVariableDeclarationList(node.declarationList, variables))); + } + + if (expressions) { + statements = append(statements, createStatement(inlineExpressions(expressions), /*location*/ node)); + } + } + else { + statements = append(statements, node); + } + + if (hasAssociatedEndOfDeclarationMarker(node)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node); + } + else { + statements = appendExportsOfVariableStatement(statements, node); + } + + return singleOrMany(statements); + } + + /** + * Transforms an exported variable with an initializer into an expression. + * + * @param node The node to transform. + */ + function transformInitializedVariable(node: VariableDeclaration): Expression { + if (isBindingPattern(node.name)) { + return flattenVariableDestructuringToExpression( + node, + hoistVariableDeclaration, + createExportExpression + ); + } + else { + return createAssignment( + createPropertyAccess( + createIdentifier("exports"), + node.name, + /*location*/ node.name + ), + node.initializer + ); + } + } + + /** + * Visits a MergeDeclarationMarker used as a placeholder for the beginning of a merged + * and transformed declaration. + * + * @param node The node to visit. + */ + function visitMergeDeclarationMarker(node: MergeDeclarationMarker): VisitResult { + // For an EnumDeclaration or ModuleDeclaration that merges with a preceeding + // declaration we do not emit a leading variable declaration. To preserve the + // begin/end semantics of the declararation and to properly handle exports + // we wrapped the leading variable declaration in a `MergeDeclarationMarker`. + // + // To balance the declaration, add the exports of the elided variable + // statement. + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === SyntaxKind.VariableStatement) { + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original); } return node; } - function visitExpressionStatementForEnumOrNamespaceDeclaration(node: ExpressionStatement, original: EnumDeclaration | ModuleDeclaration): VisitResult { - const statements: Statement[] = [node]; + /** + * Determines whether a node has an associated EndOfDeclarationMarker. + * + * @param node The node to test. + */ + function hasAssociatedEndOfDeclarationMarker(node: Node) { + return (getEmitFlags(node) & EmitFlags.HasEndOfDeclarationMarker) !== 0; + } - // Preserve old behavior for enums in which a variable statement is emitted after the body itself. - if (hasModifier(original, ModifierFlags.Export) && - original.kind === SyntaxKind.EnumDeclaration && - isFirstDeclarationOfKind(original, SyntaxKind.EnumDeclaration)) { - addVarForExportedEnumOrNamespaceDeclaration(statements, original); + /** + * Visits a DeclarationMarker used as a placeholder for the end of a transformed + * declaration. + * + * @param node The node to visit. + */ + function visitEndOfDeclarationMarker(node: EndOfDeclarationMarker): VisitResult { + // For some transformations we emit an `EndOfDeclarationMarker` to mark the actual + // end of the transformed declaration. We use this marker to emit any deferred exports + // of the declaration. + const id = getOriginalNodeId(node); + const statements = deferredExports[id]; + if (statements) { + delete deferredExports[id]; + return append(statements, node); } - addExportMemberAssignments(statements, original.name); + return node; + } + + /** + * Appends the exports of an ImportDeclaration to a statement list, returning the + * statement list. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param decl The declaration whose exports are to be recorded. + */ + function appendExportsOfImportDeclaration(statements: Statement[] | undefined, decl: ImportDeclaration): Statement[] | undefined { + if (currentModuleInfo.exportEquals) { + return statements; + } + + const importClause = decl.importClause; + if (!importClause) { + return statements; + } + + if (importClause.name) { + statements = appendExportsOfDeclaration(statements, importClause); + } + + const namedBindings = importClause.namedBindings; + if (namedBindings) { + switch (namedBindings.kind) { + case SyntaxKind.NamespaceImport: + statements = appendExportsOfDeclaration(statements, namedBindings); + break; + + case SyntaxKind.NamedImports: + for (const importBinding of namedBindings.elements) { + statements = appendExportsOfDeclaration(statements, importBinding); + } + + break; + } + } return statements; } /** - * Adds a trailing VariableStatement for an enum or module declaration. + * Appends the exports of an ImportEqualsDeclaration to a statement list, returning the + * statement list. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param decl The declaration whose exports are to be recorded. */ - function addVarForExportedEnumOrNamespaceDeclaration(statements: Statement[], node: EnumDeclaration | ModuleDeclaration) { - const transformedStatement = createVariableStatement( - /*modifiers*/ undefined, - [createVariableDeclaration( - getDeclarationName(node), - /*type*/ undefined, - createPropertyAccess(createIdentifier("exports"), getDeclarationName(node)) - )], - /*location*/ node + function appendExportsOfImportEqualsDeclaration(statements: Statement[] | undefined, decl: ImportEqualsDeclaration): Statement[] | undefined { + if (currentModuleInfo.exportEquals) { + return statements; + } + + return appendExportsOfDeclaration(statements, decl); + } + + /** + * Appends the exports of a VariableStatement to a statement list, returning the statement + * list. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param node The VariableStatement whose exports are to be recorded. + */ + function appendExportsOfVariableStatement(statements: Statement[] | undefined, node: VariableStatement): Statement[] | undefined { + if (currentModuleInfo.exportEquals) { + return statements; + } + + for (const decl of node.declarationList.declarations) { + statements = appendExportsOfBindingElement(statements, decl); + } + + return statements; + } + + /** + * Appends the exports of a VariableDeclaration or BindingElement to a statement list, + * returning the statement list. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param decl The declaration whose exports are to be recorded. + */ + function appendExportsOfBindingElement(statements: Statement[] | undefined, decl: VariableDeclaration | BindingElement): Statement[] | undefined { + if (currentModuleInfo.exportEquals) { + return statements; + } + + if (isBindingPattern(decl.name)) { + for (const element of decl.name.elements) { + if (!isOmittedExpression(element)) { + statements = appendExportsOfBindingElement(statements, element); + } + } + } + else if (!isGeneratedIdentifier(decl.name)) { + statements = appendExportsOfDeclaration(statements, decl); + } + + return statements; + } + + /** + * Appends the exports of a ClassDeclaration or FunctionDeclaration to a statement list, + * returning the statement list. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param decl The declaration whose exports are to be recorded. + */ + function appendExportsOfHoistedDeclaration(statements: Statement[] | undefined, decl: ClassDeclaration | FunctionDeclaration): Statement[] | undefined { + if (currentModuleInfo.exportEquals) { + return statements; + } + + if (hasModifier(decl, ModifierFlags.Export)) { + const exportName = hasModifier(decl, ModifierFlags.Default) ? createIdentifier("default") : decl.name; + statements = appendExportStatement(statements, exportName, getLocalName(decl), /*location*/ decl); + } + + if (decl.name) { + statements = appendExportsOfDeclaration(statements, decl); + } + + return statements; + } + + /** + * Appends the exports of a declaration to a statement list, returning the statement list. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param decl The declaration to export. + */ + function appendExportsOfDeclaration(statements: Statement[] | undefined, decl: Declaration): Statement[] | undefined { + const name = getDeclarationName(decl); + const exportSpecifiers = currentModuleInfo.exportSpecifiers[name.text]; + if (exportSpecifiers) { + for (const exportSpecifier of exportSpecifiers) { + statements = appendExportStatement(statements, exportSpecifier.name, name, /*location*/ exportSpecifier.name); + } + } + return statements; + } + + /** + * Appends the down-level representation of an export to a statement list, returning the + * statement list. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param exportName The name of the export. + * @param expression The expression to export. + * @param location The location to use for source maps and comments for the export. + * @param allowComments Whether to allow comments on the export. + */ + function appendExportStatement(statements: Statement[] | undefined, exportName: Identifier, expression: Expression, location?: TextRange, allowComments?: boolean): Statement[] | undefined { + if (exportName.text === "default") { + const sourceFile = getOriginalNode(currentSourceFile, isSourceFile); + if (sourceFile && !sourceFile.symbol.exports["___esModule"]) { + if (languageVersion === ScriptTarget.ES3) { + statements = append(statements, + createStatement( + createExportExpression( + createIdentifier("__esModule"), + createLiteral(true) + ) + ) + ); + } + else { + statements = append(statements, + createStatement( + createCall( + createPropertyAccess(createIdentifier("Object"), "defineProperty"), + /*typeArguments*/ undefined, + [ + createIdentifier("exports"), + createLiteral("__esModule"), + createObjectLiteral([ + createPropertyAssignment("value", createLiteral(true)) + ]) + ] + ) + ) + ); + } + } + } + + statements = append(statements, createExportStatement(exportName, expression, location, allowComments)); + return statements; + } + + /** + * Creates a call to the current file's export function to export a value. + * + * @param name The bound name of the export. + * @param value The exported value. + * @param location The location to use for source maps and comments for the export. + * @param allowComments An optional value indicating whether to emit comments for the statement. + */ + function createExportStatement(name: Identifier, value: Expression, location?: TextRange, allowComments?: boolean) { + const statement = createStatement(createExportExpression(name, value), location); + startOnNewLine(statement); + if (!allowComments) { + setEmitFlags(statement, EmitFlags.NoComments); + } + + return statement; + } + + /** + * Creates a call to the current file's export function to export a value. + * + * @param name The bound name of the export. + * @param value The exported value. + * @param location The location to use for source maps and comments for the export. + */ + function createExportExpression(name: Identifier, value: Expression, location?: TextRange) { + return createAssignment( + createPropertyAccess( + createIdentifier("exports"), + getSynthesizedClone(name) + ), + value, + location ); - setEmitFlags(transformedStatement, EmitFlags.NoComments); - statements.push(transformedStatement); } - function getDeclarationName(node: DeclarationStatement) { - return node.name ? getSynthesizedClone(node.name) : getGeneratedNameForNode(node); + // + // Modifier Visitors + // + + /** + * Visit nodes to elide module-specific modifiers. + * + * @param node The node to visit. + */ + function modifierVisitor(node: Node): VisitResult { + // Elide module-specific modifiers. + switch (node.kind) { + case SyntaxKind.ExportKeyword: + case SyntaxKind.DefaultKeyword: + return undefined; + } + + return node; } + // + // Emit Notification + // + + /** + * Hook for node emit notifications. + * + * @param emitContext A context hint for the emitter. + * @param node The node to emit. + * @param emit A callback used to emit the node in the printer. + */ function onEmitNode(emitContext: EmitContext, node: Node, emitCallback: (emitContext: EmitContext, node: Node) => void): void { if (node.kind === SyntaxKind.SourceFile) { - bindingNameExportSpecifiersMap = bindingNameExportSpecifiersForFileMap[getOriginalNodeId(node)]; + currentSourceFile = node; + currentModuleInfo = moduleInfoMap[getOriginalNodeId(currentSourceFile)]; + noSubstitution = createMap(); + previousOnEmitNode(emitContext, node, emitCallback); - bindingNameExportSpecifiersMap = undefined; + + currentSourceFile = undefined; + currentModuleInfo = undefined; + noSubstitution = undefined; } else { previousOnEmitNode(emitContext, node, emitCallback); } } + // + // Substitutions + // + /** * Hooks node substitutions. * + * @param emitContext A context hint for the emitter. * @param node The node to substitute. - * @param isExpression A value indicating whether the node is to be used in an expression - * position. */ function onSubstituteNode(emitContext: EmitContext, node: Node) { node = previousOnSubstituteNode(emitContext, node); + if (node.id && noSubstitution[node.id]) { + return node; + } + if (emitContext === EmitContext.Expression) { return substituteExpression(node); } else if (isShorthandPropertyAssignment(node)) { return substituteShorthandPropertyAssignment(node); } + return node; } + /** + * Substitution for a ShorthandPropertyAssignment whose declaration name is an imported + * or exported symbol. + * + * @param node The node to substitute. + */ function substituteShorthandPropertyAssignment(node: ShorthandPropertyAssignment): ObjectLiteralElementLike { const name = node.name; const exportedOrImportedName = substituteExpressionIdentifier(name); @@ -865,6 +1160,11 @@ namespace ts { return node; } + /** + * Substitution for an Expression that may contain an imported or exported symbol. + * + * @param node The node to substitute. + */ function substituteExpression(node: Expression) { switch (node.kind) { case SyntaxKind.Identifier: @@ -879,195 +1179,137 @@ namespace ts { return node; } + /** + * Substitution for an Identifier expression that may contain an imported or exported + * symbol. + * + * @param node The node to substitute. + */ function substituteExpressionIdentifier(node: Identifier): Expression { - return trySubstituteExportedName(node) - || trySubstituteImportedName(node) - || node; - } - - function substituteBinaryExpression(node: BinaryExpression): Expression { - const left = node.left; - // If the left-hand-side of the binaryExpression is an identifier and its is export through export Specifier - if (isIdentifier(left) && isAssignmentOperator(node.operatorToken.kind)) { - if (bindingNameExportSpecifiersMap && hasProperty(bindingNameExportSpecifiersMap, left.text)) { - setEmitFlags(node, EmitFlags.NoSubstitution); - let nestedExportAssignment: BinaryExpression; - for (const specifier of bindingNameExportSpecifiersMap[left.text]) { - nestedExportAssignment = nestedExportAssignment ? - createExportAssignment(specifier.name, nestedExportAssignment) : - createExportAssignment(specifier.name, node); - } - return nestedExportAssignment; + if (!isGeneratedIdentifier(node) && !isLocalName(node)) { + const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node)); + if (exportContainer && exportContainer.kind === SyntaxKind.SourceFile) { + return createPropertyAccess( + createIdentifier("exports"), + getSynthesizedClone(node), + /*location*/ node + ); } - } - return node; - } - function substituteUnaryExpression(node: PrefixUnaryExpression | PostfixUnaryExpression): Expression { - // Because how the compiler only parse plusplus and minusminus to be either prefixUnaryExpression or postFixUnaryExpression depended on where they are - // We don't need to check that the operator has SyntaxKind.plusplus or SyntaxKind.minusminus - const operator = node.operator; - const operand = node.operand; - if (isIdentifier(operand) && bindingNameExportSpecifiersForFileMap) { - if (bindingNameExportSpecifiersMap && hasProperty(bindingNameExportSpecifiersMap, operand.text)) { - setEmitFlags(node, EmitFlags.NoSubstitution); - let transformedUnaryExpression: BinaryExpression; - if (node.kind === SyntaxKind.PostfixUnaryExpression) { - transformedUnaryExpression = createBinary( - operand, - createToken(operator === SyntaxKind.PlusPlusToken ? SyntaxKind.PlusEqualsToken : SyntaxKind.MinusEqualsToken), - createLiteral(1), - /*location*/ node - ); - // We have to set no substitution flag here to prevent visit the binary expression and substitute it again as we will preform all necessary substitution in here - setEmitFlags(transformedUnaryExpression, EmitFlags.NoSubstitution); - } - let nestedExportAssignment: BinaryExpression; - for (const specifier of bindingNameExportSpecifiersMap[operand.text]) { - nestedExportAssignment = nestedExportAssignment ? - createExportAssignment(specifier.name, nestedExportAssignment) : - createExportAssignment(specifier.name, transformedUnaryExpression || node); - } - return nestedExportAssignment; - } - } - return node; - } - - function trySubstituteExportedName(node: Identifier) { - const emitFlags = getEmitFlags(node); - if ((emitFlags & EmitFlags.LocalName) === 0) { - const container = resolver.getReferencedExportContainer(node, (emitFlags & EmitFlags.ExportName) !== 0); - if (container) { - if (container.kind === SyntaxKind.SourceFile) { + const importDeclaration = resolver.getReferencedImportDeclaration(node); + if (importDeclaration) { + if (isImportClause(importDeclaration)) { return createPropertyAccess( - createIdentifier("exports"), - getSynthesizedClone(node), - /*location*/ node - ); - } - } - } - - return undefined; - } - - function trySubstituteImportedName(node: Identifier): Expression { - if ((getEmitFlags(node) & EmitFlags.LocalName) === 0) { - const declaration = resolver.getReferencedImportDeclaration(node); - if (declaration) { - if (isImportClause(declaration)) { - return createPropertyAccess( - getGeneratedNameForNode(declaration.parent), + getGeneratedNameForNode(importDeclaration.parent), createIdentifier("default"), /*location*/ node ); } - else if (isImportSpecifier(declaration)) { - const name = declaration.propertyName || declaration.name; + else if (isImportSpecifier(importDeclaration)) { + const name = importDeclaration.propertyName || importDeclaration.name; return createPropertyAccess( - getGeneratedNameForNode(declaration.parent.parent.parent), + getGeneratedNameForNode(importDeclaration.parent.parent.parent), getSynthesizedClone(name), /*location*/ node ); } } } - return undefined; + return node; } - function getModuleMemberName(name: Identifier) { - return createPropertyAccess( - createIdentifier("exports"), - name, - /*location*/ name - ); - } + /** + * Substitution for a BinaryExpression that may contain an imported or exported symbol. + * + * @param node The node to substitute. + */ + function substituteBinaryExpression(node: BinaryExpression): Expression { + // When we see an assignment expression whose left-hand side is an exported symbol, + // we should ensure all exports of that symbol are updated with the correct value. + // + // - We do not substitute generated identifiers for any reason. + // - We do not substitute identifiers tagged with the LocalName flag. + // - We do not substitute identifiers that were originally the name of an enum or + // namespace due to how they are transformed in TypeScript. + // - We only substitute identifiers that are exported at the top level. + if (isAssignmentOperator(node.operatorToken.kind) + && isIdentifier(node.left) + && !isGeneratedIdentifier(node.left) + && !isLocalName(node.left) + && !isDeclarationNameOfEnumOrNamespace(node.left)) { + const exportedNames = getExports(node.left); + if (exportedNames) { + // For each additional export of the declaration, apply an export assignment. + let expression: Expression = node; + for (const exportName of exportedNames) { + // Mark the node to prevent triggering this rule again. + noSubstitution[getNodeId(expression)] = true; + expression = createExportExpression(exportName, expression, /*location*/ node); + } - function createRequireCall(importNode: ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration) { - const moduleName = getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions); - const args: Expression[] = []; - if (isDefined(moduleName)) { - args.push(moduleName); - } - - return createCall(createIdentifier("require"), /*typeArguments*/ undefined, args); - } - - function createExportStatement(name: Identifier, value: Expression, location?: TextRange) { - const statement = createStatement(createExportAssignment(name, value)); - statement.startsOnNewLine = true; - if (location) { - setSourceMapRange(statement, location); - } - - return statement; - } - - function createExportAssignment(name: Identifier, value: Expression) { - return createAssignment( - createPropertyAccess( - createIdentifier("exports"), - getSynthesizedClone(name) - ), - value - ); - } - - interface AsynchronousDependencies { - aliasedModuleNames: Expression[]; - unaliasedModuleNames: Expression[]; - importAliasNames: ParameterDeclaration[]; - } - - function collectAsynchronousDependencies(node: SourceFile, includeNonAmdDependencies: boolean): AsynchronousDependencies { - // names of modules with corresponding parameter in the factory function - const aliasedModuleNames: Expression[] = []; - - // names of modules with no corresponding parameters in factory function - const unaliasedModuleNames: Expression[] = []; - - // names of the parameters in the factory function; these - // parameters need to match the indexes of the corresponding - // module names in aliasedModuleNames. - const importAliasNames: ParameterDeclaration[] = []; - - // Fill in amd-dependency tags - for (const amdDependency of node.amdDependencies) { - if (amdDependency.name) { - aliasedModuleNames.push(createLiteral(amdDependency.path)); - importAliasNames.push(createParameter(amdDependency.name)); - } - else { - unaliasedModuleNames.push(createLiteral(amdDependency.path)); + return expression; } } - for (const importNode of externalImports) { - // Find the name of the external module - const externalModuleName = getExternalModuleNameLiteral(importNode, currentSourceFile, host, resolver, compilerOptions); + return node; + } - // Find the name of the module alias, if there is one - const importAliasName = getLocalNameForExternalImport(importNode, currentSourceFile); - if (includeNonAmdDependencies && importAliasName) { - // Set emitFlags on the name of the classDeclaration - // This is so that when printer will not substitute the identifier - setEmitFlags(importAliasName, EmitFlags.NoSubstitution); - aliasedModuleNames.push(externalModuleName); - importAliasNames.push(createParameter(importAliasName)); - } - else { - unaliasedModuleNames.push(externalModuleName); + /** + * Substitution for a UnaryExpression that may contain an imported or exported symbol. + * + * @param node The node to substitute. + */ + function substituteUnaryExpression(node: PrefixUnaryExpression | PostfixUnaryExpression): Expression { + // When we see a prefix or postfix increment expression whose operand is an exported + // symbol, we should ensure all exports of that symbol are updated with the correct + // value. + // + // - We do not substitute generated identifiers for any reason. + // - We do not substitute identifiers tagged with the LocalName flag. + // - We do not substitute identifiers that were originally the name of an enum or + // namespace due to how they are transformed in TypeScript. + // - We only substitute identifiers that are exported at the top level. + if ((node.operator === SyntaxKind.PlusPlusToken || node.operator === SyntaxKind.MinusMinusToken) + && isIdentifier(node.operand) + && !isGeneratedIdentifier(node.operand) + && !isLocalName(node.operand) + && !isDeclarationNameOfEnumOrNamespace(node.operand)) { + const exportedNames = getExports(node.operand); + if (exportedNames) { + let expression: Expression = node.kind === SyntaxKind.PostfixUnaryExpression + ? createBinary( + node.operand, + createToken(node.operator === SyntaxKind.PlusPlusToken ? SyntaxKind.PlusEqualsToken : SyntaxKind.MinusEqualsToken), + createLiteral(1), + /*location*/ node) + : node; + for (const exportName of exportedNames) { + // Mark the node to prevent triggering this rule again. + noSubstitution[getNodeId(expression)] = true; + expression = createExportExpression(exportName, expression); + } + + return expression; } } - return { aliasedModuleNames, unaliasedModuleNames, importAliasNames }; + return node; } - function updateSourceFile(node: SourceFile, statements: Statement[]) { - const updated = getMutableClone(node); - updated.statements = createNodeArray(statements, node.statements); - return updated; + /** + * Gets the additional exports of a name. + * + * @param name The name. + */ + function getExports(name: Identifier): Identifier[] | undefined { + if (!isGeneratedIdentifier(name)) { + const valueDeclaration = resolver.getReferencedImportDeclaration(name) + || resolver.getReferencedValueDeclaration(name); + if (valueDeclaration) { + return currentModuleInfo + && currentModuleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)]; + } + } } } } diff --git a/src/compiler/transformers/module/system.ts b/src/compiler/transformers/module/system.ts index 61f2d5c0509..adc9385935b 100644 --- a/src/compiler/transformers/module/system.ts +++ b/src/compiler/transformers/module/system.ts @@ -12,8 +12,7 @@ namespace ts { const { startLexicalEnvironment, endLexicalEnvironment, - hoistVariableDeclaration, - hoistFunctionDeclaration, + hoistVariableDeclaration } = context; const compilerOptions = context.getCompilerOptions(); @@ -23,58 +22,43 @@ namespace ts { const previousOnEmitNode = context.onEmitNode; context.onSubstituteNode = onSubstituteNode; context.onEmitNode = onEmitNode; - context.enableSubstitution(SyntaxKind.Identifier); - context.enableSubstitution(SyntaxKind.BinaryExpression); - context.enableSubstitution(SyntaxKind.PrefixUnaryExpression); - context.enableSubstitution(SyntaxKind.PostfixUnaryExpression); - context.enableEmitNotification(SyntaxKind.SourceFile); + context.enableSubstitution(SyntaxKind.Identifier); // Substitutes expression identifiers for imported symbols. + context.enableSubstitution(SyntaxKind.BinaryExpression); // Substitutes assignments to exported symbols. + context.enableSubstitution(SyntaxKind.PrefixUnaryExpression); // Substitutes updates to exported symbols. + context.enableSubstitution(SyntaxKind.PostfixUnaryExpression); // Substitutes updates to exported symbols. + context.enableEmitNotification(SyntaxKind.SourceFile); // Restore state when substituting nodes in a file. - const exportFunctionForFileMap: Identifier[] = []; - let currentSourceFile: SourceFile; - let externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[]; - let exportSpecifiers: Map; - let exportEquals: ExportAssignment; - let hasExportStarsToExportValues: boolean; - let exportFunctionForFile: Identifier; - let contextObjectForFile: Identifier; - let exportedLocalNames: Identifier[]; - let exportedFunctionDeclarations: ExpressionStatement[]; + const moduleInfoMap = createMap(); // The ExternalModuleInfo for each file. + const deferredExports = createMap(); // Exports to defer until an EndOfDeclarationMarker is found. + const exportFunctionsMap = createMap(); // The export function associated with a source file. + const noSubstitutionMap = createMap>(); // Set of nodes for which substitution rules should be ignored for each file. + let currentSourceFile: SourceFile; // The current file. + let moduleInfo: ExternalModuleInfo; // ExternalModuleInfo for the current file. + let exportFunction: Identifier; // The export function for the current file. + let contextObject: Identifier; // The context object for the current file. + let hoistedStatements: Statement[]; let enclosingBlockScopedContainer: Node; - let currentParent: Node; - let currentNode: Node; + let noSubstitution: Map; // Set of nodes for which substitution rules should be ignored. return transformSourceFile; + /** + * Transforms the module aspects of a SourceFile. + * + * @param node The SourceFile node. + */ function transformSourceFile(node: SourceFile) { - if (isDeclarationFile(node)) { + if (isDeclarationFile(node) + || !(isExternalModule(node) + || compilerOptions.isolatedModules)) { return node; } - if (isExternalModule(node) || compilerOptions.isolatedModules) { - currentSourceFile = node; - currentNode = node; + const id = getOriginalNodeId(node); + currentSourceFile = node; + enclosingBlockScopedContainer = node; - // Perform the transformation. - const updated = transformSystemModuleWorker(node); - aggregateTransformFlags(updated); - - currentSourceFile = undefined; - externalImports = undefined; - exportSpecifiers = undefined; - exportEquals = undefined; - hasExportStarsToExportValues = false; - exportFunctionForFile = undefined; - contextObjectForFile = undefined; - exportedLocalNames = undefined; - exportedFunctionDeclarations = undefined; - return updated; - } - - return node; - } - - function transformSystemModuleWorker(node: SourceFile) { // System modules have the following shape: // // System.register(['dep-1', ... 'dep-n'], function(exports) {/* module body function */}) @@ -87,67 +71,103 @@ namespace ts { // // The only exception in this rule is postfix unary operators, // see comment to 'substitutePostfixUnaryExpression' for more details - Debug.assert(!exportFunctionForFile); // Collect information about the external module and dependency groups. - ({ externalImports, exportSpecifiers, exportEquals, hasExportStarsToExportValues } = collectExternalModuleInfo(node)); + moduleInfo = moduleInfoMap[id] = collectExternalModuleInfo(node, resolver); // Make sure that the name of the 'exports' function does not conflict with // existing identifiers. - exportFunctionForFile = createUniqueName("exports"); - contextObjectForFile = createUniqueName("context"); - - exportFunctionForFileMap[getOriginalNodeId(node)] = exportFunctionForFile; - - const dependencyGroups = collectDependencyGroups(externalImports); - - const statements: Statement[] = []; + exportFunction = exportFunctionsMap[id] = createUniqueName("exports"); + contextObject = createUniqueName("context"); // Add the body of the module. - addSystemModuleBody(statements, node, dependencyGroups); - - const moduleName = tryGetModuleNameFromFile(node, host, compilerOptions); - const dependencies = createArrayLiteral(map(dependencyGroups, getNameOfDependencyGroup)); - const body = createFunctionExpression( + const dependencyGroups = collectDependencyGroups(moduleInfo.externalImports); + const moduleBodyFunction = createFunctionExpression( /*modifiers*/ undefined, /*asteriskToken*/ undefined, /*name*/ undefined, /*typeParameters*/ undefined, [ - createParameter(exportFunctionForFile), - createParameter(contextObjectForFile) + createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, exportFunction), + createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, contextObject) ], /*type*/ undefined, - setEmitFlags( - createBlock(statements, /*location*/ undefined, /*multiLine*/ true), - EmitFlags.EmitEmitHelpers - ) + createSystemModuleBody(node, dependencyGroups) ); // Write the call to `System.register` // Clear the emit-helpers flag for later passes since we'll have already used it in the module body // So the helper will be emit at the correct position instead of at the top of the source-file - return updateSourceFile(node, [ - createStatement( - createCall( - createPropertyAccess(createIdentifier("System"), "register"), - /*typeArguments*/ undefined, - moduleName - ? [moduleName, dependencies, body] - : [dependencies, body] + const moduleName = tryGetModuleNameFromFile(node, host, compilerOptions); + const dependencies = createArrayLiteral(map(dependencyGroups, dependencyGroup => dependencyGroup.name)); + const updated = updateSourceFileNode( + node, + createNodeArray([ + createStatement( + createCall( + createPropertyAccess(createIdentifier("System"), "register"), + /*typeArguments*/ undefined, + moduleName + ? [moduleName, dependencies, moduleBodyFunction] + : [dependencies, moduleBodyFunction] + ) ) - ) - ], /*nodeEmitFlags*/ ~EmitFlags.EmitEmitHelpers & getEmitFlags(node)); + ], node.statements) + ); + + setEmitFlags(updated, getEmitFlags(node) & ~EmitFlags.EmitEmitHelpers); + + if (noSubstitution) { + noSubstitutionMap[id] = noSubstitution; + noSubstitution = undefined; + } + + currentSourceFile = undefined; + moduleInfo = undefined; + exportFunction = undefined; + contextObject = undefined; + hoistedStatements = undefined; + enclosingBlockScopedContainer = undefined; + + return aggregateTransformFlags(updated); + } + + /** + * Collects the dependency groups for this files imports. + * + * @param externalImports The imports for the file. + */ + function collectDependencyGroups(externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[]) { + const groupIndices = createMap(); + const dependencyGroups: DependencyGroup[] = []; + for (let i = 0; i < externalImports.length; i++) { + const externalImport = externalImports[i]; + const externalModuleName = getExternalModuleNameLiteral(externalImport, currentSourceFile, host, resolver, compilerOptions); + const text = externalModuleName.text; + if (hasProperty(groupIndices, text)) { + // deduplicate/group entries in dependency list by the dependency name + const groupIndex = groupIndices[text]; + dependencyGroups[groupIndex].externalImports.push(externalImport); + } + else { + groupIndices[text] = dependencyGroups.length; + dependencyGroups.push({ + name: externalModuleName, + externalImports: [externalImport] + }); + } + } + + return dependencyGroups; } /** * Adds the statements for the module body function for the source file. * - * @param statements The output statements for the module body. * @param node The source file for the module. - * @param statementOffset The offset at which to begin visiting the statements of the SourceFile. + * @param dependencyGroups The grouped dependencies of the module. */ - function addSystemModuleBody(statements: Statement[], node: SourceFile, dependencyGroups: DependencyGroup[]) { + function createSystemModuleBody(node: SourceFile, dependencyGroups: DependencyGroup[]) { // Shape of the body in system modules: // // function (exports) { @@ -175,10 +195,9 @@ namespace ts { // Will be transformed to: // // function(exports) { - // var file_1; // local alias - // var y; // function foo() { return y + file_1.x(); } // exports("foo", foo); + // var file_1, y; // return { // setters: [ // function(v) { file_1 = v } @@ -190,13 +209,15 @@ namespace ts { // }; // } + const statements: Statement[] = []; + // We start a new lexical environment in this function body, but *not* in the // body of the execute function. This allows us to emit temporary declarations // only in the outer module body and not in the inner one. startLexicalEnvironment(); // Add any prologue directives. - const statementOffset = addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, visitSourceElement); + const statementOffset = addPrologueDirectives(statements, node.statements, /*ensureUseStrict*/ !compilerOptions.noImplicitUseStrict, sourceElementVisitor); // var __moduleName = context_1 && context_1.id; statements.push( @@ -207,8 +228,8 @@ namespace ts { "__moduleName", /*type*/ undefined, createLogicalAnd( - contextObjectForFile, - createPropertyAccess(contextObjectForFile, "id") + contextObject, + createPropertyAccess(contextObject, "id") ) ) ]) @@ -220,27 +241,23 @@ namespace ts { // as we both emit transformations as well as aggregate some data used when creating // setters. This allows us to reduce the number of times we need to loop through the // statements of the source file. - const executeStatements = visitNodes(node.statements, visitSourceElement, isStatement, statementOffset); - - // We emit the lexical environment (hoisted variables and function declarations) - // early to align roughly with our previous emit output. - // Two key differences in this approach are: - // - Temporary variables will appear at the top rather than at the bottom of the file - // - Calls to the exporter for exported function declarations are grouped after - // the declarations. - addRange(statements, endLexicalEnvironment()); + const executeStatements = visitNodes(node.statements, sourceElementVisitor, isStatement, statementOffset); // Emit early exports for function declarations. - addRange(statements, exportedFunctionDeclarations); + addRange(statements, hoistedStatements); + + // We emit hoisted variables early to align roughly with our previous emit output. + // Two key differences in this approach are: + // - Temporary variables will appear at the top rather than at the bottom of the file + addRange(statements, endLexicalEnvironment()); const exportStarFunction = addExportStarIfNeeded(statements); - statements.push( createReturn( setMultiLine( createObjectLiteral([ createPropertyAssignment("setters", - generateSetters(exportStarFunction, dependencyGroups) + createSettersArray(exportStarFunction, dependencyGroups) ), createPropertyAssignment("execute", createFunctionExpression( @@ -262,24 +279,34 @@ namespace ts { ) ) ); + + const body = createBlock(statements, /*location*/ undefined, /*multiLine*/ true); + setEmitFlags(body, EmitFlags.EmitEmitHelpers); + return body; } + /** + * Adds an exportStar function to a statement list if it is needed for the file. + * + * @param statements A statement list. + */ function addExportStarIfNeeded(statements: Statement[]) { - if (!hasExportStarsToExportValues) { + if (!moduleInfo.hasExportStarsToExportValues) { return; } + // when resolving exports local exported entries/indirect exported entries in the module // should always win over entries with similar names that were added via star exports // to support this we store names of local/indirect exported entries in a set. // this set is used to filter names brought by star expors. // local names set should only be added if we have anything exported - if (!exportedLocalNames && isEmpty(exportSpecifiers)) { + if (!moduleInfo.exportedNames && isEmpty(moduleInfo.exportSpecifiers)) { // no exported declarations (export var ...) or export specifiers (export {x}) // check if we have any non star export declarations. let hasExportDeclarationWithExportClause = false; - for (const externalImport of externalImports) { - if (externalImport.kind === SyntaxKind.ExportDeclaration && (externalImport).exportClause) { + for (const externalImport of moduleInfo.externalImports) { + if (externalImport.kind === SyntaxKind.ExportDeclaration && externalImport.exportClause) { hasExportDeclarationWithExportClause = true; break; } @@ -287,24 +314,30 @@ namespace ts { if (!hasExportDeclarationWithExportClause) { // we still need to emit exportStar helper - return addExportStarFunction(statements, /*localNames*/ undefined); + const exportStarFunction = createExportStarFunction(/*localNames*/ undefined); + statements.push(exportStarFunction); + return exportStarFunction.name; } } const exportedNames: ObjectLiteralElementLike[] = []; - if (exportedLocalNames) { - for (const exportedLocalName of exportedLocalNames) { + if (moduleInfo.exportedNames) { + for (const exportedLocalName of moduleInfo.exportedNames) { + if (exportedLocalName.text === "default") { + continue; + } + // write name of exported declaration, i.e 'export var x...' exportedNames.push( createPropertyAssignment( - createLiteral(exportedLocalName.text), + createLiteral(exportedLocalName), createLiteral(true) ) ); } } - for (const externalImport of externalImports) { + for (const externalImport of moduleInfo.externalImports) { if (externalImport.kind !== SyntaxKind.ExportDeclaration) { continue; } @@ -340,14 +373,90 @@ namespace ts { ) ); - return addExportStarFunction(statements, exportedNamesStorageRef); + const exportStarFunction = createExportStarFunction(exportedNamesStorageRef); + statements.push(exportStarFunction); + return exportStarFunction.name; } /** - * Emits a setter callback for each dependency group. - * @param write The callback used to write each callback. + * Creates an exportStar function for the file, with an optional set of excluded local + * names. + * + * @param localNames An optional reference to an object containing a set of excluded local + * names. */ - function generateSetters(exportStarFunction: Identifier, dependencyGroups: DependencyGroup[]) { + function createExportStarFunction(localNames: Identifier | undefined) { + const exportStarFunction = createUniqueName("exportStar"); + const m = createIdentifier("m"); + const n = createIdentifier("n"); + const exports = createIdentifier("exports"); + let condition: Expression = createStrictInequality(n, createLiteral("default")); + if (localNames) { + condition = createLogicalAnd( + condition, + createLogicalNot(createHasOwnProperty(localNames, n)) + ); + } + + return createFunctionDeclaration( + /*decorators*/ undefined, + /*modifiers*/ undefined, + /*asteriskToken*/ undefined, + exportStarFunction, + /*typeParameters*/ undefined, + [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, m)], + /*type*/ undefined, + createBlock([ + createVariableStatement( + /*modifiers*/ undefined, + createVariableDeclarationList([ + createVariableDeclaration( + exports, + /*type*/ undefined, + createObjectLiteral([]) + ) + ]) + ), + createForIn( + createVariableDeclarationList([ + createVariableDeclaration(n, /*type*/ undefined) + ]), + m, + createBlock([ + setEmitFlags( + createIf( + condition, + createStatement( + createAssignment( + createElementAccess(exports, n), + createElementAccess(m, n) + ) + ) + ), + EmitFlags.SingleLine + ) + ]) + ), + createStatement( + createCall( + exportFunction, + /*typeArguments*/ undefined, + [exports] + ) + ) + ], + /*location*/ undefined, + /*multiline*/ true) + ); + } + + /** + * Creates an array setter callbacks for each dependency group. + * + * @param exportStarFunction A reference to an exportStarFunction for the file. + * @param dependencyGroups An array of grouped dependencies. + */ + function createSettersArray(exportStarFunction: Identifier, dependencyGroups: DependencyGroup[]) { const setters: Expression[] = []; for (const group of dependencyGroups) { // derive a unique name for parameter from the first named entry in the group @@ -402,7 +511,7 @@ namespace ts { statements.push( createStatement( createCall( - exportFunctionForFile, + exportFunction, /*typeArguments*/ undefined, [createObjectLiteral(properties, /*location*/ undefined, /*multiline*/ true)] ) @@ -435,7 +544,7 @@ namespace ts { /*asteriskToken*/ undefined, /*name*/ undefined, /*typeParameters*/ undefined, - [createParameter(parameterName)], + [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, parameterName)], /*type*/ undefined, createBlock(statements, /*location*/ undefined, /*multiLine*/ true) ) @@ -445,7 +554,16 @@ namespace ts { return createArrayLiteral(setters, /*location*/ undefined, /*multiLine*/ true); } - function visitSourceElement(node: Node): VisitResult { + // + // Top-level Source Element Visitors + // + + /** + * Visit source elements at the top-level of a module. + * + * @param node The node to visit. + */ + function sourceElementVisitor(node: Node): VisitResult { switch (node.kind) { case SyntaxKind.ImportDeclaration: return visitImportDeclaration(node); @@ -454,39 +572,562 @@ namespace ts { return visitImportEqualsDeclaration(node); case SyntaxKind.ExportDeclaration: - return visitExportDeclaration(node); + // ExportDeclarations are elided as they are handled via + // `appendExportsOfDeclaration`. + return undefined; case SyntaxKind.ExportAssignment: return visitExportAssignment(node); default: - return visitNestedNode(node); + return nestedElementVisitor(node); } } - function visitNestedNode(node: Node): VisitResult { - const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; - const savedCurrentParent = currentParent; - const savedCurrentNode = currentNode; - - const currentGrandparent = currentParent; - currentParent = currentNode; - currentNode = node; - - if (currentParent && isBlockScope(currentParent, currentGrandparent)) { - enclosingBlockScopedContainer = currentParent; + /** + * Visits an ImportDeclaration node. + * + * @param node The node to visit. + */ + function visitImportDeclaration(node: ImportDeclaration): VisitResult { + let statements: Statement[]; + if (node.importClause) { + hoistVariableDeclaration(getLocalNameForExternalImport(node, currentSourceFile)); } - const result = visitNestedNodeWorker(node); + if (hasAssociatedEndOfDeclarationMarker(node)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfImportDeclaration(deferredExports[id], node); + } + else { + statements = appendExportsOfImportDeclaration(statements, node); + } - enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; - currentParent = savedCurrentParent; - currentNode = savedCurrentNode; - - return result; + return singleOrMany(statements); } - function visitNestedNodeWorker(node: Node): VisitResult { + /** + * Visits an ImportEqualsDeclaration node. + * + * @param node The node to visit. + */ + function visitImportEqualsDeclaration(node: ImportEqualsDeclaration): VisitResult { + Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer."); + + let statements: Statement[]; + hoistVariableDeclaration(getLocalNameForExternalImport(node, currentSourceFile)); + + if (hasAssociatedEndOfDeclarationMarker(node)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfImportEqualsDeclaration(deferredExports[id], node); + } + else { + statements = appendExportsOfImportEqualsDeclaration(statements, node); + } + + return singleOrMany(statements); + } + + /** + * Visits an ExportAssignment node. + * + * @param node The node to visit. + */ + function visitExportAssignment(node: ExportAssignment): VisitResult { + if (node.isExportEquals) { + // Elide `export=` as it is illegal in a SystemJS module. + return undefined; + } + + const expression = visitNode(node.expression, destructuringVisitor, isExpression); + const original = node.original; + if (original && hasAssociatedEndOfDeclarationMarker(original)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportStatement(deferredExports[id], createIdentifier("default"), expression, /*allowComments*/ true); + } + else { + return createExportStatement(createIdentifier("default"), expression, /*allowComments*/ true); + } + } + + /** + * Visits a FunctionDeclaration, hoisting it to the outer module body function. + * + * @param node The node to visit. + */ + function visitFunctionDeclaration(node: FunctionDeclaration): VisitResult { + if (hasModifier(node, ModifierFlags.Export)) { + hoistedStatements = append(hoistedStatements, + updateFunctionDeclaration( + node, + node.decorators, + visitNodes(node.modifiers, modifierVisitor, isModifier), + getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true), + /*typeParameters*/ undefined, + visitNodes(node.parameters, destructuringVisitor, isParameterDeclaration), + /*type*/ undefined, + visitNode(node.body, destructuringVisitor, isBlock))); + } + else { + hoistedStatements = append(hoistedStatements, node); + } + + if (hasAssociatedEndOfDeclarationMarker(node)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node); + } + else { + hoistedStatements = appendExportsOfHoistedDeclaration(hoistedStatements, node); + } + + return undefined; + } + + /** + * Visits a ClassDeclaration, hoisting its name to the outer module body function. + * + * @param node The node to visit. + */ + function visitClassDeclaration(node: ClassDeclaration): VisitResult { + let statements: Statement[]; + + // Hoist the name of the class declaration to the outer module body function. + const name = getLocalName(node); + hoistVariableDeclaration(name); + + // Rewrite the class declaration into an assignment of a class expression. + statements = append(statements, + createStatement( + createAssignment( + name, + createClassExpression( + /*modifiers*/ undefined, + node.name, + /*typeParameters*/ undefined, + visitNodes(node.heritageClauses, destructuringVisitor, isHeritageClause), + visitNodes(node.members, destructuringVisitor, isClassElement), + /*location*/ node + ) + ), + /*location*/ node + ) + ); + + if (hasAssociatedEndOfDeclarationMarker(node)) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node); + } + else { + statements = appendExportsOfHoistedDeclaration(statements, node); + } + + return singleOrMany(statements); + } + + /** + * Visits a variable statement, hoisting declared names to the top-level module body. + * Each declaration is rewritten into an assignment expression. + * + * @param node The node to visit. + */ + function visitVariableStatement(node: VariableStatement): VisitResult { + if (!shouldHoistVariableDeclarationList(node.declarationList)) { + return visitNode(node, destructuringVisitor, isStatement); + } + + let expressions: Expression[]; + const isExportedDeclaration = hasModifier(node, ModifierFlags.Export); + const isMarkedDeclaration = hasAssociatedEndOfDeclarationMarker(node); + for (const variable of node.declarationList.declarations) { + if (variable.initializer) { + expressions = append(expressions, transformInitializedVariable(variable, isExportedDeclaration && !isMarkedDeclaration)); + } + else { + hoistBindingElement(variable); + } + } + + let statements: Statement[]; + if (expressions) { + statements = append(statements, createStatement(inlineExpressions(expressions), /*location*/ node)); + } + + if (isMarkedDeclaration) { + // Defer exports until we encounter an EndOfDeclarationMarker node + const id = getOriginalNodeId(node); + deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node, isExportedDeclaration); + } + else { + statements = appendExportsOfVariableStatement(statements, node, /*exportSelf*/ false); + } + + return singleOrMany(statements); + } + + /** + * Hoists the declared names of a VariableDeclaration or BindingElement. + * + * @param node The declaration to hoist. + */ + function hoistBindingElement(node: VariableDeclaration | BindingElement): void { + if (isBindingPattern(node.name)) { + for (const element of node.name.elements) { + if (!isOmittedExpression(element)) { + hoistBindingElement(element); + } + } + } + else { + hoistVariableDeclaration(getSynthesizedClone(node.name)); + } + } + + /** + * Determines whether a VariableDeclarationList should be hoisted. + * + * @param node The node to test. + */ + function shouldHoistVariableDeclarationList(node: VariableDeclarationList) { + // hoist only non-block scoped declarations or block scoped declarations parented by source file + return (getEmitFlags(node) & EmitFlags.NoHoisting) === 0 + && (enclosingBlockScopedContainer.kind === SyntaxKind.SourceFile + || (getOriginalNode(node).flags & NodeFlags.BlockScoped) === 0); + } + + /** + * Transform an initialized variable declaration into an expression. + * + * @param node The node to transform. + * @param isExportedDeclaration A value indicating whether the variable is exported. + */ + function transformInitializedVariable(node: VariableDeclaration, isExportedDeclaration: boolean): Expression { + const createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment; + return isBindingPattern(node.name) + ? flattenVariableDestructuringToExpression(node, hoistVariableDeclaration, createAssignment, destructuringVisitor) + : createAssignment(node.name, visitNode(node.initializer, destructuringVisitor, isExpression)); + } + + /** + * Creates an assignment expression for an exported variable declaration. + * + * @param name The name of the variable. + * @param value The value of the variable's initializer. + * @param location The source map location for the assignment. + */ + function createExportedVariableAssignment(name: Identifier, value: Expression, location?: TextRange) { + return createVariableAssignment(name, value, location, /*isExportedDeclaration*/ true); + } + + /** + * Creates an assignment expression for a non-exported variable declaration. + * + * @param name The name of the variable. + * @param value The value of the variable's initializer. + * @param location The source map location for the assignment. + */ + function createNonExportedVariableAssignment(name: Identifier, value: Expression, location?: TextRange) { + return createVariableAssignment(name, value, location, /*isExportedDeclaration*/ false); + } + + /** + * Creates an assignment expression for a variable declaration. + * + * @param name The name of the variable. + * @param value The value of the variable's initializer. + * @param location The source map location for the assignment. + * @param isExportedDeclaration A value indicating whether the variable is exported. + */ + function createVariableAssignment(name: Identifier, value: Expression, location: TextRange, isExportedDeclaration: boolean) { + hoistVariableDeclaration(getSynthesizedClone(name)); + return isExportedDeclaration + ? createExportExpression(name, preventSubstitution(createAssignment(name, value, location))) + : preventSubstitution(createAssignment(name, value, location)); + } + + /** + * Visits a MergeDeclarationMarker used as a placeholder for the beginning of a merged + * and transformed declaration. + * + * @param node The node to visit. + */ + function visitMergeDeclarationMarker(node: MergeDeclarationMarker): VisitResult { + // For an EnumDeclaration or ModuleDeclaration that merges with a preceeding + // declaration we do not emit a leading variable declaration. To preserve the + // begin/end semantics of the declararation and to properly handle exports + // we wrapped the leading variable declaration in a `MergeDeclarationMarker`. + // + // To balance the declaration, we defer the exports of the elided variable + // statement until we visit this declaration's `EndOfDeclarationMarker`. + if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === SyntaxKind.VariableStatement) { + const id = getOriginalNodeId(node); + const isExportedDeclaration = hasModifier(node.original, ModifierFlags.Export); + deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration); + } + + return node; + } + + /** + * Determines whether a node has an associated EndOfDeclarationMarker. + * + * @param node The node to test. + */ + function hasAssociatedEndOfDeclarationMarker(node: Node) { + return (getEmitFlags(node) & EmitFlags.HasEndOfDeclarationMarker) !== 0; + } + + /** + * Visits a DeclarationMarker used as a placeholder for the end of a transformed + * declaration. + * + * @param node The node to visit. + */ + function visitEndOfDeclarationMarker(node: EndOfDeclarationMarker): VisitResult { + // For some transformations we emit an `EndOfDeclarationMarker` to mark the actual + // end of the transformed declaration. We use this marker to emit any deferred exports + // of the declaration. + const id = getOriginalNodeId(node); + const statements = deferredExports[id]; + if (statements) { + delete deferredExports[id]; + return append(statements, node); + } + + return node; + } + + /** + * Appends the exports of an ImportDeclaration to a statement list, returning the + * statement list. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param decl The declaration whose exports are to be recorded. + */ + function appendExportsOfImportDeclaration(statements: Statement[], decl: ImportDeclaration) { + if (moduleInfo.exportEquals) { + return statements; + } + + const importClause = decl.importClause; + if (!importClause) { + return statements; + } + + if (importClause.name) { + statements = appendExportsOfDeclaration(statements, importClause); + } + + const namedBindings = importClause.namedBindings; + if (namedBindings) { + switch (namedBindings.kind) { + case SyntaxKind.NamespaceImport: + statements = appendExportsOfDeclaration(statements, namedBindings); + break; + + case SyntaxKind.NamedImports: + for (const importBinding of namedBindings.elements) { + statements = appendExportsOfDeclaration(statements, importBinding); + } + + break; + } + } + + return statements; + } + + /** + * Appends the export of an ImportEqualsDeclaration to a statement list, returning the + * statement list. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param decl The declaration whose exports are to be recorded. + */ + function appendExportsOfImportEqualsDeclaration(statements: Statement[], decl: ImportEqualsDeclaration): Statement[] | undefined { + if (moduleInfo.exportEquals) { + return statements; + } + + return appendExportsOfDeclaration(statements, decl); + } + + /** + * Appends the exports of a VariableStatement to a statement list, returning the statement + * list. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param node The VariableStatement whose exports are to be recorded. + * @param exportSelf A value indicating whether to also export each VariableDeclaration of + * `nodes` declaration list. + */ + function appendExportsOfVariableStatement(statements: Statement[] | undefined, node: VariableStatement, exportSelf: boolean): Statement[] | undefined { + if (moduleInfo.exportEquals) { + return statements; + } + + for (const decl of node.declarationList.declarations) { + if (decl.initializer || exportSelf) { + statements = appendExportsOfBindingElement(statements, decl, exportSelf); + } + } + + return statements; + } + + /** + * Appends the exports of a VariableDeclaration or BindingElement to a statement list, + * returning the statement list. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param decl The declaration whose exports are to be recorded. + * @param exportSelf A value indicating whether to also export the declaration itself. + */ + function appendExportsOfBindingElement(statements: Statement[] | undefined, decl: VariableDeclaration | BindingElement, exportSelf: boolean): Statement[] | undefined { + if (moduleInfo.exportEquals) { + return statements; + } + + if (isBindingPattern(decl.name)) { + for (const element of decl.name.elements) { + if (!isOmittedExpression(element)) { + statements = appendExportsOfBindingElement(statements, element, exportSelf); + } + } + } + else if (!isGeneratedIdentifier(decl.name)) { + let excludeName: string; + if (exportSelf) { + statements = appendExportStatement(statements, decl.name, getLocalName(decl)); + excludeName = decl.name.text; + } + + statements = appendExportsOfDeclaration(statements, decl, excludeName); + } + + return statements; + } + + /** + * Appends the exports of a ClassDeclaration or FunctionDeclaration to a statement list, + * returning the statement list. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param decl The declaration whose exports are to be recorded. + */ + function appendExportsOfHoistedDeclaration(statements: Statement[] | undefined, decl: ClassDeclaration | FunctionDeclaration): Statement[] | undefined { + if (moduleInfo.exportEquals) { + return statements; + } + + let excludeName: string; + if (hasModifier(decl, ModifierFlags.Export)) { + const exportName = hasModifier(decl, ModifierFlags.Default) ? createLiteral("default") : decl.name; + statements = appendExportStatement(statements, exportName, getLocalName(decl)); + excludeName = exportName.text; + } + + if (decl.name) { + statements = appendExportsOfDeclaration(statements, decl, excludeName); + } + + return statements; + } + + /** + * Appends the exports of a declaration to a statement list, returning the statement list. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param decl The declaration to export. + * @param excludeName An optional name to exclude from exports. + */ + function appendExportsOfDeclaration(statements: Statement[] | undefined, decl: Declaration, excludeName?: string): Statement[] | undefined { + if (moduleInfo.exportEquals) { + return statements; + } + + const name = getDeclarationName(decl); + const exportSpecifiers = moduleInfo.exportSpecifiers[name.text]; + if (exportSpecifiers) { + for (const exportSpecifier of exportSpecifiers) { + if (exportSpecifier.name.text !== excludeName) { + statements = appendExportStatement(statements, exportSpecifier.name, name); + } + } + } + return statements; + } + + /** + * Appends the down-level representation of an export to a statement list, returning the + * statement list. + * + * @param statements A statement list to which the down-level export statements are to be + * appended. If `statements` is `undefined`, a new array is allocated if statements are + * appended. + * @param exportName The name of the export. + * @param expression The expression to export. + * @param allowComments Whether to allow comments on the export. + */ + function appendExportStatement(statements: Statement[] | undefined, exportName: Identifier | StringLiteral, expression: Expression, allowComments?: boolean): Statement[] | undefined { + statements = append(statements, createExportStatement(exportName, expression, allowComments)); + return statements; + } + + /** + * Creates a call to the current file's export function to export a value. + * + * @param name The bound name of the export. + * @param value The exported value. + * @param allowComments An optional value indicating whether to emit comments for the statement. + */ + function createExportStatement(name: Identifier | StringLiteral, value: Expression, allowComments?: boolean) { + const statement = createStatement(createExportExpression(name, value)); + startOnNewLine(statement); + if (!allowComments) { + setEmitFlags(statement, EmitFlags.NoComments); + } + + return statement; + } + + /** + * Creates a call to the current file's export function to export a value. + * + * @param name The bound name of the export. + * @param value The exported value. + */ + function createExportExpression(name: Identifier | StringLiteral, value: Expression) { + const exportName = isIdentifier(name) ? createLiteral(name) : name; + return createCall(exportFunction, /*typeArguments*/ undefined, [exportName, value]); + } + + // + // Top-Level or Nested Source Element Visitors + // + + /** + * Visit nested elements at the top-level of a module. + * + * @param node The node to visit. + */ + function nestedElementVisitor(node: Node): VisitResult { switch (node.kind) { case SyntaxKind.VariableStatement: return visitVariableStatement(node); @@ -539,374 +1180,171 @@ namespace ts { case SyntaxKind.Block: return visitBlock(node); - case SyntaxKind.ExpressionStatement: - return visitExpressionStatement(node); + case SyntaxKind.MergeDeclarationMarker: + return visitMergeDeclarationMarker(node); + + case SyntaxKind.EndOfDeclarationMarker: + return visitEndOfDeclarationMarker(node); default: - return node; + return destructuringVisitor(node); } } - function visitImportDeclaration(node: ImportDeclaration): Node { - if (node.importClause && contains(externalImports, node)) { - hoistVariableDeclaration(getLocalNameForExternalImport(node, currentSourceFile)); - } - - return undefined; - } - - function visitImportEqualsDeclaration(node: ImportEqualsDeclaration): Node { - if (contains(externalImports, node)) { - hoistVariableDeclaration(getLocalNameForExternalImport(node, currentSourceFile)); - } - - // NOTE(rbuckton): Do we support export import = require('') in System? - return undefined; - } - - function visitExportDeclaration(node: ExportDeclaration): VisitResult { - if (!node.moduleSpecifier) { - const statements: Statement[] = []; - addRange(statements, map(node.exportClause.elements, visitExportSpecifier)); - return statements; - } - - return undefined; - } - - function visitExportSpecifier(specifier: ExportSpecifier): Statement { - recordExportName(specifier.name); - return createExportStatement( - specifier.name, - specifier.propertyName || specifier.name - ); - } - - function visitExportAssignment(node: ExportAssignment): Statement { - if (node.isExportEquals) { - // Elide `export=` as it is illegal in a SystemJS module. - return undefined; - } - - return createExportStatement( - createLiteral("default"), - node.expression - ); - } - - /** - * Visits a variable statement, hoisting declared names to the top-level module body. - * Each declaration is rewritten into an assignment expression. - * - * @param node The variable statement to visit. - */ - function visitVariableStatement(node: VariableStatement): VisitResult { - // hoist only non-block scoped declarations or block scoped declarations parented by source file - const shouldHoist = - ((getCombinedNodeFlags(getOriginalNode(node.declarationList)) & NodeFlags.BlockScoped) == 0) || - enclosingBlockScopedContainer.kind === SyntaxKind.SourceFile; - if (!shouldHoist) { - return node; - } - const isExported = hasModifier(node, ModifierFlags.Export); - const expressions: Expression[] = []; - for (const variable of node.declarationList.declarations) { - const visited = transformVariable(variable, isExported); - if (visited) { - expressions.push(visited); - } - } - - if (expressions.length) { - return createStatement(inlineExpressions(expressions), node); - } - - return undefined; - } - - /** - * Transforms a VariableDeclaration into one or more assignment expressions. - * - * @param node The VariableDeclaration to transform. - * @param isExported A value used to indicate whether the containing statement was exported. - */ - function transformVariable(node: VariableDeclaration, isExported: boolean): VariableDeclaration | Expression { - // Hoist any bound names within the declaration. - hoistBindingElement(node, isExported); - - if (!node.initializer) { - // If the variable has no initializer, ignore it. - return; - } - - const name = node.name; - if (isIdentifier(name)) { - // If the variable has an IdentifierName, write out an assignment expression in its place. - return createAssignment(name, node.initializer); - } - else { - // If the variable has a BindingPattern, flatten the variable into multiple assignment expressions. - return flattenVariableDestructuringToExpression(node, hoistVariableDeclaration); - } - } - - /** - * Visits a FunctionDeclaration, hoisting it to the outer module body function. - * - * @param node The function declaration to visit. - */ - function visitFunctionDeclaration(node: FunctionDeclaration): Node { - if (hasModifier(node, ModifierFlags.Export)) { - // If the function is exported, ensure it has a name and rewrite the function without any export flags. - const name = node.name || getGeneratedNameForNode(node); - // Keep async modifier for ES2017 transformer - const isAsync = hasModifier(node, ModifierFlags.Async); - const newNode = createFunctionDeclaration( - /*decorators*/ undefined, - isAsync ? [createNode(SyntaxKind.AsyncKeyword)] : undefined, - node.asteriskToken, - name, - /*typeParameters*/ undefined, - node.parameters, - /*type*/ undefined, - node.body, - /*location*/ node); - - // Record a declaration export in the outer module body function. - recordExportedFunctionDeclaration(node); - - if (!hasModifier(node, ModifierFlags.Default)) { - recordExportName(name); - } - - setOriginalNode(newNode, node); - node = newNode; - } - - // Hoist the function declaration to the outer module body function. - hoistFunctionDeclaration(node); - return undefined; - } - - function visitExpressionStatement(node: ExpressionStatement): VisitResult { - const originalNode = getOriginalNode(node); - if ((originalNode.kind === SyntaxKind.ModuleDeclaration || originalNode.kind === SyntaxKind.EnumDeclaration) && hasModifier(originalNode, ModifierFlags.Export)) { - const name = getDeclarationName(originalNode); - // We only need to hoistVariableDeclaration for EnumDeclaration - // as ModuleDeclaration is already hoisted when the transformer call visitVariableStatement - // which then call transformsVariable for each declaration in declarationList - if (originalNode.kind === SyntaxKind.EnumDeclaration) { - hoistVariableDeclaration(name); - } - return [ - node, - createExportStatement(name, name) - ]; - } - return node; - } - - /** - * Visits a ClassDeclaration, hoisting its name to the outer module body function. - * - * @param node The class declaration to visit. - */ - function visitClassDeclaration(node: ClassDeclaration): VisitResult { - // Hoist the name of the class declaration to the outer module body function. - const name = getDeclarationName(node); - hoistVariableDeclaration(name); - - const statements: Statement[] = []; - - // Rewrite the class declaration into an assignment of a class expression. - statements.push( - createStatement( - createAssignment( - name, - createClassExpression( - /*modifiers*/ undefined, - node.name, - /*typeParameters*/ undefined, - node.heritageClauses, - node.members, - /*location*/ node - ) - ), - /*location*/ node - ) - ); - - // If the class was exported, write a declaration export to the inner module body function. - if (hasModifier(node, ModifierFlags.Export)) { - if (!hasModifier(node, ModifierFlags.Default)) { - recordExportName(name); - } - - statements.push(createDeclarationExport(node)); - } - - return statements; - } - - function shouldHoistLoopInitializer(node: VariableDeclarationList | Expression) { - return isVariableDeclarationList(node) && (getCombinedNodeFlags(node) & NodeFlags.BlockScoped) === 0; - } - /** * Visits the body of a ForStatement to hoist declarations. * - * @param node The statement to visit. + * @param node The node to visit. */ - function visitForStatement(node: ForStatement): ForStatement { - const initializer = node.initializer; - if (shouldHoistLoopInitializer(initializer)) { - const expressions: Expression[] = []; - for (const variable of (initializer).declarations) { - const visited = transformVariable(variable, /*isExported*/ false); - if (visited) { - expressions.push(visited); - } - }; + function visitForStatement(node: ForStatement): VisitResult { + const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; + enclosingBlockScopedContainer = node; - return createFor( - expressions.length - ? inlineExpressions(expressions) - : createSynthesizedNode(SyntaxKind.OmittedExpression), - node.condition, - node.incrementor, - visitNode(node.statement, visitNestedNode, isStatement), - /*location*/ node - ); - } - else { - return visitEachChild(node, visitNestedNode, context); - } - } + node = updateFor( + node, + visitForInitializer(node.initializer), + visitNode(node.condition, destructuringVisitor, isExpression, /*optional*/ true), + visitNode(node.incrementor, destructuringVisitor, isExpression, /*optional*/ true), + visitNode(node.statement, nestedElementVisitor, isStatement) + ); - /** - * Transforms and hoists the declaration list of a ForInStatement or ForOfStatement into an expression. - * - * @param node The decalaration list to transform. - */ - function transformForBinding(node: VariableDeclarationList): Expression { - const firstDeclaration = firstOrUndefined(node.declarations); - hoistBindingElement(firstDeclaration, /*isExported*/ false); - - const name = firstDeclaration.name; - return isIdentifier(name) - ? name - : flattenVariableDestructuringToExpression(firstDeclaration, hoistVariableDeclaration); + enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; + return node; } /** * Visits the body of a ForInStatement to hoist declarations. * - * @param node The statement to visit. + * @param node The node to visit. */ - function visitForInStatement(node: ForInStatement): ForInStatement { - const initializer = node.initializer; - if (shouldHoistLoopInitializer(initializer)) { - const updated = getMutableClone(node); - updated.initializer = transformForBinding(initializer); - updated.statement = visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock); - return updated; - } - else { - return visitEachChild(node, visitNestedNode, context); - } + function visitForInStatement(node: ForInStatement): VisitResult { + const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; + enclosingBlockScopedContainer = node; + + node = updateForIn( + node, + visitForInitializer(node.initializer), + visitNode(node.expression, destructuringVisitor, isExpression), + visitNode(node.statement, nestedElementVisitor, isStatement, /*optional*/ false, liftToBlock) + ); + + enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; + return node; } /** * Visits the body of a ForOfStatement to hoist declarations. * - * @param node The statement to visit. + * @param node The node to visit. */ - function visitForOfStatement(node: ForOfStatement): ForOfStatement { - const initializer = node.initializer; - if (shouldHoistLoopInitializer(initializer)) { - const updated = getMutableClone(node); - updated.initializer = transformForBinding(initializer); - updated.statement = visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock); - return updated; + function visitForOfStatement(node: ForOfStatement): VisitResult { + const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; + enclosingBlockScopedContainer = node; + + node = updateForOf( + node, + visitForInitializer(node.initializer), + visitNode(node.expression, destructuringVisitor, isExpression), + visitNode(node.statement, nestedElementVisitor, isStatement, /*optional*/ false, liftToBlock) + ); + + enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; + return node; + } + + /** + * Determines whether to hoist the initializer of a ForStatement, ForInStatement, or + * ForOfStatement. + * + * @param node The node to test. + */ + function shouldHoistForInitializer(node: ForInitializer): node is VariableDeclarationList { + return isVariableDeclarationList(node) + && shouldHoistVariableDeclarationList(node); + } + + /** + * Visits the initializer of a ForStatement, ForInStatement, or ForOfStatement + * + * @param node The node to visit. + */ + function visitForInitializer(node: ForInitializer): ForInitializer { + if (shouldHoistForInitializer(node)) { + let expressions: Expression[]; + for (const variable of node.declarations) { + expressions = append(expressions, transformInitializedVariable(variable, /*isExportedDeclaration*/ false)); + } + + return expressions ? inlineExpressions(expressions) : createOmittedExpression(); } else { - return visitEachChild(node, visitNestedNode, context); + return visitEachChild(node, nestedElementVisitor, context); } } /** * Visits the body of a DoStatement to hoist declarations. * - * @param node The statement to visit. + * @param node The node to visit. */ - function visitDoStatement(node: DoStatement) { - const statement = visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock); - if (statement !== node.statement) { - const updated = getMutableClone(node); - updated.statement = statement; - return updated; - } - return node; + function visitDoStatement(node: DoStatement): VisitResult { + return updateDo( + node, + visitNode(node.statement, nestedElementVisitor, isStatement, /*optional*/ false, liftToBlock), + visitNode(node.expression, destructuringVisitor, isExpression) + ); } /** * Visits the body of a WhileStatement to hoist declarations. * - * @param node The statement to visit. + * @param node The node to visit. */ - function visitWhileStatement(node: WhileStatement) { - const statement = visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock); - if (statement !== node.statement) { - const updated = getMutableClone(node); - updated.statement = statement; - return updated; - } - return node; + function visitWhileStatement(node: WhileStatement): VisitResult { + return updateWhile( + node, + visitNode(node.expression, destructuringVisitor, isExpression), + visitNode(node.statement, nestedElementVisitor, isStatement, /*optional*/ false, liftToBlock) + ); } /** * Visits the body of a LabeledStatement to hoist declarations. * - * @param node The statement to visit. + * @param node The node to visit. */ - function visitLabeledStatement(node: LabeledStatement) { - const statement = visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock); - if (statement !== node.statement) { - const updated = getMutableClone(node); - updated.statement = statement; - return updated; - } - return node; + function visitLabeledStatement(node: LabeledStatement): VisitResult { + return updateLabel( + node, + node.label, + visitNode(node.statement, nestedElementVisitor, isStatement, /*optional*/ false, liftToBlock) + ); } /** * Visits the body of a WithStatement to hoist declarations. * - * @param node The statement to visit. + * @param node The node to visit. */ - function visitWithStatement(node: WithStatement) { - const statement = visitNode(node.statement, visitNestedNode, isStatement, /*optional*/ false, liftToBlock); - if (statement !== node.statement) { - const updated = getMutableClone(node); - updated.statement = statement; - return updated; - } - return node; + function visitWithStatement(node: WithStatement): VisitResult { + return updateWith( + node, + visitNode(node.expression, destructuringVisitor, isExpression), + visitNode(node.statement, nestedElementVisitor, isStatement, /*optional*/ false, liftToBlock) + ); } /** * Visits the body of a SwitchStatement to hoist declarations. * - * @param node The statement to visit. + * @param node The node to visit. */ - function visitSwitchStatement(node: SwitchStatement) { - const caseBlock = visitNode(node.caseBlock, visitNestedNode, isCaseBlock); - if (caseBlock !== node.caseBlock) { - const updated = getMutableClone(node); - updated.caseBlock = caseBlock; - return updated; - } - return node; + function visitSwitchStatement(node: SwitchStatement): VisitResult { + return updateSwitch( + node, + visitNode(node.expression, destructuringVisitor, isExpression), + visitNode(node.caseBlock, nestedElementVisitor, isCaseBlock) + ); } /** @@ -914,97 +1352,221 @@ namespace ts { * * @param node The node to visit. */ - function visitCaseBlock(node: CaseBlock) { - const clauses = visitNodes(node.clauses, visitNestedNode, isCaseOrDefaultClause); - if (clauses !== node.clauses) { - const updated = getMutableClone(node); - updated.clauses = clauses; - return updated; - } + function visitCaseBlock(node: CaseBlock): CaseBlock { + const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; + enclosingBlockScopedContainer = node; + + node = updateCaseBlock( + node, + visitNodes(node.clauses, nestedElementVisitor, isCaseOrDefaultClause) + ); + + enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; return node; } /** * Visits the body of a CaseClause to hoist declarations. * - * @param node The clause to visit. + * @param node The node to visit. */ - function visitCaseClause(node: CaseClause) { - const statements = visitNodes(node.statements, visitNestedNode, isStatement); - if (statements !== node.statements) { - const updated = getMutableClone(node); - updated.statements = statements; - return updated; - } - return node; + function visitCaseClause(node: CaseClause): VisitResult { + return updateCaseClause( + node, + visitNode(node.expression, destructuringVisitor, isExpression), + visitNodes(node.statements, nestedElementVisitor, isStatement) + ); } /** * Visits the body of a DefaultClause to hoist declarations. * - * @param node The clause to visit. + * @param node The node to visit. */ - function visitDefaultClause(node: DefaultClause) { - return visitEachChild(node, visitNestedNode, context); + function visitDefaultClause(node: DefaultClause): VisitResult { + return visitEachChild(node, nestedElementVisitor, context); } /** * Visits the body of a TryStatement to hoist declarations. * - * @param node The statement to visit. + * @param node The node to visit. */ - function visitTryStatement(node: TryStatement) { - return visitEachChild(node, visitNestedNode, context); + function visitTryStatement(node: TryStatement): VisitResult { + return visitEachChild(node, nestedElementVisitor, context); } /** * Visits the body of a CatchClause to hoist declarations. * - * @param node The clause to visit. + * @param node The node to visit. */ - function visitCatchClause(node: CatchClause) { - const block = visitNode(node.block, visitNestedNode, isBlock); - if (block !== node.block) { - const updated = getMutableClone(node); - updated.block = block; - return updated; - } + function visitCatchClause(node: CatchClause): CatchClause { + const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; + enclosingBlockScopedContainer = node; + + node = updateCatchClause( + node, + node.variableDeclaration, + visitNode(node.block, nestedElementVisitor, isBlock) + ); + + enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; return node; } /** * Visits the body of a Block to hoist declarations. * - * @param node The block to visit. + * @param node The node to visit. */ - function visitBlock(node: Block) { - return visitEachChild(node, visitNestedNode, context); + function visitBlock(node: Block): Block { + const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; + enclosingBlockScopedContainer = node; + + node = visitEachChild(node, nestedElementVisitor, context); + + enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; + return node; } // - // Substitutions + // Destructuring Assignment Visitors // + /** + * Visit nodes to flatten destructuring assignments to exported symbols. + * + * @param node The node to visit. + */ + function destructuringVisitor(node: Node): VisitResult { + if (node.transformFlags & TransformFlags.DestructuringAssignment + && node.kind === SyntaxKind.BinaryExpression) { + return visitDestructuringAssignment(node); + } + else if (node.transformFlags & TransformFlags.ContainsDestructuringAssignment) { + return visitEachChild(node, destructuringVisitor, context); + } + else { + return node; + } + } + + /** + * Visits a DestructuringAssignment to flatten destructuring to exported symbols. + * + * @param node The node to visit. + */ + function visitDestructuringAssignment(node: DestructuringAssignment): VisitResult { + if (hasExportedReferenceInDestructuringTarget(node.left)) { + return flattenDestructuringAssignment(context, node, /*needsValue*/ true, hoistVariableDeclaration, destructuringVisitor); + } + + return visitEachChild(node, destructuringVisitor, context); + } + + /** + * Determines whether the target of a destructuring assigment refers to an exported symbol. + * + * @param node The destructuring target. + */ + function hasExportedReferenceInDestructuringTarget(node: Expression | ObjectLiteralElementLike): boolean { + if (isAssignmentExpression(node)) { + return hasExportedReferenceInDestructuringTarget(node.left); + } + else if (isSpreadElementExpression(node)) { + return hasExportedReferenceInDestructuringTarget(node.expression); + } + else if (isObjectLiteralExpression(node)) { + return some(node.properties, hasExportedReferenceInDestructuringTarget); + } + else if (isArrayLiteralExpression(node)) { + return some(node.elements, hasExportedReferenceInDestructuringTarget); + } + else if (isShorthandPropertyAssignment(node)) { + return hasExportedReferenceInDestructuringTarget(node.name); + } + else if (isPropertyAssignment(node)) { + return hasExportedReferenceInDestructuringTarget(node.initializer); + } + else if (isIdentifier(node)) { + const container = resolver.getReferencedExportContainer(node); + return container !== undefined && container.kind === SyntaxKind.SourceFile; + } + else { + return false; + } + } + + // + // Modifier Visitors + // + + /** + * Visit nodes to elide module-specific modifiers. + * + * @param node The node to visit. + */ + function modifierVisitor(node: Node): VisitResult { + switch (node.kind) { + case SyntaxKind.ExportKeyword: + case SyntaxKind.DefaultKeyword: + return undefined; + } + return node; + } + + // + // Emit Notification + // + + /** + * Hook for node emit notifications. + * + * @param emitContext A context hint for the emitter. + * @param node The node to emit. + * @param emit A callback used to emit the node in the printer. + */ function onEmitNode(emitContext: EmitContext, node: Node, emitCallback: (emitContext: EmitContext, node: Node) => void): void { if (node.kind === SyntaxKind.SourceFile) { - exportFunctionForFile = exportFunctionForFileMap[getOriginalNodeId(node)]; + const id = getOriginalNodeId(node); + currentSourceFile = node; + moduleInfo = moduleInfoMap[id]; + exportFunction = exportFunctionsMap[id]; + noSubstitution = noSubstitutionMap[id]; + + if (noSubstitution) { + delete noSubstitutionMap[id]; + } + previousOnEmitNode(emitContext, node, emitCallback); - exportFunctionForFile = undefined; + + currentSourceFile = undefined; + moduleInfo = undefined; + exportFunction = undefined; + noSubstitution = undefined; } else { previousOnEmitNode(emitContext, node, emitCallback); } } + // + // Substitutions + // + /** * Hooks node substitutions. * + * @param emitContext A context hint for the emitter. * @param node The node to substitute. - * @param isExpression A value indicating whether the node is to be used in an expression - * position. */ function onSubstituteNode(emitContext: EmitContext, node: Node) { node = previousOnSubstituteNode(emitContext, node); + if (isSubstitutionPrevented(node)) { + return node; + } + if (emitContext === EmitContext.Expression) { return substituteExpression(node); } @@ -1027,373 +1589,167 @@ namespace ts { case SyntaxKind.PostfixUnaryExpression: return substituteUnaryExpression(node); } + return node; } /** - * Substitution for identifiers exported at the top level of a module. + * Substitution for an Identifier expression that may contain an imported or exported symbol. + * + * @param node The node to substitute. */ function substituteExpressionIdentifier(node: Identifier): Expression { - const importDeclaration = resolver.getReferencedImportDeclaration(node); - if (importDeclaration) { - const importBinding = createImportBinding(importDeclaration); - if (importBinding) { - return importBinding; + // When we see an identifier in an expression position that + // points to an imported symbol, we should substitute a qualified + // reference to the imported symbol if one is needed. + // + // - We do not substitute generated identifiers for any reason. + // - We do not substitute identifiers tagged with the LocalName flag. + if (!isGeneratedIdentifier(node) && !isLocalName(node)) { + const importDeclaration = resolver.getReferencedImportDeclaration(node); + if (importDeclaration) { + if (isImportClause(importDeclaration)) { + return createPropertyAccess( + getGeneratedNameForNode(importDeclaration.parent), + createIdentifier("default"), + /*location*/ node + ); + } + else if (isImportSpecifier(importDeclaration)) { + return createPropertyAccess( + getGeneratedNameForNode(importDeclaration.parent.parent.parent), + getSynthesizedClone(importDeclaration.propertyName || importDeclaration.name), + /*location*/ node + ); + } } } return node; } + /** + * Substitution for a BinaryExpression that may contain an imported or exported symbol. + * + * @param node The node to substitute. + */ function substituteBinaryExpression(node: BinaryExpression): Expression { - if (isAssignmentOperator(node.operatorToken.kind)) { - return substituteAssignmentExpression(node); + // When we see an assignment expression whose left-hand side is an exported symbol, + // we should ensure all exports of that symbol are updated with the correct value. + // + // - We do not substitute generated identifiers for any reason. + // - We do not substitute identifiers tagged with the LocalName flag. + // - We do not substitute identifiers that were originally the name of an enum or + // namespace due to how they are transformed in TypeScript. + // - We only substitute identifiers that are exported at the top level. + if (isAssignmentOperator(node.operatorToken.kind) + && isIdentifier(node.left) + && !isGeneratedIdentifier(node.left) + && !isLocalName(node.left) + && !isDeclarationNameOfEnumOrNamespace(node.left)) { + const exportedNames = getExports(node.left); + if (exportedNames) { + // For each additional export of the declaration, apply an export assignment. + let expression: Expression = node; + for (const exportName of exportedNames) { + expression = createExportExpression(exportName, preventSubstitution(expression)); + } + + return expression; + } } return node; } - function substituteAssignmentExpression(node: BinaryExpression): Expression { - setEmitFlags(node, EmitFlags.NoSubstitution); - - const left = node.left; - switch (left.kind) { - case SyntaxKind.Identifier: - const exportDeclaration = resolver.getReferencedExportContainer(left); - if (exportDeclaration) { - return createExportExpression(left, node); - } - break; - - case SyntaxKind.ObjectLiteralExpression: - case SyntaxKind.ArrayLiteralExpression: - if (hasExportedReferenceInDestructuringPattern(left)) { - return substituteDestructuring(node); - } - break; - } - - return node; - } - - function isExportedBinding(name: Identifier) { - const container = resolver.getReferencedExportContainer(name); - return container && container.kind === SyntaxKind.SourceFile; - } - - function hasExportedReferenceInDestructuringPattern(node: ObjectLiteralExpression | ArrayLiteralExpression | Identifier): boolean { - switch (node.kind) { - case SyntaxKind.Identifier: - return isExportedBinding(node); - - case SyntaxKind.ObjectLiteralExpression: - for (const property of (node).properties) { - if (hasExportedReferenceInObjectDestructuringElement(property)) { - return true; - } - } - - break; - - case SyntaxKind.ArrayLiteralExpression: - for (const element of (node).elements) { - if (hasExportedReferenceInArrayDestructuringElement(element)) { - return true; - } - } - - break; - } - - return false; - } - - function hasExportedReferenceInObjectDestructuringElement(node: ObjectLiteralElementLike): boolean { - if (isShorthandPropertyAssignment(node)) { - return isExportedBinding(node.name); - } - else if (isPropertyAssignment(node)) { - return hasExportedReferenceInDestructuringElement(node.initializer); - } - else { - return false; - } - } - - function hasExportedReferenceInArrayDestructuringElement(node: Expression): boolean { - if (isSpreadElementExpression(node)) { - const expression = node.expression; - return isIdentifier(expression) && isExportedBinding(expression); - } - else { - return hasExportedReferenceInDestructuringElement(node); - } - } - - function hasExportedReferenceInDestructuringElement(node: Expression): boolean { - if (isBinaryExpression(node)) { - const left = node.left; - return node.operatorToken.kind === SyntaxKind.EqualsToken - && isDestructuringPattern(left) - && hasExportedReferenceInDestructuringPattern(left); - } - else if (isIdentifier(node)) { - return isExportedBinding(node); - } - else if (isSpreadElementExpression(node)) { - const expression = node.expression; - return isIdentifier(expression) && isExportedBinding(expression); - } - else if (isDestructuringPattern(node)) { - return hasExportedReferenceInDestructuringPattern(node); - } - else { - return false; - } - } - - function isDestructuringPattern(node: Expression): node is ObjectLiteralExpression | ArrayLiteralExpression | Identifier { - const kind = node.kind; - return kind === SyntaxKind.Identifier - || kind === SyntaxKind.ObjectLiteralExpression - || kind === SyntaxKind.ArrayLiteralExpression; - } - - function substituteDestructuring(node: BinaryExpression) { - return flattenDestructuringAssignment(context, node, /*needsValue*/ true, hoistVariableDeclaration); - } - + /** + * Substitution for a UnaryExpression that may contain an imported or exported symbol. + * + * @param node The node to substitute. + */ function substituteUnaryExpression(node: PrefixUnaryExpression | PostfixUnaryExpression): Expression { - const operand = node.operand; - const operator = node.operator; - const substitute = - isIdentifier(operand) && - ( - node.kind === SyntaxKind.PostfixUnaryExpression || - (node.kind === SyntaxKind.PrefixUnaryExpression && (operator === SyntaxKind.PlusPlusToken || operator === SyntaxKind.MinusMinusToken)) - ); + // When we see a prefix or postfix increment expression whose operand is an exported + // symbol, we should ensure all exports of that symbol are updated with the correct + // value. + // + // - We do not substitute generated identifiers for any reason. + // - We do not substitute identifiers tagged with the LocalName flag. + // - We do not substitute identifiers that were originally the name of an enum or + // namespace due to how they are transformed in TypeScript. + // - We only substitute identifiers that are exported at the top level. + if ((node.operator === SyntaxKind.PlusPlusToken || node.operator === SyntaxKind.MinusMinusToken) + && isIdentifier(node.operand) + && !isGeneratedIdentifier(node.operand) + && !isLocalName(node.operand) + && !isDeclarationNameOfEnumOrNamespace(node.operand)) { + const exportedNames = getExports(node.operand); + if (exportedNames) { + let expression: Expression = node.kind === SyntaxKind.PostfixUnaryExpression + ? createPrefix( + node.operator, + node.operand, + /*location*/ node) + : node; - if (substitute) { - const exportDeclaration = resolver.getReferencedExportContainer(operand); - if (exportDeclaration) { - const expr = createPrefix(node.operator, operand, node); - setEmitFlags(expr, EmitFlags.NoSubstitution); - const call = createExportExpression(operand, expr); - if (node.kind === SyntaxKind.PrefixUnaryExpression) { - return call; + for (const exportName of exportedNames) { + expression = createExportExpression(exportName, preventSubstitution(expression)); } - else { - // export function returns the value that was passes as the second argument - // however for postfix unary expressions result value should be the value before modification. - // emit 'x++' as '(export('x', ++x) - 1)' and 'x--' as '(export('x', --x) + 1)' - return operator === SyntaxKind.PlusPlusToken - ? createSubtract(call, createLiteral(1)) - : createAdd(call, createLiteral(1)); + + if (node.kind === SyntaxKind.PostfixUnaryExpression) { + expression = node.operator === SyntaxKind.PlusPlusToken + ? createSubtract(preventSubstitution(expression), createLiteral(1)) + : createAdd(preventSubstitution(expression), createLiteral(1)); } + + return expression; } } + return node; } /** - * Gets a name to use for a DeclarationStatement. - * @param node The declaration statement. + * Gets the exports of a name. + * + * @param name The name. */ - function getDeclarationName(node: DeclarationStatement) { - return node.name ? getSynthesizedClone(node.name) : getGeneratedNameForNode(node); - } + function getExports(name: Identifier) { + let exportedNames: Identifier[]; + if (!isGeneratedIdentifier(name)) { + const valueDeclaration = resolver.getReferencedImportDeclaration(name) + || resolver.getReferencedValueDeclaration(name); - function addExportStarFunction(statements: Statement[], localNames: Identifier) { - const exportStarFunction = createUniqueName("exportStar"); - const m = createIdentifier("m"); - const n = createIdentifier("n"); - const exports = createIdentifier("exports"); - let condition: Expression = createStrictInequality(n, createLiteral("default")); - if (localNames) { - condition = createLogicalAnd( - condition, - createLogicalNot(createHasOwnProperty(localNames, n)) - ); - } + if (valueDeclaration) { + const exportContainer = resolver.getReferencedExportContainer(name, /*prefixLocals*/ false); + if (exportContainer && exportContainer.kind === SyntaxKind.SourceFile) { + exportedNames = append(exportedNames, getDeclarationName(valueDeclaration)); + } - statements.push( - createFunctionDeclaration( - /*decorators*/ undefined, - /*modifiers*/ undefined, - /*asteriskToken*/ undefined, - exportStarFunction, - /*typeParameters*/ undefined, - [createParameter(m)], - /*type*/ undefined, - createBlock([ - createVariableStatement( - /*modifiers*/ undefined, - createVariableDeclarationList([ - createVariableDeclaration( - exports, - /*type*/ undefined, - createObjectLiteral([]) - ) - ]) - ), - createForIn( - createVariableDeclarationList([ - createVariableDeclaration(n, /*type*/ undefined) - ]), - m, - createBlock([ - setEmitFlags( - createIf( - condition, - createStatement( - createAssignment( - createElementAccess(exports, n), - createElementAccess(m, n) - ) - ) - ), - EmitFlags.SingleLine - ) - ]) - ), - createStatement( - createCall( - exportFunctionForFile, - /*typeArguments*/ undefined, - [exports] - ) - ) - ], - /*location*/ undefined, - /*multiline*/ true) - ) - ); - - return exportStarFunction; - } - - /** - * Creates a call to the current file's export function to export a value. - * @param name The bound name of the export. - * @param value The exported value. - */ - function createExportExpression(name: Identifier | StringLiteral, value: Expression) { - const exportName = isIdentifier(name) ? createLiteral(name.text) : name; - return createCall(exportFunctionForFile, /*typeArguments*/ undefined, [exportName, value]); - } - - /** - * Creates a call to the current file's export function to export a value. - * @param name The bound name of the export. - * @param value The exported value. - */ - function createExportStatement(name: Identifier | StringLiteral, value: Expression) { - return createStatement(createExportExpression(name, value)); - } - - /** - * Creates a call to the current file's export function to export a declaration. - * @param node The declaration to export. - */ - function createDeclarationExport(node: DeclarationStatement) { - const declarationName = getDeclarationName(node); - const exportName = hasModifier(node, ModifierFlags.Default) ? createLiteral("default") : declarationName; - return createExportStatement(exportName, declarationName); - } - - function createImportBinding(importDeclaration: Declaration): LeftHandSideExpression { - let importAlias: Identifier; - let name: Identifier; - if (isImportClause(importDeclaration)) { - importAlias = getGeneratedNameForNode(importDeclaration.parent); - name = createIdentifier("default"); - } - else if (isImportSpecifier(importDeclaration)) { - importAlias = getGeneratedNameForNode(importDeclaration.parent.parent.parent); - name = importDeclaration.propertyName || importDeclaration.name; - } - else { - return undefined; - } - - return createPropertyAccess(importAlias, getSynthesizedClone(name)); - } - - function collectDependencyGroups(externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[]) { - const groupIndices = createMap(); - const dependencyGroups: DependencyGroup[] = []; - for (let i = 0; i < externalImports.length; i++) { - const externalImport = externalImports[i]; - const externalModuleName = getExternalModuleNameLiteral(externalImport, currentSourceFile, host, resolver, compilerOptions); - const text = externalModuleName.text; - if (hasProperty(groupIndices, text)) { - // deduplicate/group entries in dependency list by the dependency name - const groupIndex = groupIndices[text]; - dependencyGroups[groupIndex].externalImports.push(externalImport); - continue; - } - else { - groupIndices[text] = dependencyGroups.length; - dependencyGroups.push({ - name: externalModuleName, - externalImports: [externalImport] - }); + exportedNames = addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)]); } } - return dependencyGroups; + return exportedNames; } - function getNameOfDependencyGroup(dependencyGroup: DependencyGroup) { - return dependencyGroup.name; + /** + * Prevent substitution of a node for this transformer. + * + * @param node The node which should not be substituted. + */ + function preventSubstitution(node: T): T { + if (noSubstitution === undefined) noSubstitution = createMap(); + noSubstitution[getNodeId(node)] = true; + return node; } - function recordExportName(name: Identifier) { - if (!exportedLocalNames) { - exportedLocalNames = []; - } - - exportedLocalNames.push(name); - } - - function recordExportedFunctionDeclaration(node: FunctionDeclaration) { - if (!exportedFunctionDeclarations) { - exportedFunctionDeclarations = []; - } - - exportedFunctionDeclarations.push(createDeclarationExport(node)); - } - - function hoistBindingElement(node: VariableDeclaration | ArrayBindingElement, isExported: boolean): void { - if (isOmittedExpression(node)) { - return; - } - - const name = node.name; - if (isIdentifier(name)) { - hoistVariableDeclaration(getSynthesizedClone(name)); - if (isExported) { - recordExportName(name); - } - } - else if (isBindingPattern(name)) { - forEach(name.elements, isExported ? hoistExportedBindingElement : hoistNonExportedBindingElement); - } - } - - function hoistExportedBindingElement(node: VariableDeclaration | ArrayBindingElement) { - hoistBindingElement(node, /*isExported*/ true); - } - - function hoistNonExportedBindingElement(node: VariableDeclaration | ArrayBindingElement) { - hoistBindingElement(node, /*isExported*/ false); - } - - function updateSourceFile(node: SourceFile, statements: Statement[], nodeEmitFlags: EmitFlags) { - const updated = getMutableClone(node); - updated.statements = createNodeArray(statements, node.statements); - setEmitFlags(updated, nodeEmitFlags); - return updated; + /** + * Determines whether a node should not be substituted. + * + * @param node The node to test. + */ + function isSubstitutionPrevented(node: Node) { + return noSubstitution && node.id && noSubstitution[node.id]; } } } diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index 188364e0bd7..1362746ba57 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -48,7 +48,7 @@ namespace ts { let currentNamespaceContainerName: Identifier; let currentScope: SourceFile | Block | ModuleBlock | CaseBlock; let currentScopeFirstDeclarationsOfName: Map; - let currentSourceFileExternalHelpersModuleName: Identifier; + let currentExternalHelpersModuleName: Identifier; /** * Keeps track of whether expression substitution has been enabled for specific edge cases. @@ -241,6 +241,18 @@ namespace ts { } } + function modifierVisitor(node: Node): VisitResult { + if (modifierToFlag(node.kind) & ModifierFlags.TypeScriptModifier) { + return undefined; + } + else if (currentNamespace && node.kind === SyntaxKind.ExportKeyword) { + return undefined; + } + + return node; + } + + /** * Branching visitor, visits a TypeScript syntax node. * @@ -477,16 +489,16 @@ namespace ts { /*decorators*/ undefined, /*modifiers*/ undefined, createImportClause(/*name*/ undefined, createNamespaceImport(externalHelpersModuleName)), - createLiteral(externalHelpersModuleNameText) - ); + createLiteral(externalHelpersModuleNameText)); + externalHelpersModuleImport.parent = node; externalHelpersModuleImport.flags &= ~NodeFlags.Synthesized; statements.push(externalHelpersModuleImport); - currentSourceFileExternalHelpersModuleName = externalHelpersModuleName; + currentExternalHelpersModuleName = externalHelpersModuleName; addRange(statements, visitNodes(node.statements, sourceElementVisitor, isStatement, statementOffset)); addRange(statements, endLexicalEnvironment()); - currentSourceFileExternalHelpersModuleName = undefined; + currentExternalHelpersModuleName = undefined; node = updateSourceFileNode(node, createNodeArray(statements, node.statements)); node.externalHelpersModuleName = externalHelpersModuleName; @@ -537,7 +549,6 @@ namespace ts { const staticProperties = getInitializedProperties(node, /*isStatic*/ true); const hasExtendsClause = getClassExtendsHeritageClauseElement(node) !== undefined; const isDecoratedClass = shouldEmitDecorateCallForClass(node); - let classAlias: Identifier; // emit name if // - node has a name @@ -548,33 +559,11 @@ namespace ts { name = getGeneratedNameForNode(node); } - const statements: Statement[] = []; - if (!isDecoratedClass) { - // ${modifiers} class ${name} ${heritageClauses} { - // ${members} - // } - const classDeclaration = createClassDeclaration( - /*decorators*/ undefined, - visitNodes(node.modifiers, visitor, isModifier), - name, - /*typeParameters*/ undefined, - visitNodes(node.heritageClauses, visitor, isHeritageClause), - transformClassMembers(node, hasExtendsClause), - /*location*/ node - ); - setOriginalNode(classDeclaration, node); + const classStatement = isDecoratedClass + ? createClassDeclarationHeadWithDecorators(node, name, hasExtendsClause) + : createClassDeclarationHeadWithoutDecorators(node, name, hasExtendsClause, staticProperties.length > 0); - // To better align with the old emitter, we should not emit a trailing source map - // entry if the class has static properties. - if (staticProperties.length > 0) { - setEmitFlags(classDeclaration, EmitFlags.NoTrailingSourceMap | getEmitFlags(classDeclaration)); - } - - statements.push(classDeclaration); - } - else { - classAlias = addClassDeclarationHeadWithDecorators(statements, node, name, hasExtendsClause); - } + const statements: Statement[] = [classStatement]; // Emit static property assignment. Because classDeclaration is lexically evaluated, // it is safe to emit static property assignment after classDeclaration @@ -582,13 +571,13 @@ namespace ts { // HasLexicalDeclaration (N) : Determines if the argument identifier has a binding in this environment record that was created using // a lexical declaration such as a LexicalDeclaration or a ClassDeclaration. if (staticProperties.length) { - addInitializedPropertyStatements(statements, staticProperties, getLocalName(node, /*noSourceMaps*/ true)); + addInitializedPropertyStatements(statements, staticProperties, getLocalName(node)); } // Write any decorators of the node. addClassElementDecorationStatements(statements, node, /*isStatic*/ false); addClassElementDecorationStatements(statements, node, /*isStatic*/ true); - addConstructorDecorationStatement(statements, node, classAlias); + addConstructorDecorationStatement(statements, node); // If the class is exported as part of a TypeScript namespace, emit the namespace export. // Otherwise, if the class was exported at the top level and was decorated, emit an export @@ -598,29 +587,66 @@ namespace ts { } else if (isDecoratedClass) { if (isDefaultExternalModuleExport(node)) { - statements.push(createExportAssignment( - /*decorators*/ undefined, - /*modifiers*/ undefined, - /*isExportEquals*/ false, - getLocalName(node))); + statements.push(createExportDefault(getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true))); } else if (isNamedExternalModuleExport(node)) { - statements.push(createExternalModuleExport(name)); + statements.push(createExternalModuleExport(getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true))); } } - return statements; + if (statements.length > 1) { + // Add a DeclarationMarker as a marker for the end of the declaration + statements.push(createEndOfDeclarationMarker(node)); + setEmitFlags(classStatement, getEmitFlags(classStatement) | EmitFlags.HasEndOfDeclarationMarker); + } + + return singleOrMany(statements); + } + + /** + * Transforms a non-decorated class declaration and appends the resulting statements. + * + * @param node A ClassDeclaration node. + * @param name The name of the class. + * @param hasExtendsClause A value indicating whether the class has an extends clause. + * @param hasStaticProperties A value indicating whether the class has static properties. + */ + function createClassDeclarationHeadWithoutDecorators(node: ClassDeclaration, name: Identifier, hasExtendsClause: boolean, hasStaticProperties: boolean) { + // ${modifiers} class ${name} ${heritageClauses} { + // ${members} + // } + const classDeclaration = createClassDeclaration( + /*decorators*/ undefined, + visitNodes(node.modifiers, modifierVisitor, isModifier), + name, + /*typeParameters*/ undefined, + visitNodes(node.heritageClauses, visitor, isHeritageClause), + transformClassMembers(node, hasExtendsClause), + node); + + let emitFlags = getEmitFlags(node); + + // To better align with the old emitter, we should not emit a trailing source map + // entry if the class has static properties. + if (hasStaticProperties) { + emitFlags |= EmitFlags.NoTrailingSourceMap; + } + + setOriginalNode(classDeclaration, node); + setEmitFlags(classDeclaration, emitFlags); + return classDeclaration; } /** * Transforms a decorated class declaration and appends the resulting statements. If * the class requires an alias to avoid issues with double-binding, the alias is returned. * + * @param statements A statement list to which to add the declaration. * @param node A ClassDeclaration node. * @param name The name of the class. - * @param hasExtendsClause A value indicating whether + * @param hasExtendsClause A value indicating whether the class has an extends clause. */ - function addClassDeclarationHeadWithDecorators(statements: Statement[], node: ClassDeclaration, name: Identifier, hasExtendsClause: boolean) { + function createClassDeclarationHeadWithDecorators(node: ClassDeclaration, name: Identifier, hasExtendsClause: boolean) { // When we emit an ES6 class that has a class decorator, we must tailor the // emit to certain specific cases. // @@ -655,20 +681,20 @@ namespace ts { // --------------------------------------------------------------------- // TypeScript | Javascript // --------------------------------------------------------------------- - // @dec | let C_1 = class C { + // @dec | let C = C_1 = class C { // class C { | static x() { return C_1.y; } // static x() { return C.y; } | } - // static y = 1; | let C = C_1; - // } | C.y = 1; - // | C = C_1 = __decorate([dec], C); + // static y = 1; | C.y = 1; + // } | C = C_1 = __decorate([dec], C); + // | var C_1; // --------------------------------------------------------------------- - // @dec | let C_1 = class C { + // @dec | let C = class C { // export class C { | static x() { return C_1.y; } // static x() { return C.y; } | } - // static y = 1; | let C = C_1; - // } | C.y = 1; - // | C = C_1 = __decorate([dec], C); + // static y = 1; | C.y = 1; + // } | C = C_1 = __decorate([dec], C); // | export { C }; + // | var C_1; // --------------------------------------------------------------------- // // If a class declaration is the default export of a module, we instead emit @@ -697,92 +723,34 @@ namespace ts { // --------------------------------------------------------------------- // TypeScript | Javascript // --------------------------------------------------------------------- - // @dec | let C_1 = class C { + // @dec | let C = class C { // export default class C { | static x() { return C_1.y; } // static x() { return C.y; } | } - // static y = 1; | let C = C_1; - // } | C.y = 1; - // | C = C_1 = __decorate([dec], C); + // static y = 1; | C.y = 1; + // } | C = C_1 = __decorate([dec], C); // | export default C; + // | var C_1; // --------------------------------------------------------------------- // const location = moveRangePastDecorators(node); + const classAlias = getClassAliasIfNeeded(node); + const declName = getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true); // ... = class ${name} ${heritageClauses} { // ${members} // } - const classExpression: Expression = setOriginalNode( - createClassExpression( - /*modifiers*/ undefined, - name, - /*typeParameters*/ undefined, - visitNodes(node.heritageClauses, visitor, isHeritageClause), - transformClassMembers(node, hasExtendsClause), - /*location*/ location - ), - node - ); - - if (!name) { - name = getGeneratedNameForNode(node); - } - - // Record an alias to avoid class double-binding. - let classAlias: Identifier; - if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.ClassWithConstructorReference) { - enableSubstitutionForClassAliases(); - classAlias = createUniqueName(node.name && !isGeneratedIdentifier(node.name) ? node.name.text : "default"); - classAliases[getOriginalNodeId(node)] = classAlias; - } - - const declaredName = getDeclarationName(node, /*allowComments*/ true); + const heritageClauses = visitNodes(node.heritageClauses, visitor, isHeritageClause); + const members = transformClassMembers(node, hasExtendsClause); + const classExpression = createClassExpression(/*modifiers*/ undefined, name, /*typeParameters*/ undefined, heritageClauses, members, location); + setOriginalNode(classExpression, node); // let ${name} = ${classExpression} where name is either declaredName if the class doesn't contain self-reference // or decoratedClassAlias if the class contain self-reference. - const transformedClassExpression = createVariableStatement( - /*modifiers*/ undefined, - createLetDeclarationList([ - createVariableDeclaration( - classAlias || declaredName, - /*type*/ undefined, - classExpression - ) - ]), - /*location*/ location - ); - setCommentRange(transformedClassExpression, node); - statements.push( - setOriginalNode( - /*node*/ transformedClassExpression, - /*original*/ node - ) - ); - - if (classAlias) { - // We emit the class alias as a `let` declaration here so that it has the same - // TDZ as the class. - - // let ${declaredName} = ${decoratedClassAlias} - statements.push( - setOriginalNode( - createVariableStatement( - /*modifiers*/ undefined, - createLetDeclarationList([ - createVariableDeclaration( - declaredName, - /*type*/ undefined, - classAlias - ) - ]), - /*location*/ location - ), - /*original*/ node - ) - ); - } - - return classAlias; + const statement = createLetStatement(declName, classAlias ? createAssignment(classAlias, classExpression) : classExpression, location); + setOriginalNode(statement, node); + setCommentRange(statement, node); + return statement; } /** @@ -992,7 +960,7 @@ namespace ts { statements, /*location*/ constructor ? constructor.body.statements : node.members ), - /*location*/ constructor ? constructor.body : undefined + /*location*/ constructor ? constructor.body : /*location*/ undefined ), true ); @@ -1452,7 +1420,7 @@ namespace ts { : undefined; const helper = createDecorateHelper( - currentSourceFileExternalHelpersModuleName, + currentExternalHelpersModuleName, decoratorExpressions, prefix, memberName, @@ -1469,8 +1437,8 @@ namespace ts { * * @param node The class node. */ - function addConstructorDecorationStatement(statements: Statement[], node: ClassDeclaration, decoratedClassAlias: Identifier) { - const expression = generateConstructorDecorationExpression(node, decoratedClassAlias); + function addConstructorDecorationStatement(statements: Statement[], node: ClassDeclaration) { + const expression = generateConstructorDecorationExpression(node); if (expression) { statements.push(setOriginalNode(createStatement(expression), node)); } @@ -1481,61 +1449,20 @@ namespace ts { * * @param node The class node. */ - function generateConstructorDecorationExpression(node: ClassExpression | ClassDeclaration, decoratedClassAlias: Identifier) { + function generateConstructorDecorationExpression(node: ClassExpression | ClassDeclaration) { const allDecorators = getAllDecoratorsOfConstructor(node); const decoratorExpressions = transformAllDecoratorsOfDeclaration(node, allDecorators); if (!decoratorExpressions) { return undefined; } - // Emit the call to __decorate. Given the class: - // - // @dec - // class C { - // } - // - // The emit for the class is: - // - // C = C_1 = __decorate([dec], C); - // - if (decoratedClassAlias) { - const expression = createAssignment( - decoratedClassAlias, - createDecorateHelper( - currentSourceFileExternalHelpersModuleName, - decoratorExpressions, - getDeclarationName(node) - ) - ); - - const result = createAssignment(getDeclarationName(node), expression, moveRangePastDecorators(node)); - setEmitFlags(result, EmitFlags.NoComments); - return result; - } - // Emit the call to __decorate. Given the class: - // - // @dec - // export declare class C { - // } - // - // The emit for the class is: - // - // C = __decorate([dec], C); - // - else { - const result = createAssignment( - getDeclarationName(node), - createDecorateHelper( - currentSourceFileExternalHelpersModuleName, - decoratorExpressions, - getDeclarationName(node) - ), - moveRangePastDecorators(node) - ); - - setEmitFlags(result, EmitFlags.NoComments); - return result; - } + const classAlias = classAliases && classAliases[getOriginalNodeId(node)]; + const localName = getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true); + const decorate = createDecorateHelper(currentExternalHelpersModuleName, decoratorExpressions, localName); + const expression = createAssignment(localName, classAlias ? createAssignment(classAlias, decorate) : decorate); + setEmitFlags(expression, EmitFlags.NoComments); + setSourceMapRange(expression, moveRangePastDecorators(node)); + return expression; } /** @@ -1559,7 +1486,7 @@ namespace ts { expressions = []; for (const decorator of decorators) { const helper = createParamHelper( - currentSourceFileExternalHelpersModuleName, + currentExternalHelpersModuleName, transformDecorator(decorator), parameterOffset, /*location*/ decorator.expression); @@ -1589,13 +1516,13 @@ namespace ts { function addOldTypeMetadata(node: Declaration, decoratorExpressions: Expression[]) { if (compilerOptions.emitDecoratorMetadata) { if (shouldAddTypeMetadata(node)) { - decoratorExpressions.push(createMetadataHelper(currentSourceFileExternalHelpersModuleName, "design:type", serializeTypeOfNode(node))); + decoratorExpressions.push(createMetadataHelper(currentExternalHelpersModuleName, "design:type", serializeTypeOfNode(node))); } if (shouldAddParamTypesMetadata(node)) { - decoratorExpressions.push(createMetadataHelper(currentSourceFileExternalHelpersModuleName, "design:paramtypes", serializeParameterTypesOfNode(node))); + decoratorExpressions.push(createMetadataHelper(currentExternalHelpersModuleName, "design:paramtypes", serializeParameterTypesOfNode(node))); } if (shouldAddReturnTypeMetadata(node)) { - decoratorExpressions.push(createMetadataHelper(currentSourceFileExternalHelpersModuleName, "design:returntype", serializeReturnTypeOfNode(node))); + decoratorExpressions.push(createMetadataHelper(currentExternalHelpersModuleName, "design:returntype", serializeReturnTypeOfNode(node))); } } } @@ -1604,16 +1531,16 @@ namespace ts { if (compilerOptions.emitDecoratorMetadata) { let properties: ObjectLiteralElementLike[]; if (shouldAddTypeMetadata(node)) { - (properties || (properties = [])).push(createPropertyAssignment("type", createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, /*equalsGreaterThanToken*/ undefined, serializeTypeOfNode(node)))); + (properties || (properties = [])).push(createPropertyAssignment("type", createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, createToken(SyntaxKind.EqualsGreaterThanToken), serializeTypeOfNode(node)))); } if (shouldAddParamTypesMetadata(node)) { - (properties || (properties = [])).push(createPropertyAssignment("paramTypes", createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, /*equalsGreaterThanToken*/ undefined, serializeParameterTypesOfNode(node)))); + (properties || (properties = [])).push(createPropertyAssignment("paramTypes", createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, createToken(SyntaxKind.EqualsGreaterThanToken), serializeParameterTypesOfNode(node)))); } if (shouldAddReturnTypeMetadata(node)) { - (properties || (properties = [])).push(createPropertyAssignment("returnType", createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, /*equalsGreaterThanToken*/ undefined, serializeReturnTypeOfNode(node)))); + (properties || (properties = [])).push(createPropertyAssignment("returnType", createArrowFunction(/*modifiers*/ undefined, /*typeParameters*/ undefined, [], /*type*/ undefined, createToken(SyntaxKind.EqualsGreaterThanToken), serializeReturnTypeOfNode(node)))); } if (properties) { - decoratorExpressions.push(createMetadataHelper(currentSourceFileExternalHelpersModuleName, "design:typeinfo", createObjectLiteral(properties, /*location*/ undefined, /*multiLine*/ true))); + decoratorExpressions.push(createMetadataHelper(currentExternalHelpersModuleName, "design:typeinfo", createObjectLiteral(properties, /*location*/ undefined, /*multiLine*/ true))); } } } @@ -2133,7 +2060,7 @@ namespace ts { const method = createMethod( /*decorators*/ undefined, - visitNodes(node.modifiers, visitor, isModifier), + visitNodes(node.modifiers, modifierVisitor, isModifier), node.asteriskToken, visitPropertyNameOfClassElement(node), /*typeParameters*/ undefined, @@ -2178,7 +2105,7 @@ namespace ts { const accessor = createGetAccessor( /*decorators*/ undefined, - visitNodes(node.modifiers, visitor, isModifier), + visitNodes(node.modifiers, modifierVisitor, isModifier), visitPropertyNameOfClassElement(node), visitNodes(node.parameters, visitor, isParameter), /*type*/ undefined, @@ -2188,9 +2115,9 @@ namespace ts { // While we emit the source map for the node after skipping decorators and modifiers, // we need to emit the comments for the original range. + setOriginalNode(accessor, node); setCommentRange(accessor, node); setSourceMapRange(accessor, moveRangePastDecorators(node)); - setOriginalNode(accessor, node); return accessor; } @@ -2211,7 +2138,7 @@ namespace ts { const accessor = createSetAccessor( /*decorators*/ undefined, - visitNodes(node.modifiers, visitor, isModifier), + visitNodes(node.modifiers, modifierVisitor, isModifier), visitPropertyNameOfClassElement(node), visitNodes(node.parameters, visitor, isParameter), node.body ? visitEachChild(node.body, visitor, context) : createBlock([]), @@ -2220,9 +2147,9 @@ namespace ts { // While we emit the source map for the node after skipping decorators and modifiers, // we need to emit the comments for the original range. + setOriginalNode(accessor, node); setCommentRange(accessor, node); setSourceMapRange(accessor, moveRangePastDecorators(node)); - setOriginalNode(accessor, node); return accessor; } @@ -2244,7 +2171,7 @@ namespace ts { const func = createFunctionDeclaration( /*decorators*/ undefined, - visitNodes(node.modifiers, visitor, isModifier), + visitNodes(node.modifiers, modifierVisitor, isModifier), node.asteriskToken, node.name, /*typeParameters*/ undefined, @@ -2278,7 +2205,7 @@ namespace ts { } const func = createFunctionExpression( - visitNodes(node.modifiers, visitor, isModifier), + visitNodes(node.modifiers, modifierVisitor, isModifier), node.asteriskToken, node.name, /*typeParameters*/ undefined, @@ -2300,7 +2227,7 @@ namespace ts { */ function visitArrowFunction(node: ArrowFunction) { const func = createArrowFunction( - visitNodes(node.modifiers, visitor, isModifier), + visitNodes(node.modifiers, modifierVisitor, isModifier), /*typeParameters*/ undefined, visitNodes(node.parameters, visitor, isParameter), /*type*/ undefined, @@ -2372,7 +2299,7 @@ namespace ts { return undefined; } - const parameter = createParameterDeclaration( + const parameter = createParameter( /*decorators*/ undefined, /*modifiers*/ undefined, node.dotDotDotToken, @@ -2425,7 +2352,7 @@ namespace ts { return flattenVariableDestructuringToExpression( node, hoistVariableDeclaration, - getNamespaceMemberNameWithSourceMapsAndWithoutComments, + createNamespaceExportExpression, visitor ); } @@ -2515,29 +2442,6 @@ namespace ts { || compilerOptions.isolatedModules; } - function shouldEmitVarForEnumDeclaration(node: EnumDeclaration | ModuleDeclaration) { - return isFirstEmittedDeclarationInScope(node) - && (!hasModifier(node, ModifierFlags.Export) - || isES6ExportedDeclaration(node)); - } - - - /* - * Adds a trailing VariableStatement for an enum or module declaration. - */ - function addVarForEnumExportedFromNamespace(statements: Statement[], node: EnumDeclaration | ModuleDeclaration) { - const statement = createVariableStatement( - /*modifiers*/ undefined, - [createVariableDeclaration( - getDeclarationName(node), - /*type*/ undefined, - getExportName(node) - )] - ); - setSourceMapRange(statement, node); - statements.push(statement); - } - /** * Visits an enum declaration. * @@ -2559,10 +2463,7 @@ namespace ts { // If needed, we should emit a variable declaration for the enum. If we emit // a leading variable declaration, we should not emit leading comments for the // enum body. - recordEmittedDeclarationInScope(node); - if (shouldEmitVarForEnumDeclaration(node)) { - addVarForEnumOrModuleDeclaration(statements, node); - + if (addVarForEnumOrModuleDeclaration(statements, node)) { // We should still emit the comments if we are emitting a system module. if (moduleKind !== ModuleKind.System || currentScope !== currentSourceFile) { emitFlags |= EmitFlags.NoLeadingComments; @@ -2576,7 +2477,28 @@ namespace ts { const containerName = getNamespaceContainerName(node); // `exportName` is the expression used within this node's container for any exported references. - const exportName = getExportName(node); + const exportName = hasModifier(node, ModifierFlags.Export) + ? getExternalModuleOrNamespaceExportName(currentNamespaceContainerName, node, /*allowComments*/ false, /*allowSourceMaps*/ true) + : getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true); + + // x || (x = {}) + // exports.x || (exports.x = {}) + let moduleArg = + createLogicalOr( + exportName, + createAssignment( + exportName, + createObjectLiteral() + ) + ); + + if (hasNamespaceQualifiedExportName(node)) { + // `localName` is the expression used within this node's containing scope for any local references. + const localName = getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true); + + // x = (exports.x || (exports.x = {})) + moduleArg = createAssignment(localName, moduleArg); + } // (function (x) { // x[x["y"] = 0] = "y"; @@ -2589,18 +2511,12 @@ namespace ts { /*asteriskToken*/ undefined, /*name*/ undefined, /*typeParameters*/ undefined, - [createParameter(parameterName)], + [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, parameterName)], /*type*/ undefined, transformEnumBody(node, containerName) ), /*typeArguments*/ undefined, - [createLogicalOr( - exportName, - createAssignment( - exportName, - createObjectLiteral() - ) - )] + [moduleArg] ), /*location*/ node ); @@ -2609,10 +2525,9 @@ namespace ts { setEmitFlags(enumStatement, emitFlags); statements.push(enumStatement); - if (isNamespaceExport(node)) { - addVarForEnumExportedFromNamespace(statements, node); - } - + // Add a DeclarationMarker for the enum to preserve trailing comments and mark + // the end of the declaration. + statements.push(createEndOfDeclarationMarker(node)); return statements; } @@ -2697,9 +2612,15 @@ namespace ts { return isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.isolatedModules); } - function isES6ExportedDeclaration(node: Node) { - return isExternalModuleExport(node) - && moduleKind === ModuleKind.ES2015; + /** + * Determines whether an exported declaration will have a qualified export name (e.g. `f.x` + * or `exports.x`). + */ + function hasNamespaceQualifiedExportName(node: Node) { + return isNamespaceExport(node) + || (isExternalModuleExport(node) + && moduleKind !== ModuleKind.ES2015 + && moduleKind !== ModuleKind.System); } /** @@ -2737,57 +2658,65 @@ namespace ts { return false; } - function shouldEmitVarForModuleDeclaration(node: ModuleDeclaration) { - return isFirstEmittedDeclarationInScope(node); - } - /** * Adds a leading VariableStatement for a enum or module declaration. */ function addVarForEnumOrModuleDeclaration(statements: Statement[], node: ModuleDeclaration | EnumDeclaration) { // Emit a variable statement for the module. const statement = createVariableStatement( - isES6ExportedDeclaration(node) - ? visitNodes(node.modifiers, visitor, isModifier) - : undefined, + visitNodes(node.modifiers, modifierVisitor, isModifier), [ createVariableDeclaration( - getDeclarationName(node, /*allowComments*/ false, /*allowSourceMaps*/ true) + getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true) ) ] ); - setOriginalNode(statement, /*original*/ node); + setOriginalNode(statement, node); - // Adjust the source map emit to match the old emitter. - if (node.kind === SyntaxKind.EnumDeclaration) { - setSourceMapRange(statement.declarationList, node); + recordEmittedDeclarationInScope(node); + if (isFirstEmittedDeclarationInScope(node)) { + // Adjust the source map emit to match the old emitter. + if (node.kind === SyntaxKind.EnumDeclaration) { + setSourceMapRange(statement.declarationList, node); + } + else { + setSourceMapRange(statement, node); + } + + // Trailing comments for module declaration should be emitted after the function closure + // instead of the variable statement: + // + // /** Module comment*/ + // module m1 { + // function foo4Export() { + // } + // } // trailing comment module + // + // Should emit: + // + // /** Module comment*/ + // var m1; + // (function (m1) { + // function foo4Export() { + // } + // })(m1 || (m1 = {})); // trailing comment module + // + setCommentRange(statement, node); + setEmitFlags(statement, EmitFlags.NoTrailingComments | EmitFlags.HasEndOfDeclarationMarker); + statements.push(statement); + return true; } else { - setSourceMapRange(statement, node); + // For an EnumDeclaration or ModuleDeclaration that merges with a preceeding + // declaration we do not emit a leading variable declaration. To preserve the + // begin/end semantics of the declararation and to properly handle exports + // we wrap the leading variable declaration in a `MergeDeclarationMarker`. + const mergeMarker = createMergeDeclarationMarker(statement); + setEmitFlags(mergeMarker, EmitFlags.NoComments | EmitFlags.HasEndOfDeclarationMarker); + statements.push(mergeMarker); + return false; } - - // Trailing comments for module declaration should be emitted after the function closure - // instead of the variable statement: - // - // /** Module comment*/ - // module m1 { - // function foo4Export() { - // } - // } // trailing comment module - // - // Should emit: - // - // /** Module comment*/ - // var m1; - // (function (m1) { - // function foo4Export() { - // } - // })(m1 || (m1 = {})); // trailing comment module - // - setCommentRange(statement, node); - setEmitFlags(statement, EmitFlags.NoTrailingComments); - statements.push(statement); } /** @@ -2814,9 +2743,7 @@ namespace ts { // If needed, we should emit a variable declaration for the module. If we emit // a leading variable declaration, we should not emit leading comments for the // module body. - recordEmittedDeclarationInScope(node); - if (shouldEmitVarForModuleDeclaration(node)) { - addVarForEnumOrModuleDeclaration(statements, node); + if (addVarForEnumOrModuleDeclaration(statements, node)) { // We should still emit the comments if we are emitting a system module. if (moduleKind !== ModuleKind.System || currentScope !== currentSourceFile) { emitFlags |= EmitFlags.NoLeadingComments; @@ -2830,7 +2757,9 @@ namespace ts { const containerName = getNamespaceContainerName(node); // `exportName` is the expression used within this node's container for any exported references. - const exportName = getExportName(node); + const exportName = hasModifier(node, ModifierFlags.Export) + ? getExternalModuleOrNamespaceExportName(currentNamespaceContainerName, node, /*allowComments*/ false, /*allowSourceMaps*/ true) + : getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true); // x || (x = {}) // exports.x || (exports.x = {}) @@ -2843,9 +2772,9 @@ namespace ts { ) ); - if (hasModifier(node, ModifierFlags.Export) && !isES6ExportedDeclaration(node)) { + if (hasNamespaceQualifiedExportName(node)) { // `localName` is the expression used within this node's containing scope for any local references. - const localName = getLocalName(node); + const localName = getLocalName(node, /*allowComments*/ false, /*allowSourceMaps*/ true); // x = (exports.x || (exports.x = {})) moduleArg = createAssignment(localName, moduleArg); @@ -2861,7 +2790,7 @@ namespace ts { /*asteriskToken*/ undefined, /*name*/ undefined, /*typeParameters*/ undefined, - [createParameter(parameterName)], + [createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, parameterName)], /*type*/ undefined, transformModuleBody(node, containerName) ), @@ -2874,6 +2803,10 @@ namespace ts { setOriginalNode(moduleStatement, node); setEmitFlags(moduleStatement, emitFlags); statements.push(moduleStatement); + + // Add a DeclarationMarker for the namespace to preserve trailing comments and mark + // the end of the declaration. + statements.push(createEndOfDeclarationMarker(node)); return statements; } @@ -3129,12 +3062,15 @@ namespace ts { // var ${name} = ${moduleReference}; return setOriginalNode( createVariableStatement( - visitNodes(node.modifiers, visitor, isModifier), + visitNodes(node.modifiers, modifierVisitor, isModifier), createVariableDeclarationList([ - createVariableDeclaration( - node.name, - /*type*/ undefined, - moduleReference + setOriginalNode( + createVariableDeclaration( + node.name, + /*type*/ undefined, + moduleReference + ), + node ) ]), node @@ -3202,8 +3138,8 @@ namespace ts { function addExportMemberAssignment(statements: Statement[], node: ClassDeclaration | FunctionDeclaration) { const expression = createAssignment( - getExportName(node), - getLocalName(node, /*noSourceMaps*/ true) + getExternalModuleOrNamespaceExportName(currentNamespaceContainerName, node, /*allowComments*/ false, /*allowSourceMaps*/ true), + getLocalName(node) ); setSourceMapRange(expression, createRange(node.name.pos, node.end)); @@ -3215,40 +3151,19 @@ namespace ts { function createNamespaceExport(exportName: Identifier, exportValue: Expression, location?: TextRange) { return createStatement( createAssignment( - getNamespaceMemberName(exportName, /*allowComments*/ false, /*allowSourceMaps*/ true), + getNamespaceMemberName(currentNamespaceContainerName, exportName, /*allowComments*/ false, /*allowSourceMaps*/ true), exportValue ), location ); } - function createExternalModuleExport(exportName: Identifier) { - return createExportDeclaration( - /*decorators*/ undefined, - /*modifiers*/ undefined, - createNamedExports([ - createExportSpecifier(exportName) - ]) - ); - } - - function getNamespaceMemberName(name: Identifier, allowComments?: boolean, allowSourceMaps?: boolean): Expression { - const qualifiedName = createPropertyAccess(currentNamespaceContainerName, getSynthesizedClone(name), /*location*/ name); - let emitFlags: EmitFlags; - if (!allowComments) { - emitFlags |= EmitFlags.NoComments; - } - if (!allowSourceMaps) { - emitFlags |= EmitFlags.NoSourceMap; - } - if (emitFlags) { - setEmitFlags(qualifiedName, emitFlags); - } - return qualifiedName; + function createNamespaceExportExpression(exportName: Identifier, exportValue: Expression, location?: TextRange) { + return createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(exportName), exportValue, location); } function getNamespaceMemberNameWithSourceMapsAndWithoutComments(name: Identifier) { - return getNamespaceMemberName(name, /*allowComments*/ false, /*allowSourceMaps*/ true); + return getNamespaceMemberName(currentNamespaceContainerName, name, /*allowComments*/ false, /*allowSourceMaps*/ true); } /** @@ -3269,65 +3184,17 @@ namespace ts { } /** - * Gets the local name for a declaration for use in expressions. - * - * A local name will *never* be prefixed with an module or namespace export modifier like - * "exports.". - * - * @param node The declaration. - * @param noSourceMaps A value indicating whether source maps may not be emitted for the name. - * @param allowComments A value indicating whether comments may be emitted for the name. + * Gets a local alias for a class declaration if it is a decorated class with an internal + * reference to the static side of the class. This is necessary to avoid issues with + * double-binding semantics for the class name. */ - function getLocalName(node: FunctionDeclaration | ClassDeclaration | ClassExpression | ModuleDeclaration | EnumDeclaration, noSourceMaps?: boolean, allowComments?: boolean) { - return getDeclarationName(node, allowComments, !noSourceMaps, EmitFlags.LocalName); - } - - /** - * Gets the export name for a declaration for use in expressions. - * - * An export name will *always* be prefixed with an module or namespace export modifier - * like "exports." if one is required. - * - * @param node The declaration. - * @param noSourceMaps A value indicating whether source maps may not be emitted for the name. - * @param allowComments A value indicating whether comments may be emitted for the name. - */ - function getExportName(node: FunctionDeclaration | ClassDeclaration | ClassExpression | ModuleDeclaration | EnumDeclaration, noSourceMaps?: boolean, allowComments?: boolean) { - if (isNamespaceExport(node)) { - return getNamespaceMemberName(getDeclarationName(node), allowComments, !noSourceMaps); - } - - return getDeclarationName(node, allowComments, !noSourceMaps, EmitFlags.ExportName); - } - - /** - * Gets the name for a declaration for use in declarations. - * - * @param node The declaration. - * @param allowComments A value indicating whether comments may be emitted for the name. - * @param allowSourceMaps A value indicating whether source maps may be emitted for the name. - * @param emitFlags Additional NodeEmitFlags to specify for the name. - */ - function getDeclarationName(node: FunctionDeclaration | ClassDeclaration | ClassExpression | ModuleDeclaration | EnumDeclaration, allowComments?: boolean, allowSourceMaps?: boolean, emitFlags?: EmitFlags) { - if (node.name) { - const name = getMutableClone(node.name); - emitFlags |= getEmitFlags(node.name); - if (!allowSourceMaps) { - emitFlags |= EmitFlags.NoSourceMap; - } - - if (!allowComments) { - emitFlags |= EmitFlags.NoComments; - } - - if (emitFlags) { - setEmitFlags(name, emitFlags); - } - - return name; - } - else { - return getGeneratedNameForNode(node); + function getClassAliasIfNeeded(node: ClassDeclaration) { + if (resolver.getNodeCheckFlags(node) & NodeCheckFlags.ClassWithConstructorReference) { + enableSubstitutionForClassAliases(); + const classAlias = createUniqueName(node.name && !isGeneratedIdentifier(node.name) ? node.name.text : "default"); + classAliases[getOriginalNodeId(node)] = classAlias; + hoistVariableDeclaration(classAlias); + return classAlias; } } @@ -3386,6 +3253,7 @@ namespace ts { /** * Hook for node emit. * + * @param emitContext A context hint for the emitter. * @param node The node to emit. * @param emit A callback used to emit the node in the printer. */ @@ -3408,9 +3276,8 @@ namespace ts { /** * Hooks node substitutions. * + * @param emitContext A context hint for the emitter. * @param node The node to substitute. - * @param isExpression A value indicating whether the node is to be used in an expression - * position. */ function onSubstituteNode(emitContext: EmitContext, node: Node) { node = previousOnSubstituteNode(emitContext, node); @@ -3486,11 +3353,11 @@ namespace ts { function trySubstituteNamespaceExportedName(node: Identifier): Expression { // If this is explicitly a local name, do not substitute. - if (enabledSubstitutions & applicableSubstitutions && (getEmitFlags(node) & EmitFlags.LocalName) === 0) { + if (enabledSubstitutions & applicableSubstitutions && !isLocalName(node)) { // If we are nested within a namespace declaration, we may need to qualifiy // an identifier that is exported from a merged namespace. const container = resolver.getReferencedExportContainer(node, /*prefixLocals*/ false); - if (container) { + if (container && container.kind !== SyntaxKind.SourceFile) { const substitute = (applicableSubstitutions & TypeScriptSubstitutionFlags.NamespaceExports && container.kind === SyntaxKind.ModuleDeclaration) || (applicableSubstitutions & TypeScriptSubstitutionFlags.NonQualifiedEnumMembers && container.kind === SyntaxKind.EnumDeclaration); diff --git a/src/compiler/tsconfig.json b/src/compiler/tsconfig.json index a6c03d1b680..f63bdf20e34 100644 --- a/src/compiler/tsconfig.json +++ b/src/compiler/tsconfig.json @@ -30,6 +30,7 @@ "transformers/es2017.ts", "transformers/es2016.ts", "transformers/es2015.ts", + "transformers/es5.ts", "transformers/generators.ts", "transformers/es5.ts", "transformers/destructuring.ts", diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 041c0beb075..381289b133b 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -365,6 +365,8 @@ namespace ts { // Transformation nodes NotEmittedStatement, PartiallyEmittedExpression, + MergeDeclarationMarker, + EndOfDeclarationMarker, // Enum value count Count, @@ -460,7 +462,8 @@ namespace ts { ParameterPropertyModifier = AccessibilityModifier | Readonly, NonPublicAccessibilityModifier = Private | Protected, - TypeScriptModifier = Ambient | Public | Private | Protected | Readonly | Abstract | Const + TypeScriptModifier = Ambient | Public | Private | Protected | Readonly | Abstract | Const, + ExportDefault = Export | Default, } export const enum JsxFlags { @@ -548,6 +551,7 @@ namespace ts { originalKeywordKind?: SyntaxKind; // Original syntaxKind which get set so that we can report an error later /*@internal*/ autoGenerateKind?: GeneratedIdentifierKind; // Specifies whether to auto-generate the text for an identifier. /*@internal*/ autoGenerateId?: number; // Ensures unique generated identifiers get unique names, but clones get the same name. + isInJSDocNamespace?: boolean; // if the node is a member in a JSDoc namespace } // Transient identifier node (marked by id === -1) @@ -555,6 +559,14 @@ namespace ts { resolvedSymbol: Symbol; } + /*@internal*/ + export interface GeneratedIdentifier extends Identifier { + autoGenerateKind: GeneratedIdentifierKind.Auto + | GeneratedIdentifierKind.Loop + | GeneratedIdentifierKind.Unique + | GeneratedIdentifierKind.Node; + } + export interface QualifiedName extends Node { kind: SyntaxKind.QualifiedName; left: EntityName; @@ -1157,6 +1169,21 @@ namespace ts { right: Expression; } + export interface AssignmentExpression extends BinaryExpression { + left: LeftHandSideExpression; + operatorToken: Token; + } + + export interface ObjectDestructuringAssignment extends AssignmentExpression { + left: ObjectLiteralExpression; + } + + export interface ArrayDestructuringAssignment extends AssignmentExpression { + left: ArrayLiteralExpression; + } + + export type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment; + export interface ConditionalExpression extends Expression { kind: SyntaxKind.ConditionalExpression; condition: Expression; @@ -1429,6 +1456,22 @@ namespace ts { kind: SyntaxKind.NotEmittedStatement; } + /** + * Marks the end of transformed declaration to properly emit exports. + */ + /* @internal */ + export interface EndOfDeclarationMarker extends Statement { + kind: SyntaxKind.EndOfDeclarationMarker; + } + + /** + * Marks the beginning of a merged transformed declaration. + */ + /* @internal */ + export interface MergeDeclarationMarker extends Statement { + kind: SyntaxKind.MergeDeclarationMarker; + } + export interface EmptyStatement extends Statement { kind: SyntaxKind.EmptyStatement; } @@ -1645,7 +1688,7 @@ namespace ts { export interface ModuleDeclaration extends DeclarationStatement { kind: SyntaxKind.ModuleDeclaration; name: Identifier | LiteralExpression; - body?: ModuleBlock | NamespaceDeclaration; + body?: ModuleBlock | NamespaceDeclaration | JSDocNamespaceDeclaration | Identifier; } export interface NamespaceDeclaration extends ModuleDeclaration { @@ -1653,6 +1696,11 @@ namespace ts { body: ModuleBlock | NamespaceDeclaration; } + export interface JSDocNamespaceDeclaration extends ModuleDeclaration { + name: Identifier; + body: JSDocNamespaceDeclaration | Identifier; + } + export interface ModuleBlock extends Node, Statement { kind: SyntaxKind.ModuleBlock; statements: NodeArray; @@ -1882,6 +1930,7 @@ namespace ts { export interface JSDocTypedefTag extends JSDocTag, Declaration { kind: SyntaxKind.JSDocTypedefTag; + fullName?: JSDocNamespaceDeclaration | Identifier; name?: Identifier; typeExpression?: JSDocTypeExpression; jsDocTypeLiteral?: JSDocTypeLiteral; @@ -2035,6 +2084,9 @@ namespace ts { // as well as code diagnostics). /* @internal */ parseDiagnostics: Diagnostic[]; + // Stores additional file level diagnostics reported by the program + /* @internal */ additionalSyntacticDiagnostics?: Diagnostic[]; + // File level diagnostics reported by the binder. /* @internal */ bindDiagnostics: Diagnostic[]; @@ -2045,7 +2097,7 @@ namespace ts { // Stores a mapping 'external module reference text' -> 'resolved file name' | undefined // It is used to resolve module names in the checker. // Content of this field should never be used directly - use getResolvedModuleFileName/setResolvedModuleFileName functions instead - /* @internal */ resolvedModules: Map; + /* @internal */ resolvedModules: Map; /* @internal */ resolvedTypeReferenceDirectiveNames: Map; /* @internal */ imports: LiteralExpression[]; /* @internal */ moduleAugmentations: LiteralExpression[]; @@ -3060,6 +3112,7 @@ namespace ts { packageNameToTypingLocation: Map; // The map of package names to their cached typing locations typingOptions: TypingOptions; // Used to customize the typing inference process compilerOptions: CompilerOptions; // Used as a source for typing inference + unresolvedImports: ReadonlyArray; // List of unresolved module ids from imports } export enum ModuleKind { @@ -3118,6 +3171,7 @@ namespace ts { Pretty, } + /** Either a parsed command line or a parsed tsconfig.json */ export interface ParsedCommandLine { options: CompilerOptions; typingOptions?: TypingOptions; @@ -3323,10 +3377,18 @@ namespace ts { getDirectories?(path: string): string[]; } + /** + * Represents the result of module resolution. + * Module resolution will pick up tsx/jsx/js files even if '--jsx' and '--allowJs' are turned off. + * The Program will then filter results based on these flags. + * + * Prefer to return a `ResolvedModuleFull` so that the file type does not have to be inferred. + */ export interface ResolvedModule { + /** Path of the file the module was resolved to. */ resolvedFileName: string; - /* - * Denotes if 'resolvedFileName' is isExternalLibraryImport and thus should be proper external module: + /** + * Denotes if 'resolvedFileName' is isExternalLibraryImport and thus should be a proper external module: * - be a .d.ts file * - use top level imports\exports * - don't use tripleslash references @@ -3334,8 +3396,29 @@ namespace ts { isExternalLibraryImport?: boolean; } + /** + * ResolvedModule with an explicitly provided `extension` property. + * Prefer this over `ResolvedModule`. + */ + export interface ResolvedModuleFull extends ResolvedModule { + /** + * Extension of resolvedFileName. This must match what's at the end of resolvedFileName. + * This is optional for backwards-compatibility, but will be added if not provided. + */ + extension: Extension; + } + + export enum Extension { + Ts, + Tsx, + Dts, + Js, + Jsx, + LastTypeScriptExtension = Dts + } + export interface ResolvedModuleWithFailedLookupLocations { - resolvedModule: ResolvedModule; + resolvedModule: ResolvedModuleFull | undefined; failedLookupLocations: string[]; } @@ -3395,25 +3478,26 @@ namespace ts { ContainsES2016 = 1 << 7, ES2015 = 1 << 8, ContainsES2015 = 1 << 9, - DestructuringAssignment = 1 << 10, - Generator = 1 << 11, - ContainsGenerator = 1 << 12, + Generator = 1 << 10, + ContainsGenerator = 1 << 11, + DestructuringAssignment = 1 << 12, + ContainsDestructuringAssignment = 1 << 13, // Markers // - Flags used to indicate that a subtree contains a specific transformation. - ContainsDecorators = 1 << 13, - ContainsPropertyInitializer = 1 << 14, - ContainsLexicalThis = 1 << 15, - ContainsCapturedLexicalThis = 1 << 16, - ContainsLexicalThisInComputedPropertyName = 1 << 17, - ContainsDefaultValueAssignments = 1 << 18, - ContainsParameterPropertyAssignments = 1 << 19, - ContainsSpreadElementExpression = 1 << 20, - ContainsComputedPropertyName = 1 << 21, - ContainsBlockScopedBinding = 1 << 22, - ContainsBindingPattern = 1 << 23, - ContainsYield = 1 << 24, - ContainsHoistedDeclarationOrCompletion = 1 << 25, + ContainsDecorators = 1 << 14, + ContainsPropertyInitializer = 1 << 15, + ContainsLexicalThis = 1 << 16, + ContainsCapturedLexicalThis = 1 << 17, + ContainsLexicalThisInComputedPropertyName = 1 << 18, + ContainsDefaultValueAssignments = 1 << 19, + ContainsParameterPropertyAssignments = 1 << 20, + ContainsSpreadElementExpression = 1 << 21, + ContainsComputedPropertyName = 1 << 22, + ContainsBlockScopedBinding = 1 << 23, + ContainsBindingPattern = 1 << 24, + ContainsYield = 1 << 25, + ContainsHoistedDeclarationOrCompletion = 1 << 26, HasComputedFlags = 1 << 29, // Transform flags have been computed. @@ -3425,6 +3509,7 @@ namespace ts { AssertES2016 = ES2016 | ContainsES2016, AssertES2015 = ES2015 | ContainsES2015, AssertGenerator = Generator | ContainsGenerator, + AssertDestructuringAssignment = DestructuringAssignment | ContainsDestructuringAssignment, // Scope Exclusions // - Bitmasks that exclude flags from propagating out of a specific context @@ -3487,6 +3572,8 @@ namespace ts { AsyncFunctionBody = 1 << 21, ReuseTempVariableScope = 1 << 22, // Reuse the existing temp variable scope during emit. CustomPrologue = 1 << 23, // Treat the statement as if it were a prologue directive (NOTE: Prologue directives are *not* transformed). + NoHoisting = 1 << 24, // Do not hoist this declaration in --module system + HasEndOfDeclarationMarker = 1 << 25, // Declaration has an associated NotEmittedStatement to mark the end of the declaration } /* @internal */ diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index e2e401cfae4..299f91be662 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -83,36 +83,17 @@ namespace ts { return node.end - node.pos; } - export function arrayIsEqualTo(array1: ReadonlyArray, array2: ReadonlyArray, equaler?: (a: T, b: T) => boolean): boolean { - if (!array1 || !array2) { - return array1 === array2; - } - - if (array1.length !== array2.length) { - return false; - } - - for (let i = 0; i < array1.length; i++) { - const equals = equaler ? equaler(array1[i], array2[i]) : array1[i] === array2[i]; - if (!equals) { - return false; - } - } - - return true; - } - export function hasResolvedModule(sourceFile: SourceFile, moduleNameText: string): boolean { return !!(sourceFile && sourceFile.resolvedModules && sourceFile.resolvedModules[moduleNameText]); } - export function getResolvedModule(sourceFile: SourceFile, moduleNameText: string): ResolvedModule { + export function getResolvedModule(sourceFile: SourceFile, moduleNameText: string): ResolvedModuleFull { return hasResolvedModule(sourceFile, moduleNameText) ? sourceFile.resolvedModules[moduleNameText] : undefined; } - export function setResolvedModule(sourceFile: SourceFile, moduleNameText: string, resolvedModule: ResolvedModule): void { + export function setResolvedModule(sourceFile: SourceFile, moduleNameText: string, resolvedModule: ResolvedModuleFull): void { if (!sourceFile.resolvedModules) { - sourceFile.resolvedModules = createMap(); + sourceFile.resolvedModules = createMap(); } sourceFile.resolvedModules[moduleNameText] = resolvedModule; @@ -127,8 +108,10 @@ namespace ts { } /* @internal */ - export function moduleResolutionIsEqualTo(oldResolution: ResolvedModule, newResolution: ResolvedModule): boolean { - return oldResolution.resolvedFileName === newResolution.resolvedFileName && oldResolution.isExternalLibraryImport === newResolution.isExternalLibraryImport; + export function moduleResolutionIsEqualTo(oldResolution: ResolvedModuleFull, newResolution: ResolvedModuleFull): boolean { + return oldResolution.isExternalLibraryImport === newResolution.isExternalLibraryImport && + oldResolution.extension === newResolution.extension && + oldResolution.resolvedFileName === newResolution.resolvedFileName; } /* @internal */ @@ -406,7 +389,12 @@ namespace ts { export function isBlockOrCatchScoped(declaration: Declaration) { return (getCombinedNodeFlags(declaration) & NodeFlags.BlockScoped) !== 0 || - isCatchClauseVariableDeclaration(declaration); + isCatchClauseVariableDeclarationOrBindingElement(declaration); + } + + export function isCatchClauseVariableDeclarationOrBindingElement(declaration: Declaration) { + const node = getRootDeclaration(declaration); + return node.kind === SyntaxKind.VariableDeclaration && node.parent.kind === SyntaxKind.CatchClause; } export function isAmbientModule(node: Node): boolean { @@ -414,6 +402,7 @@ namespace ts { ((node).name.kind === SyntaxKind.StringLiteral || isGlobalScopeAugmentation(node)); } + /** Given a symbol for a module, checks that it is either an untyped import or a shorthand ambient module. */ export function isShorthandAmbientModuleSymbol(moduleSymbol: Symbol): boolean { return isShorthandAmbientModule(moduleSymbol.valueDeclaration); } @@ -489,13 +478,6 @@ namespace ts { } } - export function isCatchClauseVariableDeclaration(declaration: Declaration) { - return declaration && - declaration.kind === SyntaxKind.VariableDeclaration && - declaration.parent && - declaration.parent.kind === SyntaxKind.CatchClause; - } - // Return display name of an identifier // Computed property names will just be emitted as "[]", where is the source // text of the expression in the computed property. @@ -503,6 +485,17 @@ namespace ts { return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name); } + export function entityNameToString(name: EntityNameOrEntityNameExpression): string { + switch (name.kind) { + case SyntaxKind.Identifier: + return getFullWidth(name) === 0 ? unescapeIdentifier((name).text) : getTextOfNode(name); + case SyntaxKind.QualifiedName: + return entityNameToString((name).left) + "." + entityNameToString((name).right); + case SyntaxKind.PropertyAccessExpression: + return entityNameToString((name).expression) + "." + entityNameToString((name).name); + } + } + export function createDiagnosticForNode(node: Node, message: DiagnosticMessage, arg0?: string | number, arg1?: string | number, arg2?: string | number): Diagnostic { const sourceFile = getSourceFileOfNode(node); const span = getErrorSpanForNode(sourceFile, node); @@ -1060,17 +1053,19 @@ namespace ts { } export function getEntityNameFromTypeNode(node: TypeNode): EntityNameOrEntityNameExpression { - if (node) { - switch (node.kind) { - case SyntaxKind.TypeReference: - return (node).typeName; - case SyntaxKind.ExpressionWithTypeArguments: - Debug.assert(isEntityNameExpression((node).expression)); - return (node).expression; - case SyntaxKind.Identifier: - case SyntaxKind.QualifiedName: - return (node); - } + switch (node.kind) { + case SyntaxKind.TypeReference: + case SyntaxKind.JSDocTypeReference: + return (node).typeName; + + case SyntaxKind.ExpressionWithTypeArguments: + return isEntityNameExpression((node).expression) + ? (node).expression + : undefined; + + case SyntaxKind.Identifier: + case SyntaxKind.QualifiedName: + return (node); } return undefined; @@ -1975,14 +1970,16 @@ namespace ts { || positionIsSynthesized(node.end); } - export function getOriginalNode(node: Node): Node { + export function getOriginalNode(node: Node): Node; + export function getOriginalNode(node: Node, nodeTest: (node: Node) => node is T): T; + export function getOriginalNode(node: Node, nodeTest?: (node: Node) => boolean): Node { if (node) { while (node.original !== undefined) { node = node.original; } } - return node; + return !nodeTest || nodeTest(node) ? node : undefined; } /** @@ -3060,7 +3057,7 @@ namespace ts { } } - if (node.flags & NodeFlags.NestedNamespace) { + if (node.flags & NodeFlags.NestedNamespace || (node.kind === SyntaxKind.Identifier && (node).isInJSDocNamespace)) { flags |= ModifierFlags.Export; } @@ -3104,7 +3101,13 @@ namespace ts { } } - export function isDestructuringAssignment(node: Node): node is BinaryExpression { + export function isAssignmentExpression(node: Node): node is AssignmentExpression { + return isBinaryExpression(node) + && isAssignmentOperator(node.operatorToken.kind) + && isLeftHandSideExpression(node.left); + } + + export function isDestructuringAssignment(node: Node): node is DestructuringAssignment { if (isBinaryExpression(node)) { if (node.operatorToken.kind === SyntaxKind.EqualsToken) { const kind = node.left.kind; @@ -3528,9 +3531,21 @@ namespace ts { return positionIsSynthesized(range.pos) ? -1 : skipTrivia(sourceFile.text, range.pos); } - export function collectExternalModuleInfo(sourceFile: SourceFile) { + export interface ExternalModuleInfo { + externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[]; // imports of other external modules + exportSpecifiers: Map; // export specifiers by name + exportedBindings: Map; // exported names of local declarations + exportedNames: Identifier[]; // all exported names local to module + exportEquals: ExportAssignment | undefined; // an export= declaration if one was present + hasExportStarsToExportValues: boolean; // whether this module contains export* + } + + export function collectExternalModuleInfo(sourceFile: SourceFile, resolver: EmitResolver): ExternalModuleInfo { const externalImports: (ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration)[] = []; const exportSpecifiers = createMap(); + const exportedBindings = createMap(); + const uniqueExports = createMap(); + let hasExportDefault = false; let exportEquals: ExportAssignment = undefined; let hasExportStarsToExportValues = false; for (const node of sourceFile.statements) { @@ -3548,6 +3563,7 @@ namespace ts { // import x = require("mod") externalImports.push(node); } + break; case SyntaxKind.ExportDeclaration: @@ -3565,8 +3581,19 @@ namespace ts { else { // export { x, y } for (const specifier of (node).exportClause.elements) { - const name = (specifier.propertyName || specifier.name).text; - (exportSpecifiers[name] || (exportSpecifiers[name] = [])).push(specifier); + if (!uniqueExports[specifier.name.text]) { + const name = specifier.propertyName || specifier.name; + multiMapAdd(exportSpecifiers, name.text, specifier); + + const decl = resolver.getReferencedImportDeclaration(name) + || resolver.getReferencedValueDeclaration(name); + + if (decl) { + multiMapAdd(exportedBindings, getOriginalNodeId(decl), specifier.name); + } + + uniqueExports[specifier.name.text] = specifier.name; + } } } break; @@ -3577,10 +3604,94 @@ namespace ts { exportEquals = node; } break; + + case SyntaxKind.VariableStatement: + if (hasModifier(node, ModifierFlags.Export)) { + for (const decl of (node).declarationList.declarations) { + collectExportedVariableInfo(decl, uniqueExports); + } + } + break; + + case SyntaxKind.FunctionDeclaration: + if (hasModifier(node, ModifierFlags.Export)) { + if (hasModifier(node, ModifierFlags.Default)) { + // export default function() { } + if (!hasExportDefault) { + multiMapAdd(exportedBindings, getOriginalNodeId(node), getDeclarationName(node)); + hasExportDefault = true; + } + } + else { + // export function x() { } + const name = (node).name; + if (!uniqueExports[name.text]) { + multiMapAdd(exportedBindings, getOriginalNodeId(node), name); + uniqueExports[name.text] = name; + } + } + } + break; + + case SyntaxKind.ClassDeclaration: + if (hasModifier(node, ModifierFlags.Export)) { + if (hasModifier(node, ModifierFlags.Default)) { + // export default class { } + if (!hasExportDefault) { + multiMapAdd(exportedBindings, getOriginalNodeId(node), getDeclarationName(node)); + hasExportDefault = true; + } + } + else { + // export class x { } + const name = (node).name; + if (!uniqueExports[name.text]) { + multiMapAdd(exportedBindings, getOriginalNodeId(node), name); + uniqueExports[name.text] = name; + } + } + } + break; } } - return { externalImports, exportSpecifiers, exportEquals, hasExportStarsToExportValues }; + let exportedNames: Identifier[]; + for (const key in uniqueExports) { + exportedNames = ts.append(exportedNames, uniqueExports[key]); + } + + return { externalImports, exportSpecifiers, exportEquals, hasExportStarsToExportValues, exportedBindings, exportedNames }; + } + + function collectExportedVariableInfo(decl: VariableDeclaration | BindingElement, uniqueExports: Map) { + if (isBindingPattern(decl.name)) { + for (const element of decl.name.elements) { + if (!isOmittedExpression(element)) { + collectExportedVariableInfo(element, uniqueExports); + } + } + } + else if (!isGeneratedIdentifier(decl.name)) { + if (!uniqueExports[decl.name.text]) { + uniqueExports[decl.name.text] = decl.name; + } + } + } + + /** + * Determines whether a name was originally the declaration name of an enum or namespace + * declaration. + */ + export function isDeclarationNameOfEnumOrNamespace(node: Identifier) { + const parseNode = getParseTreeNode(node); + if (parseNode) { + switch (parseNode.parent.kind) { + case SyntaxKind.EnumDeclaration: + case SyntaxKind.ModuleDeclaration: + return parseNode === (parseNode.parent).name; + } + } + return false; } export function getInitializedVariables(node: VariableDeclarationList) { @@ -3668,7 +3779,7 @@ namespace ts { return node.kind === SyntaxKind.Identifier; } - export function isGeneratedIdentifier(node: Node): boolean { + export function isGeneratedIdentifier(node: Node): node is GeneratedIdentifier { // Using `>` here catches both `GeneratedIdentifierKind.None` and `undefined`. return isIdentifier(node) && node.autoGenerateKind > GeneratedIdentifierKind.None; } @@ -3804,6 +3915,14 @@ namespace ts { // Expression + export function isArrayLiteralExpression(node: Node): node is ArrayLiteralExpression { + return node.kind === SyntaxKind.ArrayLiteralExpression; + } + + export function isObjectLiteralExpression(node: Node): node is ObjectLiteralExpression { + return node.kind === SyntaxKind.ObjectLiteralExpression; + } + export function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression { return node.kind === SyntaxKind.PropertyAccessExpression; } @@ -4063,7 +4182,9 @@ namespace ts { || kind === SyntaxKind.VariableStatement || kind === SyntaxKind.WhileStatement || kind === SyntaxKind.WithStatement - || kind === SyntaxKind.NotEmittedStatement; + || kind === SyntaxKind.NotEmittedStatement + || kind === SyntaxKind.EndOfDeclarationMarker + || kind === SyntaxKind.MergeDeclarationMarker; } export function isDeclaration(node: Node): node is Declaration { diff --git a/src/compiler/visitor.ts b/src/compiler/visitor.ts index 7d5558d5fb2..609031a8221 100644 --- a/src/compiler/visitor.ts +++ b/src/compiler/visitor.ts @@ -692,7 +692,7 @@ namespace ts { // Signature elements case SyntaxKind.Parameter: - return updateParameterDeclaration(node, + return updateParameter(node, visitNodes((node).decorators, visitor, isDecorator), visitNodes((node).modifiers, visitor, isModifier), visitNode((node).name, visitor, isBindingName), diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index e9fa5d6be2e..b008ca65370 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -438,9 +438,8 @@ namespace FourSlash { private getAllDiagnostics(): ts.Diagnostic[] { const diagnostics: ts.Diagnostic[] = []; - const fileNames = this.languageServiceAdapterHost.getFilenames(); - for (let i = 0, n = fileNames.length; i < n; i++) { - diagnostics.push.apply(this.getDiagnostics(fileNames[i])); + for (const fileName of this.languageServiceAdapterHost.getFilenames()) { + diagnostics.push.apply(this.getDiagnostics(fileName)); } return diagnostics; @@ -580,12 +579,12 @@ namespace FourSlash { this.raiseError(`goToDefinitions failed - expected to find ${endMarkers.length} definitions but got ${definitions.length}`); } - for (let i = 0; i < endMarkers.length; i++) { - const marker = this.getMarkerByName(endMarkers[i]), definition = definitions[i]; + ts.zipWith(endMarkers, definitions, (endMarker, definition, i) => { + const marker = this.getMarkerByName(endMarker); if (marker.fileName !== definition.fileName || marker.position !== definition.textSpan.start) { this.raiseError(`goToDefinition failed for definition ${i}: expected ${marker.fileName} at ${marker.position}, got ${definition.fileName} at ${definition.textSpan.start}`); } - } + }); } public verifyGetEmitOutputForCurrentFile(expected: string): void { @@ -602,10 +601,10 @@ namespace FourSlash { public verifyGetEmitOutputContentsForCurrentFile(expected: ts.OutputFile[]): void { const emit = this.languageService.getEmitOutput(this.activeFile.fileName); assert.equal(emit.outputFiles.length, expected.length, "Number of emit output files"); - for (let i = 0; i < emit.outputFiles.length; i++) { - assert.equal(emit.outputFiles[i].name, expected[i].name, "FileName"); - assert.equal(emit.outputFiles[i].text, expected[i].text, "Content"); - } + ts.zipWith(emit.outputFiles, expected, (outputFile, expected) => { + assert.equal(outputFile.name, expected.name, "FileName"); + assert.equal(outputFile.text, expected.text, "Content"); + }); } public verifyMemberListContains(symbol: string, text?: string, documentation?: string, kind?: string) { @@ -668,9 +667,9 @@ namespace FourSlash { const entries = this.getCompletionListAtCaret().entries; assert.isTrue(items.length <= entries.length, `Amount of expected items in completion list [ ${items.length} ] is greater than actual number of items in list [ ${entries.length} ]`); - for (let i = 0; i < items.length; i++) { - assert.equal(entries[i].name, items[i], `Unexpected item in completion list`); - } + ts.zipWith(entries, items, (entry, item) => { + assert.equal(entry.name, item, `Unexpected item in completion list`); + }); } public noItemsWithSameNameButDifferentKind(): void { @@ -692,15 +691,7 @@ namespace FourSlash { this.raiseError("Member list is empty at Caret"); } else if ((members && members.entries.length !== 0) && !negative) { - - let errorMsg = "\n" + "Member List contains: [" + members.entries[0].name; - for (let i = 1; i < members.entries.length; i++) { - errorMsg += ", " + members.entries[i].name; - } - errorMsg += "]\n"; - - this.raiseError("Member list is not empty at Caret: " + errorMsg); - + this.raiseError(`Member list is not empty at Caret:\nMember List contains: ${stringify(members.entries.map(e => e.name))}`); } } @@ -710,13 +701,8 @@ namespace FourSlash { this.raiseError("Completion list is empty at caret at position " + this.activeFile.fileName + " " + this.currentCaretPosition); } else if (completions && completions.entries.length !== 0 && !negative) { - let errorMsg = "\n" + "Completion List contains: [" + completions.entries[0].name; - for (let i = 1; i < completions.entries.length; i++) { - errorMsg += ", " + completions.entries[i].name; - } - errorMsg += "]\n"; - - this.raiseError("Completion list is not empty at caret at position " + this.activeFile.fileName + " " + this.currentCaretPosition + errorMsg); + this.raiseError(`Completion list is not empty at caret at position ${this.activeFile.fileName} ${this.currentCaretPosition}\n` + + `Completion List contains: ${stringify(completions.entries.map(e => e.name))}`); } } @@ -890,8 +876,7 @@ namespace FourSlash { } private verifyReferencesWorker(references: ts.ReferenceEntry[], fileName: string, start: number, end: number, isWriteAccess?: boolean, isDefinition?: boolean) { - for (let i = 0; i < references.length; i++) { - const reference = references[i]; + for (const reference of references) { if (reference && reference.fileName === fileName && reference.textSpan.start === start && ts.textSpanEnd(reference.textSpan) === end) { if (typeof isWriteAccess !== "undefined" && reference.isWriteAccess !== isWriteAccess) { this.raiseError(`verifyReferencesAtPositionListContains failed - item isWriteAccess value does not match, actual: ${reference.isWriteAccess}, expected: ${isWriteAccess}.`); @@ -1008,16 +993,11 @@ namespace FourSlash { ranges = ranges.sort((r1, r2) => r1.start - r2.start); references = references.sort((r1, r2) => r1.textSpan.start - r2.textSpan.start); - for (let i = 0, n = ranges.length; i < n; i++) { - const reference = references[i]; - const range = ranges[i]; - - if (reference.textSpan.start !== range.start || - ts.textSpanEnd(reference.textSpan) !== range.end) { - + ts.zipWith(references, ranges, (reference, range) => { + if (reference.textSpan.start !== range.start || ts.textSpanEnd(reference.textSpan) !== range.end) { this.raiseError("Rename location results do not match.\n\nExpected: " + stringify(ranges) + "\n\nActual:" + JSON.stringify(references)); } - } + }); } else { this.raiseError("Expected rename to succeed, but it actually failed."); @@ -1247,8 +1227,7 @@ namespace FourSlash { const emitFiles: FourSlashFile[] = []; // List of FourSlashFile that has emitThisFile flag on const allFourSlashFiles = this.testData.files; - for (let idx = 0; idx < allFourSlashFiles.length; idx++) { - const file = allFourSlashFiles[idx]; + for (const file of allFourSlashFiles) { if (file.fileOptions[metadataOptionNames.emitThisFile] === "true") { // Find a file with the flag emitThisFile turned on emitFiles.push(file); @@ -1273,8 +1252,8 @@ namespace FourSlash { if (emitOutput.emitSkipped) { resultString += "Diagnostics:" + Harness.IO.newLine(); const diagnostics = ts.getPreEmitDiagnostics(this.languageService.getProgram()); - for (let i = 0, n = diagnostics.length; i < n; i++) { - resultString += " " + diagnostics[0].messageText + Harness.IO.newLine(); + for (const diagnostic of diagnostics) { + resultString += " " + diagnostic.messageText + Harness.IO.newLine(); } } @@ -1340,8 +1319,7 @@ namespace FourSlash { } public printCurrentFileState(makeWhitespaceVisible = false, makeCaretVisible = true) { - for (let i = 0; i < this.testData.files.length; i++) { - const file = this.testData.files[i]; + for (const file of this.testData.files) { const active = (this.activeFile === file); Harness.IO.log(`=== Script (${file.fileName}) ${(active ? "(active, cursor at |)" : "")} ===`); let content = this.getFileContent(file.fileName); @@ -1576,10 +1554,10 @@ namespace FourSlash { edits = edits.sort((a, b) => a.span.start - b.span.start); // Get a snapshot of the content of the file so we can make sure any formatting edits didn't destroy non-whitespace characters const oldContent = this.getFileContent(this.activeFile.fileName); - for (let j = 0; j < edits.length; j++) { - this.languageServiceAdapterHost.editScript(fileName, edits[j].span.start + runningOffset, ts.textSpanEnd(edits[j].span) + runningOffset, edits[j].newText); - this.updateMarkersForEdit(fileName, edits[j].span.start + runningOffset, ts.textSpanEnd(edits[j].span) + runningOffset, edits[j].newText); - const change = (edits[j].span.start - ts.textSpanEnd(edits[j].span)) + edits[j].newText.length; + for (const edit of edits) { + this.languageServiceAdapterHost.editScript(fileName, edit.span.start + runningOffset, ts.textSpanEnd(edit.span) + runningOffset, edit.newText); + this.updateMarkersForEdit(fileName, edit.span.start + runningOffset, ts.textSpanEnd(edit.span) + runningOffset, edit.newText); + const change = (edit.span.start - ts.textSpanEnd(edit.span)) + edit.newText.length; runningOffset += change; // TODO: Consider doing this at least some of the time for higher fidelity. Currently causes a failure (bug 707150) // this.languageService.getScriptLexicalStructure(fileName); @@ -1913,10 +1891,7 @@ namespace FourSlash { jsonMismatchString()); } - for (let i = 0; i < expected.length; i++) { - const expectedClassification = expected[i]; - const actualClassification = actual[i]; - + ts.zipWith(expected, actual, (expectedClassification, actualClassification) => { const expectedType: string = (ts.ClassificationTypeNames)[expectedClassification.classificationType]; if (expectedType !== actualClassification.classificationType) { this.raiseError("verifyClassifications failed - expected classifications type to be " + @@ -1946,7 +1921,7 @@ namespace FourSlash { actualText + jsonMismatchString()); } - } + }); function jsonMismatchString() { return Harness.IO.newLine() + @@ -1991,13 +1966,11 @@ namespace FourSlash { this.raiseError(`verifyOutliningSpans failed - expected total spans to be ${spans.length}, but was ${actual.length}`); } - for (let i = 0; i < spans.length; i++) { - const expectedSpan = spans[i]; - const actualSpan = actual[i]; + ts.zipWith(spans, actual, (expectedSpan, actualSpan, i) => { if (expectedSpan.start !== actualSpan.textSpan.start || expectedSpan.end !== ts.textSpanEnd(actualSpan.textSpan)) { this.raiseError(`verifyOutliningSpans failed - span ${(i + 1)} expected: (${expectedSpan.start},${expectedSpan.end}), actual: (${actualSpan.textSpan.start},${ts.textSpanEnd(actualSpan.textSpan)})`); } - } + }); } public verifyTodoComments(descriptors: string[], spans: TextSpan[]) { @@ -2008,15 +1981,13 @@ namespace FourSlash { this.raiseError(`verifyTodoComments failed - expected total spans to be ${spans.length}, but was ${actual.length}`); } - for (let i = 0; i < spans.length; i++) { - const expectedSpan = spans[i]; - const actualComment = actual[i]; + ts.zipWith(spans, actual, (expectedSpan, actualComment, i) => { const actualCommentSpan = ts.createTextSpan(actualComment.position, actualComment.message.length); if (expectedSpan.start !== actualCommentSpan.start || expectedSpan.end !== ts.textSpanEnd(actualCommentSpan)) { this.raiseError(`verifyOutliningSpans failed - span ${(i + 1)} expected: (${expectedSpan.start},${expectedSpan.end}), actual: (${actualCommentSpan.start},${ts.textSpanEnd(actualCommentSpan)})`); } - } + }); } private getCodeFixes(errorCode?: number) { @@ -2163,11 +2134,9 @@ namespace FourSlash { public verifyNavigationItemsCount(expected: number, searchValue: string, matchKind?: string, fileName?: string) { const items = this.languageService.getNavigateToItems(searchValue, /*maxResultCount*/ undefined, fileName); let actual = 0; - let item: ts.NavigateToItem; // Count only the match that match the same MatchKind - for (let i = 0; i < items.length; i++) { - item = items[i]; + for (const item of items) { if (!matchKind || item.matchKind === matchKind) { actual++; } @@ -2195,8 +2164,7 @@ namespace FourSlash { this.raiseError("verifyNavigationItemsListContains failed - found 0 navigation items, expected at least one."); } - for (let i = 0; i < items.length; i++) { - const item = items[i]; + for (const item of items) { if (item && item.name === name && item.kind === kind && (matchKind === undefined || item.matchKind === matchKind) && (fileName === undefined || item.fileName === fileName) && @@ -2247,24 +2215,16 @@ namespace FourSlash { public printNavigationItems(searchValue: string) { const items = this.languageService.getNavigateToItems(searchValue); - const length = items && items.length; - - Harness.IO.log(`NavigationItems list (${length} items)`); - - for (let i = 0; i < length; i++) { - const item = items[i]; + Harness.IO.log(`NavigationItems list (${items.length} items)`); + for (const item of items) { Harness.IO.log(`name: ${item.name}, kind: ${item.kind}, parentName: ${item.containerName}, fileName: ${item.fileName}`); } } public printNavigationBar() { const items = this.languageService.getNavigationBarItems(this.activeFile.fileName); - const length = items && items.length; - - Harness.IO.log(`Navigation bar (${length} items)`); - - for (let i = 0; i < length; i++) { - const item = items[i]; + Harness.IO.log(`Navigation bar (${items.length} items)`); + for (const item of items) { Harness.IO.log(`${repeatString(item.indent, " ")}name: ${item.text}, kind: ${item.kind}, childItems: ${item.childItems.map(child => child.text)}`); } } @@ -2385,8 +2345,7 @@ namespace FourSlash { } private assertItemInCompletionList(items: ts.CompletionEntry[], name: string, text?: string, documentation?: string, kind?: string, spanIndex?: number) { - for (let i = 0; i < items.length; i++) { - const item = items[i]; + for (const item of items) { if (item.name === name) { if (documentation != undefined || text !== undefined) { const details = this.getCompletionEntryDetails(item.name); @@ -2435,20 +2394,17 @@ namespace FourSlash { name = name.indexOf("/") === -1 ? (this.basePath + "/" + name) : name; const availableNames: string[] = []; - let foundIt = false; - for (let i = 0; i < this.testData.files.length; i++) { - const fn = this.testData.files[i].fileName; + result = ts.forEach(this.testData.files, file => { + const fn = file.fileName; if (fn) { if (fn === name) { - result = this.testData.files[i]; - foundIt = true; - break; + return file; } availableNames.push(fn); } - } + }); - if (!foundIt) { + if (!result) { throw new Error(`No test file named "${name}" exists. Available file names are: ${availableNames.join(", ")}`); } } @@ -2549,8 +2505,8 @@ ${code} function chompLeadingSpace(content: string) { const lines = content.split("\n"); - for (let i = 0; i < lines.length; i++) { - if ((lines[i].length !== 0) && (lines[i].charAt(0) !== " ")) { + for (const line of lines) { + if ((line.length !== 0) && (line.charAt(0) !== " ")) { return content; } } @@ -2588,8 +2544,7 @@ ${code} currentFileName = fileName; } - for (let i = 0; i < lines.length; i++) { - let line = lines[i]; + for (let line of lines) { const lineLength = line.length; if (lineLength > 0 && line.charAt(lineLength - 1) === "\r") { diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 409ab9e2fcc..a6e1ffad7f7 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -1029,7 +1029,7 @@ namespace Harness { }, realpath: realPathMap && ((f: string) => { const path = ts.toPath(f, currentDirectory, getCanonicalFileName); - return realPathMap.contains(path) ? realPathMap.get(path) : path; + return realPathMap.get(path) || path; }), directoryExists: dir => { let path = ts.toPath(dir, currentDirectory, getCanonicalFileName); @@ -1037,13 +1037,7 @@ namespace Harness { if (path[path.length - 1] === "/") { path = path.substr(0, path.length - 1); } - let exists = false; - fileMap.forEachValue(key => { - if (key.indexOf(path) === 0 && key[path.length] === "/") { - exists = true; - } - }); - return exists; + return mapHasFileInDirectory(path, fileMap) || mapHasFileInDirectory(path, realPathMap); }, getDirectories: d => { const path = ts.toPath(d, currentDirectory, getCanonicalFileName); @@ -1064,6 +1058,19 @@ namespace Harness { }; } + function mapHasFileInDirectory(directoryPath: ts.Path, map: ts.FileMap): boolean { + if (!map) { + return false; + } + let exists = false; + map.forEachValue(fileName => { + if (!exists && ts.startsWith(fileName, directoryPath) && fileName[directoryPath.length] === "/") { + exists = true; + } + }); + return exists; + } + interface HarnessOptions { useCaseSensitiveFileNames?: boolean; includeBuiltFile?: string; @@ -1108,22 +1115,7 @@ namespace Harness { const option = getCommandLineOption(name); if (option) { const errors: ts.Diagnostic[] = []; - switch (option.type) { - case "boolean": - options[option.name] = value.toLowerCase() === "true"; - break; - case "string": - options[option.name] = value; - break; - // If not a primitive, the possible types are specified in what is effectively a map of options. - case "list": - options[option.name] = ts.parseListTypeOption(option, value, errors); - break; - default: - options[option.name] = ts.parseCustomTypeOption(option, value, errors); - break; - } - + options[option.name] = optionValue(option, value, errors); if (errors.length > 0) { throw new Error(`Unknown value '${value}' for compiler option '${name}'.`); } @@ -1135,6 +1127,27 @@ namespace Harness { } } + function optionValue(option: ts.CommandLineOption, value: string, errors: ts.Diagnostic[]): any { + switch (option.type) { + case "boolean": + return value.toLowerCase() === "true"; + case "string": + return value; + case "number": { + const number = parseInt(value, 10); + if (isNaN(number)) { + throw new Error(`Value must be a number, got: ${JSON.stringify(value)}`); + } + return number; + } + // If not a primitive, the possible types are specified in what is effectively a map of options. + case "list": + return ts.parseListTypeOption(option, value, errors); + default: + return ts.parseCustomTypeOption(option, value, errors); + } + } + export interface TestFile { unitName: string; content: string; @@ -1238,7 +1251,7 @@ namespace Harness { if (options.declaration && result.errors.length === 0 && result.declFilesCode.length > 0) { ts.forEach(inputFiles, file => addDtsFile(file, declInputFiles)); ts.forEach(otherFiles, file => addDtsFile(file, declOtherFiles)); - const output = compileFiles(declInputFiles, declOtherFiles, harnessSettings, options, currentDirectory); + const output = compileFiles(declInputFiles, declOtherFiles, harnessSettings, options, currentDirectory || harnessSettings["currentDirectory"]); return { declInputFiles, declOtherFiles, declResult: output.result }; } diff --git a/src/harness/tsconfig.json b/src/harness/tsconfig.json index e4099d3014c..8bf3139b9de 100644 --- a/src/harness/tsconfig.json +++ b/src/harness/tsconfig.json @@ -32,6 +32,7 @@ "../compiler/transformers/es2017.ts", "../compiler/transformers/es2016.ts", "../compiler/transformers/es2015.ts", + "../compiler/transformers/es5.ts", "../compiler/transformers/generators.ts", "../compiler/transformers/es5.ts", "../compiler/transformers/destructuring.ts", diff --git a/src/harness/unittests/matchFiles.ts b/src/harness/unittests/matchFiles.ts index 6b499e56989..b514ac142c5 100644 --- a/src/harness/unittests/matchFiles.ts +++ b/src/harness/unittests/matchFiles.ts @@ -3,6 +3,7 @@ namespace ts { const caseInsensitiveBasePath = "c:/dev/"; + const caseInsensitiveTsconfigPath = "c:/dev/tsconfig.json"; const caseInsensitiveHost = new Utils.MockParseConfigHost(caseInsensitiveBasePath, /*useCaseSensitiveFileNames*/ false, [ "c:/dev/a.ts", "c:/dev/a.d.ts", @@ -88,6 +89,14 @@ namespace ts { "c:/dev/g.min.js/.g/g.ts" ]); + const defaultExcludes = ["node_modules", "bower_components", "jspm_packages"]; + + function assertParsed(actual: ts.ParsedCommandLine, expected: ts.ParsedCommandLine): void { + assert.deepEqual(actual.fileNames, expected.fileNames); + assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); + assert.deepEqual(actual.errors, expected.errors); + } + describe("matchFiles", () => { describe("with literal file list", () => { it("without exclusions", () => { @@ -107,9 +116,7 @@ namespace ts { wildcardDirectories: {}, }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("missing files are still present", () => { const json = { @@ -128,9 +135,7 @@ namespace ts { wildcardDirectories: {}, }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("are not removed due to excludes", () => { const json = { @@ -152,9 +157,7 @@ namespace ts { wildcardDirectories: {}, }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); }); @@ -176,9 +179,7 @@ namespace ts { wildcardDirectories: {}, }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with non .ts file extensions are excluded", () => { const json = { @@ -189,14 +190,15 @@ namespace ts { }; const expected: ts.ParsedCommandLine = { options: {}, - errors: [], + errors: [ + ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, + caseInsensitiveTsconfigPath, JSON.stringify(json.include), JSON.stringify(defaultExcludes)) + ], fileNames: [], wildcardDirectories: {}, }; - const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath, undefined, caseInsensitiveTsconfigPath); + assertParsed(actual, expected); }); it("with missing files are excluded", () => { const json = { @@ -207,14 +209,15 @@ namespace ts { }; const expected: ts.ParsedCommandLine = { options: {}, - errors: [], + errors: [ + ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, + caseInsensitiveTsconfigPath, JSON.stringify(json.include), JSON.stringify(defaultExcludes)) + ], fileNames: [], wildcardDirectories: {}, }; - const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath, undefined, caseInsensitiveTsconfigPath); + assertParsed(actual, expected); }); it("with literal excludes", () => { const json = { @@ -235,9 +238,7 @@ namespace ts { wildcardDirectories: {}, }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with wildcard excludes", () => { const json = { @@ -265,9 +266,7 @@ namespace ts { wildcardDirectories: {}, }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with recursive excludes", () => { const json = { @@ -294,9 +293,7 @@ namespace ts { wildcardDirectories: {}, }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with case sensitive exclude", () => { const json = { @@ -316,9 +313,7 @@ namespace ts { wildcardDirectories: {}, }; const actual = ts.parseJsonConfigFileContent(json, caseSensitiveHost, caseSensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with common package folders and no exclusions", () => { const json = { @@ -340,9 +335,7 @@ namespace ts { wildcardDirectories: {}, }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveCommonFoldersHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with common package folders and exclusions", () => { const json = { @@ -369,9 +362,7 @@ namespace ts { wildcardDirectories: {}, }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveCommonFoldersHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with common package folders and empty exclude", () => { const json = { @@ -397,9 +388,7 @@ namespace ts { wildcardDirectories: {}, }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveCommonFoldersHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); }); @@ -423,9 +412,7 @@ namespace ts { }, }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("`*` matches only ts files", () => { const json = { @@ -446,9 +433,7 @@ namespace ts { }, }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("`?` matches only a single character", () => { const json = { @@ -468,9 +453,7 @@ namespace ts { }, }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with recursive directory", () => { const json = { @@ -492,9 +475,7 @@ namespace ts { }, }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with multiple recursive directories", () => { const json = { @@ -518,9 +499,7 @@ namespace ts { }, }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("case sensitive", () => { const json = { @@ -539,9 +518,7 @@ namespace ts { }, }; const actual = ts.parseJsonConfigFileContent(json, caseSensitiveHost, caseSensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with missing files are excluded", () => { const json = { @@ -551,16 +528,17 @@ namespace ts { }; const expected: ts.ParsedCommandLine = { options: {}, - errors: [], + errors: [ + ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, + caseInsensitiveTsconfigPath, JSON.stringify(json.include), JSON.stringify(defaultExcludes)) + ], fileNames: [], wildcardDirectories: { "c:/dev": ts.WatchDirectoryFlags.Recursive }, }; - const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath, undefined, caseInsensitiveTsconfigPath); + assertParsed(actual, expected); }); it("always include literal files", () => { const json = { @@ -585,9 +563,7 @@ namespace ts { }, }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("exclude folders", () => { const json = { @@ -612,14 +588,12 @@ namespace ts { } }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with common package folders and no exclusions", () => { const json = { include: [ - "**/a.ts" + "**/a.ts" ] }; const expected: ts.ParsedCommandLine = { @@ -633,9 +607,7 @@ namespace ts { }, }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveCommonFoldersHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with common package folders and exclusions", () => { const json = { @@ -659,9 +631,7 @@ namespace ts { }, }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveCommonFoldersHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with common package folders and empty exclude", () => { const json = { @@ -684,9 +654,7 @@ namespace ts { }, }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveCommonFoldersHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("exclude .js files when allowJs=false", () => { const json = { @@ -701,16 +669,17 @@ namespace ts { options: { allowJs: false }, - errors: [], + errors: [ + ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, + caseInsensitiveTsconfigPath, JSON.stringify(json.include), JSON.stringify(defaultExcludes)) + ], fileNames: [], wildcardDirectories: { "c:/dev/js": ts.WatchDirectoryFlags.None } }; - const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath, undefined, caseInsensitiveTsconfigPath); + assertParsed(actual, expected); }); it("include .js files when allowJs=true", () => { const json = { @@ -735,9 +704,7 @@ namespace ts { } }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("include explicitly listed .min.js files when allowJs=true", () => { const json = { @@ -762,9 +729,7 @@ namespace ts { } }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("include paths outside of the project", () => { const json = { @@ -788,9 +753,7 @@ namespace ts { } }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("include paths outside of the project using relative paths", () => { const json = { @@ -813,9 +776,7 @@ namespace ts { } }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("exclude paths outside of the project using relative paths", () => { const json = { @@ -828,14 +789,15 @@ namespace ts { }; const expected: ts.ParsedCommandLine = { options: {}, - errors: [], + errors: [ + ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, + caseInsensitiveTsconfigPath, JSON.stringify(json.include), JSON.stringify(json.exclude))] + , fileNames: [], wildcardDirectories: {} }; - const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath, undefined, caseInsensitiveTsconfigPath); + assertParsed(actual, expected); }); it("include files with .. in their name", () => { const json = { @@ -855,9 +817,7 @@ namespace ts { wildcardDirectories: {} }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("exclude files with .. in their name", () => { const json = { @@ -879,9 +839,7 @@ namespace ts { } }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with jsx=none, allowJs=false", () => { const json = { @@ -904,9 +862,7 @@ namespace ts { } }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveMixedExtensionHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with jsx=preserve, allowJs=false", () => { const json = { @@ -931,9 +887,7 @@ namespace ts { } }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveMixedExtensionHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with jsx=none, allowJs=true", () => { const json = { @@ -958,9 +912,7 @@ namespace ts { } }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveMixedExtensionHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with jsx=preserve, allowJs=true", () => { const json = { @@ -987,9 +939,7 @@ namespace ts { } }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveMixedExtensionHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("exclude .min.js files using wildcards", () => { const json = { @@ -1016,9 +966,7 @@ namespace ts { } }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); describe("with trailing recursive directory", () => { it("in includes", () => { @@ -1030,15 +978,15 @@ namespace ts { const expected: ts.ParsedCommandLine = { options: {}, errors: [ - ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, "**") + ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, "**"), + ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, + caseInsensitiveTsconfigPath, JSON.stringify(json.include), JSON.stringify(defaultExcludes)) ], fileNames: [], wildcardDirectories: {} }; - const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath, undefined, caseInsensitiveTsconfigPath); + assertParsed(actual, expected); }); it("in excludes", () => { const json = { @@ -1051,14 +999,15 @@ namespace ts { }; const expected: ts.ParsedCommandLine = { options: {}, - errors: [], + errors: [ + ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, + caseInsensitiveTsconfigPath, JSON.stringify(json.include), JSON.stringify(json.exclude)) + ], fileNames: [], wildcardDirectories: {} }; - const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath, undefined, caseInsensitiveTsconfigPath); + assertParsed(actual, expected); }); }); describe("with multiple recursive directory patterns", () => { @@ -1071,15 +1020,15 @@ namespace ts { const expected: ts.ParsedCommandLine = { options: {}, errors: [ - ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0, "**/x/**/*") + ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_contain_multiple_recursive_directory_wildcards_Asterisk_Asterisk_Colon_0, "**/x/**/*"), + ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, + caseInsensitiveTsconfigPath, JSON.stringify(json.include), JSON.stringify(defaultExcludes)) ], fileNames: [], wildcardDirectories: {} }; - const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath, undefined, caseInsensitiveTsconfigPath); + assertParsed(actual, expected); }); it("in excludes", () => { const json = { @@ -1106,9 +1055,7 @@ namespace ts { } }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); }); @@ -1122,15 +1069,15 @@ namespace ts { const expected: ts.ParsedCommandLine = { options: {}, errors: [ - ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, "**/../*") + ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, "**/../*"), + ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, + caseInsensitiveTsconfigPath, JSON.stringify(json.include), JSON.stringify(defaultExcludes)) ], fileNames: [], wildcardDirectories: {} }; - const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath, undefined, caseInsensitiveTsconfigPath); + assertParsed(actual, expected); }); it("in includes after a subdirectory", () => { @@ -1142,15 +1089,15 @@ namespace ts { const expected: ts.ParsedCommandLine = { options: {}, errors: [ - ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, "**/y/../*") + ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, "**/y/../*"), + ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, + caseInsensitiveTsconfigPath, JSON.stringify(json.include), JSON.stringify(defaultExcludes)) ], fileNames: [], wildcardDirectories: {} }; - const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath, undefined, caseInsensitiveTsconfigPath); + assertParsed(actual, expected); }); it("in excludes immediately after", () => { @@ -1178,9 +1125,7 @@ namespace ts { } }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("in excludes after a subdirectory", () => { @@ -1195,7 +1140,7 @@ namespace ts { const expected: ts.ParsedCommandLine = { options: {}, errors: [ - ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, "**/y/..") + ts.createCompilerDiagnostic(ts.Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, "**/y/..") ], fileNames: [ "c:/dev/a.ts", @@ -1208,9 +1153,25 @@ namespace ts { } }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); + }); + }); + + describe("with implicit globbification", () => { + it("Expands 'z' to 'z/**/*'", () => { + const json = { + include: ["z"] + }; + const expected: ts.ParsedCommandLine = { + options: {}, + errors: [], + fileNames: [ "a.ts", "aba.ts", "abz.ts", "b.ts", "bba.ts", "bbz.ts" ].map(x => `c:/dev/z/${x}`), + wildcardDirectories: { + "c:/dev/z": ts.WatchDirectoryFlags.Recursive + } + }; + const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveHost, caseInsensitiveBasePath); + assertParsed(actual, expected); }); }); }); @@ -1235,9 +1196,7 @@ namespace ts { } }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveDottedFoldersHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); describe("that are explicitly included", () => { it("without wildcards", () => { @@ -1257,9 +1216,7 @@ namespace ts { wildcardDirectories: {} }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveDottedFoldersHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with recursive wildcards that match directories", () => { const json = { @@ -1281,9 +1238,7 @@ namespace ts { } }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveDottedFoldersHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with recursive wildcards that match nothing", () => { const json = { @@ -1305,9 +1260,7 @@ namespace ts { } }; const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveDottedFoldersHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + assertParsed(actual, expected); }); it("with wildcard excludes that implicitly exclude dotted files", () => { const json = { @@ -1320,14 +1273,15 @@ namespace ts { }; const expected: ts.ParsedCommandLine = { options: {}, - errors: [], + errors: [ + ts.createCompilerDiagnostic(ts.Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, + caseInsensitiveTsconfigPath, JSON.stringify(json.include), JSON.stringify(json.exclude)) + ], fileNames: [], wildcardDirectories: {} }; - const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveDottedFoldersHost, caseInsensitiveBasePath); - assert.deepEqual(actual.fileNames, expected.fileNames); - assert.deepEqual(actual.wildcardDirectories, expected.wildcardDirectories); - assert.deepEqual(actual.errors, expected.errors); + const actual = ts.parseJsonConfigFileContent(json, caseInsensitiveDottedFoldersHost, caseInsensitiveBasePath, undefined, caseInsensitiveTsconfigPath); + assertParsed(actual, expected); }); }); }); diff --git a/src/harness/unittests/moduleResolution.ts b/src/harness/unittests/moduleResolution.ts index b71d42265e3..104d9f9e394 100644 --- a/src/harness/unittests/moduleResolution.ts +++ b/src/harness/unittests/moduleResolution.ts @@ -1,6 +1,28 @@ /// namespace ts { + export function checkResolvedModule(expected: ResolvedModuleFull, actual: ResolvedModuleFull): boolean { + if (!expected === !actual) { + if (expected) { + assert.isTrue(expected.resolvedFileName === actual.resolvedFileName, `'resolvedFileName': expected '${expected.resolvedFileName}' to be equal to '${actual.resolvedFileName}'`); + assert.isTrue(expected.extension === actual.extension, `'ext': expected '${Extension[expected.extension]}' to be equal to '${Extension[actual.extension]}'`); + assert.isTrue(expected.isExternalLibraryImport === actual.isExternalLibraryImport, `'isExternalLibraryImport': expected '${expected.isExternalLibraryImport}' to be equal to '${actual.isExternalLibraryImport}'`); + } + return true; + } + return false; + } + + export function checkResolvedModuleWithFailedLookupLocations(actual: ResolvedModuleWithFailedLookupLocations, expectedResolvedModule: ResolvedModuleFull, expectedFailedLookupLocations: string[]): void { + assert.isTrue(actual.resolvedModule !== undefined, "module should be resolved"); + checkResolvedModule(actual.resolvedModule, expectedResolvedModule); + assert.deepEqual(actual.failedLookupLocations, expectedFailedLookupLocations); + } + + export function createResolvedModule(resolvedFileName: string, isExternalLibraryImport = false): ResolvedModuleFull { + return { resolvedFileName, extension: extensionFromPath(resolvedFileName), isExternalLibraryImport }; + } + interface File { name: string; content?: string; @@ -53,8 +75,7 @@ namespace ts { const containingFile = { name: containingFileName }; const moduleFile = { name: moduleFileNameNoExt + ext }; const resolution = nodeModuleNameResolver(moduleName, containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, moduleFile)); - assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); - assert.equal(!!resolution.resolvedModule.isExternalLibraryImport, false); + checkResolvedModule(resolution.resolvedModule, createResolvedModule(moduleFile.name)); const failedLookupLocations: string[] = []; const dir = getDirectoryPath(containingFileName); @@ -97,8 +118,7 @@ namespace ts { const packageJson = { name: packageJsonFileName, content: JSON.stringify({ "typings": fieldRef }) }; const moduleFile = { name: moduleFileName }; const resolution = nodeModuleNameResolver(moduleName, containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, packageJson, moduleFile)); - assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); - assert.equal(!!resolution.resolvedModule.isExternalLibraryImport, false); + checkResolvedModule(resolution.resolvedModule, createResolvedModule(moduleFile.name)); // expect three failed lookup location - attempt to load module as file with all supported extensions assert.equal(resolution.failedLookupLocations.length, supportedTypeScriptExtensions.length); } @@ -125,7 +145,7 @@ namespace ts { const resolution = nodeModuleNameResolver("b", containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, packageJson, moduleFile, indexFile)); - assert.equal(resolution.resolvedModule.resolvedFileName, indexPath); + checkResolvedModule(resolution.resolvedModule, createResolvedModule(indexPath, /*isExternalLibraryImport*/true)); } } @@ -138,7 +158,6 @@ namespace ts { /* tslint:enable no-null-keyword */ testTypingsIgnored(undefined); }); - it("module name as directory - load index.d.ts", () => { test(/*hasDirectoryExists*/ false); test(/*hasDirectoryExists*/ true); @@ -148,9 +167,7 @@ namespace ts { const packageJson = { name: "/a/b/foo/package.json", content: JSON.stringify({ main: "/c/d" }) }; const indexFile = { name: "/a/b/foo/index.d.ts" }; const resolution = nodeModuleNameResolver("./foo", containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, packageJson, indexFile)); - assert.equal(resolution.resolvedModule.resolvedFileName, indexFile.name); - assert.equal(!!resolution.resolvedModule.isExternalLibraryImport, false); - assert.deepEqual(resolution.failedLookupLocations, [ + checkResolvedModuleWithFailedLookupLocations(resolution, createResolvedModule(indexFile.name), [ "/a/b/foo.ts", "/a/b/foo.tsx", "/a/b/foo.d.ts", @@ -170,33 +187,39 @@ namespace ts { const containingFile = { name: "/a/b/c/d/e.ts" }; const moduleFile = { name: "/a/b/node_modules/foo.ts" }; const resolution = nodeModuleNameResolver("foo", containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, moduleFile)); - assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); - assert.deepEqual(resolution.failedLookupLocations, [ + checkResolvedModuleWithFailedLookupLocations(resolution, createResolvedModule(moduleFile.name, /*isExternalLibraryImport*/ true), [ "/a/b/c/d/node_modules/foo.ts", "/a/b/c/d/node_modules/foo.tsx", "/a/b/c/d/node_modules/foo.d.ts", "/a/b/c/d/node_modules/foo/package.json", + "/a/b/c/d/node_modules/foo/index.ts", "/a/b/c/d/node_modules/foo/index.tsx", "/a/b/c/d/node_modules/foo/index.d.ts", + "/a/b/c/d/node_modules/@types/foo.ts", "/a/b/c/d/node_modules/@types/foo.tsx", "/a/b/c/d/node_modules/@types/foo.d.ts", "/a/b/c/d/node_modules/@types/foo/package.json", + "/a/b/c/d/node_modules/@types/foo/index.ts", "/a/b/c/d/node_modules/@types/foo/index.tsx", "/a/b/c/d/node_modules/@types/foo/index.d.ts", + "/a/b/c/node_modules/foo.ts", "/a/b/c/node_modules/foo.tsx", "/a/b/c/node_modules/foo.d.ts", "/a/b/c/node_modules/foo/package.json", + "/a/b/c/node_modules/foo/index.ts", "/a/b/c/node_modules/foo/index.tsx", "/a/b/c/node_modules/foo/index.d.ts", + "/a/b/c/node_modules/@types/foo.ts", "/a/b/c/node_modules/@types/foo.tsx", "/a/b/c/node_modules/@types/foo.d.ts", "/a/b/c/node_modules/@types/foo/package.json", + "/a/b/c/node_modules/@types/foo/index.ts", "/a/b/c/node_modules/@types/foo/index.tsx", "/a/b/c/node_modules/@types/foo/index.d.ts", @@ -212,8 +235,7 @@ namespace ts { const containingFile = { name: "/a/b/c/d/e.ts" }; const moduleFile = { name: "/a/b/node_modules/foo.d.ts" }; const resolution = nodeModuleNameResolver("foo", containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, moduleFile)); - assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); - assert.equal(resolution.resolvedModule.isExternalLibraryImport, true); + checkResolvedModule(resolution.resolvedModule, createResolvedModule(moduleFile.name, /*isExternalLibraryImport*/ true)); } }); @@ -225,55 +247,66 @@ namespace ts { const containingFile = { name: "/a/node_modules/b/c/node_modules/d/e.ts" }; const moduleFile = { name: "/a/node_modules/foo/index.d.ts" }; const resolution = nodeModuleNameResolver("foo", containingFile.name, {}, createModuleResolutionHost(hasDirectoryExists, containingFile, moduleFile)); - assert.equal(resolution.resolvedModule.resolvedFileName, moduleFile.name); - assert.equal(resolution.resolvedModule.isExternalLibraryImport, true); - assert.deepEqual(resolution.failedLookupLocations, [ + checkResolvedModuleWithFailedLookupLocations(resolution, createResolvedModule(moduleFile.name, /*isExternalLibraryImport*/ true), [ "/a/node_modules/b/c/node_modules/d/node_modules/foo.ts", "/a/node_modules/b/c/node_modules/d/node_modules/foo.tsx", "/a/node_modules/b/c/node_modules/d/node_modules/foo.d.ts", "/a/node_modules/b/c/node_modules/d/node_modules/foo/package.json", + "/a/node_modules/b/c/node_modules/d/node_modules/foo/index.ts", "/a/node_modules/b/c/node_modules/d/node_modules/foo/index.tsx", "/a/node_modules/b/c/node_modules/d/node_modules/foo/index.d.ts", + "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo.ts", "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo.tsx", "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo.d.ts", "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo/package.json", + "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo/index.ts", "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo/index.tsx", "/a/node_modules/b/c/node_modules/d/node_modules/@types/foo/index.d.ts", + "/a/node_modules/b/c/node_modules/foo.ts", "/a/node_modules/b/c/node_modules/foo.tsx", "/a/node_modules/b/c/node_modules/foo.d.ts", "/a/node_modules/b/c/node_modules/foo/package.json", + "/a/node_modules/b/c/node_modules/foo/index.ts", "/a/node_modules/b/c/node_modules/foo/index.tsx", "/a/node_modules/b/c/node_modules/foo/index.d.ts", + "/a/node_modules/b/c/node_modules/@types/foo.ts", "/a/node_modules/b/c/node_modules/@types/foo.tsx", "/a/node_modules/b/c/node_modules/@types/foo.d.ts", "/a/node_modules/b/c/node_modules/@types/foo/package.json", + "/a/node_modules/b/c/node_modules/@types/foo/index.ts", "/a/node_modules/b/c/node_modules/@types/foo/index.tsx", "/a/node_modules/b/c/node_modules/@types/foo/index.d.ts", + "/a/node_modules/b/node_modules/foo.ts", "/a/node_modules/b/node_modules/foo.tsx", "/a/node_modules/b/node_modules/foo.d.ts", "/a/node_modules/b/node_modules/foo/package.json", + "/a/node_modules/b/node_modules/foo/index.ts", "/a/node_modules/b/node_modules/foo/index.tsx", "/a/node_modules/b/node_modules/foo/index.d.ts", + "/a/node_modules/b/node_modules/@types/foo.ts", "/a/node_modules/b/node_modules/@types/foo.tsx", "/a/node_modules/b/node_modules/@types/foo.d.ts", "/a/node_modules/b/node_modules/@types/foo/package.json", + "/a/node_modules/b/node_modules/@types/foo/index.ts", "/a/node_modules/b/node_modules/@types/foo/index.tsx", "/a/node_modules/b/node_modules/@types/foo/index.d.ts", + "/a/node_modules/foo.ts", "/a/node_modules/foo.tsx", "/a/node_modules/foo.d.ts", "/a/node_modules/foo/package.json", + "/a/node_modules/foo/index.ts", "/a/node_modules/foo/index.tsx" ]); @@ -481,21 +514,15 @@ import b = require("./moduleB"); const options: CompilerOptions = { moduleResolution, baseUrl: "/root" }; { const result = resolveModuleName("folder2/file2", file1.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, file2.name); - assert.deepEqual(result.failedLookupLocations, []); + checkResolvedModuleWithFailedLookupLocations(result, createResolvedModule(file2.name), []); } { const result = resolveModuleName("./file3", file2.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, file3.name); - assert.deepEqual(result.failedLookupLocations, []); + checkResolvedModuleWithFailedLookupLocations(result, createResolvedModule(file3.name), []); } { const result = resolveModuleName("/root/folder1/file1", file2.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, file1.name); - assert.deepEqual(result.failedLookupLocations, []); + checkResolvedModuleWithFailedLookupLocations(result, createResolvedModule(file1.name), []); } } } @@ -520,12 +547,11 @@ import b = require("./moduleB"); check("m1", main, m1); check("m2", main, m2); check("m3", main, m3Typings); - check("m4", main, m4); + check("m4", main, m4, /*isExternalLibraryImport*/true); - function check(name: string, caller: File, expected: File) { + function check(name: string, caller: File, expected: File, isExternalLibraryImport = false) { const result = resolveModuleName(name, caller.name, options, host); - assert.isTrue(result.resolvedModule !== undefined); - assert.equal(result.resolvedModule.resolvedFileName, expected.name); + checkResolvedModule(result.resolvedModule, createResolvedModule(expected.name, isExternalLibraryImport)); } } }); @@ -547,8 +573,7 @@ import b = require("./moduleB"); function check(name: string, caller: File, expected: File) { const result = resolveModuleName(name, caller.name, options, host); - assert.isTrue(result.resolvedModule !== undefined); - assert.equal(result.resolvedModule.resolvedFileName, expected.name); + checkResolvedModule(result.resolvedModule, createResolvedModule(expected.name)); } } }); @@ -590,9 +615,10 @@ import b = require("./moduleB"); "/root/folder1/file2.tsx", "/root/folder1/file2.d.ts", "/root/folder1/file2/package.json", + "/root/folder1/file2/index.ts", "/root/folder1/file2/index.tsx", - "/root/folder1/file2/index.d.ts" + "/root/folder1/file2/index.d.ts", // then first attempt on 'generated/*' was successful ]); check("folder2/file3", file3, [ @@ -601,14 +627,17 @@ import b = require("./moduleB"); "/root/folder2/file3.tsx", "/root/folder2/file3.d.ts", "/root/folder2/file3/package.json", + "/root/folder2/file3/index.ts", "/root/folder2/file3/index.tsx", "/root/folder2/file3/index.d.ts", + // then use remapped location "/root/generated/folder2/file3.ts", "/root/generated/folder2/file3.tsx", "/root/generated/folder2/file3.d.ts", "/root/generated/folder2/file3/package.json", + "/root/generated/folder2/file3/index.ts", "/root/generated/folder2/file3/index.tsx", // success on index.d.ts @@ -619,13 +648,15 @@ import b = require("./moduleB"); "/root/folder2/file4.tsx", "/root/folder2/file4.d.ts", "/root/folder2/file4/package.json", + "/root/folder2/file4/index.ts", "/root/folder2/file4/index.tsx", "/root/folder2/file4/index.d.ts", + // try to load from file from remapped location "/root/generated/folder2/file4.ts", "/root/generated/folder2/file4.tsx", - "/root/generated/folder2/file4.d.ts" + "/root/generated/folder2/file4.d.ts", // success on loading as from folder ]); check("somefolder/file5", file5, [ @@ -634,6 +665,7 @@ import b = require("./moduleB"); "/root/someanotherfolder/file5.ts", "/root/someanotherfolder/file5.tsx", "/root/someanotherfolder/file5.d.ts", + // load from folder "/root/someanotherfolder/file5/package.json", "/root/someanotherfolder/file5/index.ts", @@ -646,46 +678,51 @@ import b = require("./moduleB"); "/root/file6.ts", "/root/file6.tsx", "/root/file6.d.ts", + // load from folder "/root/file6/package.json", "/root/file6/index.ts", "/root/file6/index.tsx", "/root/file6/index.d.ts", + // then try 'generated/*' // load from file "/root/generated/file6.ts", "/root/generated/file6.tsx", "/root/generated/file6.d.ts", + // load from folder "/root/generated/file6/package.json", "/root/generated/file6/index.ts", "/root/generated/file6/index.tsx", "/root/generated/file6/index.d.ts", + // fallback to standard node behavior // load from file "/root/folder1/node_modules/file6.ts", "/root/folder1/node_modules/file6.tsx", "/root/folder1/node_modules/file6.d.ts", + // load from folder "/root/folder1/node_modules/file6/package.json", "/root/folder1/node_modules/file6/index.ts", "/root/folder1/node_modules/file6/index.tsx", "/root/folder1/node_modules/file6/index.d.ts", + "/root/folder1/node_modules/@types/file6.ts", "/root/folder1/node_modules/@types/file6.tsx", "/root/folder1/node_modules/@types/file6.d.ts", + "/root/folder1/node_modules/@types/file6/package.json", "/root/folder1/node_modules/@types/file6/index.ts", "/root/folder1/node_modules/@types/file6/index.tsx", - "/root/folder1/node_modules/@types/file6/index.d.ts" + "/root/folder1/node_modules/@types/file6/index.d.ts", // success on /root/node_modules/file6.ts - ]); + ], /*isExternalLibraryImport*/ true); - function check(name: string, expected: File, expectedFailedLookups: string[]) { + function check(name: string, expected: File, expectedFailedLookups: string[], isExternalLibraryImport = false) { const result = resolveModuleName(name, main.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, expected.name); - assert.deepEqual(result.failedLookupLocations, expectedFailedLookups); + checkResolvedModuleWithFailedLookupLocations(result, createResolvedModule(expected.name, isExternalLibraryImport), expectedFailedLookups); } } }); @@ -744,9 +781,7 @@ import b = require("./moduleB"); function check(name: string, expected: File, expectedFailedLookups: string[]) { const result = resolveModuleName(name, main.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, expected.name); - assert.deepEqual(result.failedLookupLocations, expectedFailedLookups); + checkResolvedModuleWithFailedLookupLocations(result, createResolvedModule(expected.name), expectedFailedLookups); } } }); @@ -819,9 +854,7 @@ import b = require("./moduleB"); function check(name: string, container: File, expected: File, expectedFailedLookups: string[]) { const result = resolveModuleName(name, container.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, expected.name); - assert.deepEqual(result.failedLookupLocations, expectedFailedLookups); + checkResolvedModuleWithFailedLookupLocations(result, createResolvedModule(expected.name), expectedFailedLookups); } } }); @@ -875,9 +908,7 @@ import b = require("./moduleB"); function check(name: string, container: File, expected: File, expectedFailedLookups: string[]) { const result = resolveModuleName(name, container.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, expected.name); - assert.deepEqual(result.failedLookupLocations, expectedFailedLookups); + checkResolvedModuleWithFailedLookupLocations(result, createResolvedModule(expected.name), expectedFailedLookups); } } }); @@ -899,9 +930,7 @@ import b = require("./moduleB"); } }; const result = resolveModuleName("libs/guid", app.name, options, host); - assert.isTrue(result.resolvedModule !== undefined, "module should be resolved"); - assert.equal(result.resolvedModule.resolvedFileName, libsTypings.name); - assert.deepEqual(result.failedLookupLocations, [ + checkResolvedModuleWithFailedLookupLocations(result, createResolvedModule(libsTypings.name), [ // first try to load module as file "/root/src/libs/guid.ts", "/root/src/libs/guid.tsx", diff --git a/src/harness/unittests/reuseProgramStructure.ts b/src/harness/unittests/reuseProgramStructure.ts index 0d3a8b3977a..215e05658a9 100644 --- a/src/harness/unittests/reuseProgramStructure.ts +++ b/src/harness/unittests/reuseProgramStructure.ts @@ -150,17 +150,6 @@ namespace ts { return program; } - function checkResolvedModule(expected: ResolvedModule, actual: ResolvedModule): boolean { - if (!expected === !actual) { - if (expected) { - assert.isTrue(expected.resolvedFileName === actual.resolvedFileName, `'resolvedFileName': expected '${expected.resolvedFileName}' to be equal to '${actual.resolvedFileName}'`); - assert.isTrue(expected.isExternalLibraryImport === actual.isExternalLibraryImport, `'isExternalLibraryImport': expected '${expected.isExternalLibraryImport}' to be equal to '${actual.isExternalLibraryImport}'`); - } - return true; - } - return false; - } - function checkResolvedTypeDirective(expected: ResolvedTypeReferenceDirective, actual: ResolvedTypeReferenceDirective): boolean { if (!expected === !actual) { if (expected) { @@ -300,7 +289,7 @@ namespace ts { const options: CompilerOptions = { target }; const program_1 = newProgram(files, ["a.ts"], options); - checkResolvedModulesCache(program_1, "a.ts", createMap({ "b": { resolvedFileName: "b.ts" } })); + checkResolvedModulesCache(program_1, "a.ts", createMap({ "b": createResolvedModule("b.ts") })); checkResolvedModulesCache(program_1, "b.ts", undefined); const program_2 = updateProgram(program_1, ["a.ts"], options, files => { @@ -309,7 +298,7 @@ namespace ts { assert.isTrue(program_1.structureIsReused); // content of resolution cache should not change - checkResolvedModulesCache(program_1, "a.ts", createMap({ "b": { resolvedFileName: "b.ts" } })); + checkResolvedModulesCache(program_1, "a.ts", createMap({ "b": createResolvedModule("b.ts") })); checkResolvedModulesCache(program_1, "b.ts", undefined); // imports has changed - program is not reused @@ -326,7 +315,7 @@ namespace ts { files[0].text = files[0].text.updateImportsAndExports(newImports); }); assert.isTrue(!program_3.structureIsReused); - checkResolvedModulesCache(program_4, "a.ts", createMap({ "b": { resolvedFileName: "b.ts" }, "c": undefined })); + checkResolvedModulesCache(program_4, "a.ts", createMap({ "b": createResolvedModule("b.ts"), "c": undefined })); }); it("resolved type directives cache follows type directives", () => { diff --git a/src/harness/unittests/session.ts b/src/harness/unittests/session.ts index dd9efe51a4a..05f62c4b9f6 100644 --- a/src/harness/unittests/session.ts +++ b/src/harness/unittests/session.ts @@ -150,7 +150,8 @@ namespace ts.server { target: ScriptTarget.ES5, jsx: JsxEmit.React, newLine: NewLineKind.LineFeed, - moduleResolution: ModuleResolutionKind.NodeJs + moduleResolution: ModuleResolutionKind.NodeJs, + allowNonTsExtensions: true // injected by tsserver }); }); }); diff --git a/src/harness/unittests/tsconfigParsing.ts b/src/harness/unittests/tsconfigParsing.ts index f38a05b9cfa..7b980cdd2d8 100644 --- a/src/harness/unittests/tsconfigParsing.ts +++ b/src/harness/unittests/tsconfigParsing.ts @@ -28,6 +28,14 @@ namespace ts { assert.isTrue(arrayIsEqualTo(parsed.fileNames.sort(), expectedFileList.sort())); } + function assertParseFileDiagnostics(jsonText: string, configFileName: string, basePath: string, allFileList: string[], expectedDiagnosticCode: number) { + const json = JSON.parse(jsonText); + const host: ParseConfigHost = new Utils.MockParseConfigHost(basePath, true, allFileList); + const parsed = ts.parseJsonConfigFileContent(json, host, basePath, /*existingOptions*/ undefined, configFileName); + assert.isTrue(parsed.errors.length >= 0); + assert.isTrue(parsed.errors.filter(e => e.code === expectedDiagnosticCode).length > 0, `Expected error code ${expectedDiagnosticCode} to be in ${JSON.stringify(parsed.errors)}`); + } + it("returns empty config for file with only whitespaces", () => { assertParseResult("", { config : {} }); assertParseResult(" ", { config : {} }); @@ -202,5 +210,64 @@ namespace ts { assert.isTrue(diagnostics.length === 2); assert.equal(JSON.stringify(configJsonObject), JSON.stringify(expectedResult)); }); + + it("generates errors for empty files list", () => { + const content = `{ + "files": [] + }`; + assertParseFileDiagnostics(content, + "/apath/tsconfig.json", + "tests/cases/unittests", + ["/apath/a.ts"], + Diagnostics.The_files_list_in_config_file_0_is_empty.code); + }); + + it("generates errors for directory with no .ts files", () => { + const content = `{ + }`; + assertParseFileDiagnostics(content, + "/apath/tsconfig.json", + "tests/cases/unittests", + ["/apath/a.js"], + Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code); + }); + + it("generates errors for empty directory", () => { + const content = `{ + "compilerOptions": { + "allowJs": true + } + }`; + assertParseFileDiagnostics(content, + "/apath/tsconfig.json", + "tests/cases/unittests", + [], + Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code); + }); + + it("generates errors for empty include", () => { + const content = `{ + "include": [] + }`; + assertParseFileDiagnostics(content, + "/apath/tsconfig.json", + "tests/cases/unittests", + ["/apath/a.ts"], + Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code); + }); + + it("generates errors for includes with outDir", () => { + const content = `{ + "compilerOptions": { + "outDir": "./" + }, + "include": ["**/*"] + }`; + assertParseFileDiagnostics(content, + "/apath/tsconfig.json", + "tests/cases/unittests", + ["/apath/a.ts"], + Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code); + }); }); } diff --git a/src/harness/unittests/tsserverProjectSystem.ts b/src/harness/unittests/tsserverProjectSystem.ts index 2abfd66b983..870926a8c55 100644 --- a/src/harness/unittests/tsserverProjectSystem.ts +++ b/src/harness/unittests/tsserverProjectSystem.ts @@ -94,8 +94,8 @@ namespace ts.projectSystem { this.projectService.updateTypingsForProject(response); } - enqueueInstallTypingsRequest(project: server.Project, typingOptions: TypingOptions) { - const request = server.createInstallTypingsRequest(project, typingOptions, this.globalTypingsCacheLocation); + enqueueInstallTypingsRequest(project: server.Project, typingOptions: TypingOptions, unresolvedImports: server.SortedReadonlyArray) { + const request = server.createInstallTypingsRequest(project, typingOptions, unresolvedImports, this.globalTypingsCacheLocation); this.install(request); } @@ -1659,67 +1659,74 @@ namespace ts.projectSystem { "File '/a/b/node_modules/lib.ts' does not exist.", "File '/a/b/node_modules/lib.tsx' does not exist.", "File '/a/b/node_modules/lib.d.ts' does not exist.", - "File '/a/b/node_modules/lib.js' does not exist.", - "File '/a/b/node_modules/lib.jsx' does not exist.", "File '/a/b/node_modules/lib/package.json' does not exist.", "File '/a/b/node_modules/lib/index.ts' does not exist.", "File '/a/b/node_modules/lib/index.tsx' does not exist.", "File '/a/b/node_modules/lib/index.d.ts' does not exist.", - "File '/a/b/node_modules/lib/index.js' does not exist.", - "File '/a/b/node_modules/lib/index.jsx' does not exist.", "File '/a/b/node_modules/@types/lib.ts' does not exist.", "File '/a/b/node_modules/@types/lib.tsx' does not exist.", "File '/a/b/node_modules/@types/lib.d.ts' does not exist.", - "File '/a/b/node_modules/@types/lib.js' does not exist.", - "File '/a/b/node_modules/@types/lib.jsx' does not exist.", "File '/a/b/node_modules/@types/lib/package.json' does not exist.", "File '/a/b/node_modules/@types/lib/index.ts' does not exist.", "File '/a/b/node_modules/@types/lib/index.tsx' does not exist.", "File '/a/b/node_modules/@types/lib/index.d.ts' does not exist.", - "File '/a/b/node_modules/@types/lib/index.js' does not exist.", - "File '/a/b/node_modules/@types/lib/index.jsx' does not exist.", "File '/a/node_modules/lib.ts' does not exist.", "File '/a/node_modules/lib.tsx' does not exist.", "File '/a/node_modules/lib.d.ts' does not exist.", - "File '/a/node_modules/lib.js' does not exist.", - "File '/a/node_modules/lib.jsx' does not exist.", "File '/a/node_modules/lib/package.json' does not exist.", "File '/a/node_modules/lib/index.ts' does not exist.", "File '/a/node_modules/lib/index.tsx' does not exist.", "File '/a/node_modules/lib/index.d.ts' does not exist.", - "File '/a/node_modules/lib/index.js' does not exist.", - "File '/a/node_modules/lib/index.jsx' does not exist.", "File '/a/node_modules/@types/lib.ts' does not exist.", "File '/a/node_modules/@types/lib.tsx' does not exist.", "File '/a/node_modules/@types/lib.d.ts' does not exist.", - "File '/a/node_modules/@types/lib.js' does not exist.", - "File '/a/node_modules/@types/lib.jsx' does not exist.", "File '/a/node_modules/@types/lib/package.json' does not exist.", "File '/a/node_modules/@types/lib/index.ts' does not exist.", "File '/a/node_modules/@types/lib/index.tsx' does not exist.", "File '/a/node_modules/@types/lib/index.d.ts' does not exist.", - "File '/a/node_modules/@types/lib/index.js' does not exist.", - "File '/a/node_modules/@types/lib/index.jsx' does not exist.", "File '/node_modules/lib.ts' does not exist.", "File '/node_modules/lib.tsx' does not exist.", "File '/node_modules/lib.d.ts' does not exist.", - "File '/node_modules/lib.js' does not exist.", - "File '/node_modules/lib.jsx' does not exist.", "File '/node_modules/lib/package.json' does not exist.", "File '/node_modules/lib/index.ts' does not exist.", "File '/node_modules/lib/index.tsx' does not exist.", "File '/node_modules/lib/index.d.ts' does not exist.", - "File '/node_modules/lib/index.js' does not exist.", - "File '/node_modules/lib/index.jsx' does not exist.", "File '/node_modules/@types/lib.ts' does not exist.", "File '/node_modules/@types/lib.tsx' does not exist.", "File '/node_modules/@types/lib.d.ts' does not exist.", - "File '/node_modules/@types/lib.js' does not exist.", - "File '/node_modules/@types/lib.jsx' does not exist.", "File '/node_modules/@types/lib/package.json' does not exist.", "File '/node_modules/@types/lib/index.ts' does not exist.", "File '/node_modules/@types/lib/index.tsx' does not exist.", "File '/node_modules/@types/lib/index.d.ts' does not exist.", + "Loading module 'lib' from 'node_modules' folder.", + "File '/a/b/node_modules/lib.js' does not exist.", + "File '/a/b/node_modules/lib.jsx' does not exist.", + "File '/a/b/node_modules/lib/package.json' does not exist.", + "File '/a/b/node_modules/lib/index.js' does not exist.", + "File '/a/b/node_modules/lib/index.jsx' does not exist.", + "File '/a/b/node_modules/@types/lib.js' does not exist.", + "File '/a/b/node_modules/@types/lib.jsx' does not exist.", + "File '/a/b/node_modules/@types/lib/package.json' does not exist.", + "File '/a/b/node_modules/@types/lib/index.js' does not exist.", + "File '/a/b/node_modules/@types/lib/index.jsx' does not exist.", + "File '/a/node_modules/lib.js' does not exist.", + "File '/a/node_modules/lib.jsx' does not exist.", + "File '/a/node_modules/lib/package.json' does not exist.", + "File '/a/node_modules/lib/index.js' does not exist.", + "File '/a/node_modules/lib/index.jsx' does not exist.", + "File '/a/node_modules/@types/lib.js' does not exist.", + "File '/a/node_modules/@types/lib.jsx' does not exist.", + "File '/a/node_modules/@types/lib/package.json' does not exist.", + "File '/a/node_modules/@types/lib/index.js' does not exist.", + "File '/a/node_modules/@types/lib/index.jsx' does not exist.", + "File '/node_modules/lib.js' does not exist.", + "File '/node_modules/lib.jsx' does not exist.", + "File '/node_modules/lib/package.json' does not exist.", + "File '/node_modules/lib/index.js' does not exist.", + "File '/node_modules/lib/index.jsx' does not exist.", + "File '/node_modules/@types/lib.js' does not exist.", + "File '/node_modules/@types/lib.jsx' does not exist.", + "File '/node_modules/@types/lib/package.json' does not exist.", "File '/node_modules/@types/lib/index.js' does not exist.", "File '/node_modules/@types/lib/index.jsx' does not exist.", "======== Module name 'lib' was not resolved. ========", @@ -1727,19 +1734,13 @@ namespace ts.projectSystem { "File '/a/cache/node_modules/lib.ts' does not exist.", "File '/a/cache/node_modules/lib.tsx' does not exist.", "File '/a/cache/node_modules/lib.d.ts' does not exist.", - "File '/a/cache/node_modules/lib.js' does not exist.", - "File '/a/cache/node_modules/lib.jsx' does not exist.", "File '/a/cache/node_modules/lib/package.json' does not exist.", "File '/a/cache/node_modules/lib/index.ts' does not exist.", "File '/a/cache/node_modules/lib/index.tsx' does not exist.", "File '/a/cache/node_modules/lib/index.d.ts' does not exist.", - "File '/a/cache/node_modules/lib/index.js' does not exist.", - "File '/a/cache/node_modules/lib/index.jsx' does not exist.", "File '/a/cache/node_modules/@types/lib.ts' does not exist.", "File '/a/cache/node_modules/@types/lib.tsx' does not exist.", "File '/a/cache/node_modules/@types/lib.d.ts' does not exist.", - "File '/a/cache/node_modules/@types/lib.js' does not exist.", - "File '/a/cache/node_modules/@types/lib.jsx' does not exist.", "File '/a/cache/node_modules/@types/lib/package.json' does not exist.", "File '/a/cache/node_modules/@types/lib/index.ts' does not exist.", "File '/a/cache/node_modules/@types/lib/index.tsx' does not exist.", @@ -2470,4 +2471,38 @@ namespace ts.projectSystem { }); }); + + describe("Inferred projects", () => { + it("should support files without extensions", () => { + const f = { + path: "/a/compile", + content: "let x = 1" + }; + const host = createServerHost([f]); + const session = createSession(host); + session.executeCommand({ + seq: 1, + type: "request", + command: "compilerOptionsForInferredProjects", + arguments: { + options: { + allowJs: true + } + } + }); + session.executeCommand({ + seq: 2, + type: "request", + command: "open", + arguments: { + file: f.path, + fileContent: f.content, + scriptKindName: "JS" + } + }); + const projectService = session.getProjectService(); + checkNumberOfProjects(projectService, { inferredProjects: 1 }); + checkProjectActualFiles(projectService.inferredProjects[0], [f.path]); + }); + }); } \ No newline at end of file diff --git a/src/harness/unittests/typingsInstaller.ts b/src/harness/unittests/typingsInstaller.ts index 4a0021e6ad4..356992d5717 100644 --- a/src/harness/unittests/typingsInstaller.ts +++ b/src/harness/unittests/typingsInstaller.ts @@ -217,9 +217,9 @@ namespace ts.projectSystem { constructor() { super(host); } - enqueueInstallTypingsRequest(project: server.Project, typingOptions: TypingOptions) { + enqueueInstallTypingsRequest(project: server.Project, typingOptions: TypingOptions, unresolvedImports: server.SortedReadonlyArray) { enqueueIsCalled = true; - super.enqueueInstallTypingsRequest(project, typingOptions); + super.enqueueInstallTypingsRequest(project, typingOptions, unresolvedImports); } executeRequest(requestKind: TI.RequestKind, _requestId: number, _args: string[], _cwd: string, cb: TI.RequestCompletedAction): void { const installedTypings = ["@types/jquery"]; @@ -319,9 +319,9 @@ namespace ts.projectSystem { constructor() { super(host); } - enqueueInstallTypingsRequest(project: server.Project, typingOptions: TypingOptions) { + enqueueInstallTypingsRequest(project: server.Project, typingOptions: TypingOptions, unresolvedImports: server.SortedReadonlyArray) { enqueueIsCalled = true; - super.enqueueInstallTypingsRequest(project, typingOptions); + super.enqueueInstallTypingsRequest(project, typingOptions, unresolvedImports); } executeRequest(requestKind: TI.RequestKind, _requestId: number, _args: string[], _cwd: string, cb: TI.RequestCompletedAction): void { const installedTypings: string[] = []; @@ -724,7 +724,7 @@ namespace ts.projectSystem { it("Malformed package.json should be watched", () => { const f = { path: "/a/b/app.js", - content: "var x = require('commander')" + content: "var x = 1" }; const brokenPackageJson = { path: "/a/b/package.json", @@ -763,6 +763,133 @@ namespace ts.projectSystem { service.checkNumberOfProjects({ inferredProjects: 1 }); checkProjectActualFiles(service.inferredProjects[0], [f.path, commander.path]); }); + + it("should install typings for unresolved imports", () => { + const file = { + path: "/a/b/app.js", + content: ` + import * as fs from "fs"; + import * as commander from "commander";` + }; + const cachePath = "/a/cache"; + const node = { + path: cachePath + "/node_modules/@types/node/index.d.ts", + content: "export let x: number" + }; + const commander = { + path: cachePath + "/node_modules/@types/commander/index.d.ts", + content: "export let y: string" + }; + const host = createServerHost([file]); + const installer = new (class extends Installer { + constructor() { + super(host, { globalTypingsCacheLocation: cachePath }); + } + executeRequest(requestKind: TI.RequestKind, _requestId: number, _args: string[], _cwd: string, cb: server.typingsInstaller.RequestCompletedAction) { + const installedTypings = ["@types/node", "@types/commander"]; + const typingFiles = [node, commander]; + executeCommand(this, host, installedTypings, typingFiles, requestKind, cb); + } + })(); + const service = createProjectService(host, { typingsInstaller: installer }); + service.openClientFile(file.path); + + service.checkNumberOfProjects({ inferredProjects: 1 }); + checkProjectActualFiles(service.inferredProjects[0], [file.path]); + + installer.installAll([TI.NpmViewRequest, TI.NpmViewRequest], [TI.NpmInstallRequest]); + + assert.isTrue(host.fileExists(node.path), "typings for 'node' should be created"); + assert.isTrue(host.fileExists(commander.path), "typings for 'commander' should be created"); + + checkProjectActualFiles(service.inferredProjects[0], [file.path, node.path, commander.path]); + }); + + it("should pick typing names from non-relative unresolved imports", () => { + const f1 = { + path: "/a/b/app.js", + content: ` + import * as a from "foo/a/a"; + import * as b from "foo/a/b"; + import * as c from "foo/a/c"; + import * as d from "@bar/router/"; + import * as e from "@bar/common/shared"; + import * as e from "@bar/common/apps"; + import * as f from "./lib" + ` + }; + + const host = createServerHost([f1]); + const installer = new (class extends Installer { + constructor() { + super(host, { globalTypingsCacheLocation: "/tmp" }); + } + executeRequest(requestKind: TI.RequestKind, _requestId: number, args: string[], _cwd: string, cb: server.typingsInstaller.RequestCompletedAction) { + if (requestKind === TI.NpmViewRequest) { + // args should have only non-scoped packages - scoped packages are not yet supported + assert.deepEqual(args, ["foo"]); + } + executeCommand(this, host, ["foo"], [], requestKind, cb); + } + })(); + const projectService = createProjectService(host, { typingsInstaller: installer }); + projectService.openClientFile(f1.path); + projectService.checkNumberOfProjects({ inferredProjects: 1 }); + + const proj = projectService.inferredProjects[0]; + proj.updateGraph(); + + assert.deepEqual( + proj.getCachedUnresolvedImportsPerFile_TestOnly().get(f1.path), + ["foo", "foo", "foo", "@bar/router", "@bar/common", "@bar/common"] + ); + + installer.installAll([TI.NpmViewRequest], [TI.NpmInstallRequest]); + }); + + it("cached unresolved typings are not recomputed if program structure did not change", () => { + const host = createServerHost([]); + const session = createSession(host); + const f = { + path: "/a/app.js", + content: ` + import * as fs from "fs"; + import * as cmd from "commander + ` + }; + session.executeCommand({ + seq: 1, + type: "request", + command: "open", + arguments: { + file: f.path, + fileContent: f.content + } + }); + const projectService = session.getProjectService(); + checkNumberOfProjects(projectService, { inferredProjects: 1 }); + const proj = projectService.inferredProjects[0]; + const version1 = proj.getCachedUnresolvedImportsPerFile_TestOnly().getVersion(); + + // make a change that should not affect the structure of the program + session.executeCommand({ + seq: 2, + type: "request", + command: "change", + arguments: { + file: f.path, + insertString: "\nlet x = 1;", + line: 2, + offset: 0, + endLine: 2, + endOffset: 0 + } + }); + host.checkTimeoutQueueLength(1); + host.runQueuedTimeoutCallbacks(); + const version2 = proj.getCachedUnresolvedImportsPerFile_TestOnly().getVersion(); + assert.equal(version1, version2, "set of unresolved imports should not change"); + }); }); describe("Validate package name:", () => { @@ -820,4 +947,35 @@ namespace ts.projectSystem { assert.isTrue(messages.indexOf("Package name '; say ‘Hello from TypeScript!’ #' contains non URI safe characters") > 0, "should find package with invalid name"); }); }); + + describe("discover typings", () => { + it("should return node for core modules", () => { + const f = { + path: "/a/b/app.js", + content: "" + }; + const host = createServerHost([f]); + const cache = createMap(); + for (const name of JsTyping.nodeCoreModuleList) { + const result = JsTyping.discoverTypings(host, [f.path], getDirectoryPath(f.path), /*safeListPath*/ undefined, cache, { enableAutoDiscovery: true }, [name, "somename"]); + assert.deepEqual(result.newTypingNames.sort(), ["node", "somename"]); + } + }); + + it("should use cached locaitons", () => { + const f = { + path: "/a/b/app.js", + content: "" + }; + const node = { + path: "/a/b/node.d.ts", + content: "" + }; + const host = createServerHost([f, node]); + const cache = createMap({ "node": node.path }); + const result = JsTyping.discoverTypings(host, [f.path], getDirectoryPath(f.path), /*safeListPath*/ undefined, cache, { enableAutoDiscovery: true }, ["fs", "bar"]); + assert.deepEqual(result.cachedTypingPaths, [node.path]); + assert.deepEqual(result.newTypingNames, ["bar"]); + }); + }); } \ No newline at end of file diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index b520b18ea1d..9a87020d4f0 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -1679,6 +1679,7 @@ interface CSSStyleDeclaration { writingMode: string | null; zIndex: string | null; zoom: string | null; + resize: string | null; getPropertyPriority(propertyName: string): string; getPropertyValue(propertyName: string): string; item(index: number): string; @@ -1748,6 +1749,7 @@ declare var CanvasGradient: { } interface CanvasPattern { + setTransform(matrix: SVGMatrix): void; } declare var CanvasPattern: { @@ -2173,7 +2175,7 @@ interface DataTransfer { effectAllowed: string; readonly files: FileList; readonly items: DataTransferItemList; - readonly types: DOMStringList; + readonly types: string[]; clearData(format?: string): boolean; getData(format: string): string; setData(format: string, data: string): boolean; @@ -7584,7 +7586,7 @@ declare var IDBCursorWithValue: { interface IDBDatabase extends EventTarget { readonly name: string; - readonly objectStoreNames: DOMStringList; + readonly objectStoreNames: string[]; onabort: (this: this, ev: Event) => any; onerror: (this: this, ev: ErrorEvent) => any; version: number; @@ -7650,7 +7652,7 @@ declare var IDBKeyRange: { } interface IDBObjectStore { - readonly indexNames: DOMStringList; + readonly indexNames: string[]; keyPath: string | string[]; readonly name: string; readonly transaction: IDBTransaction; @@ -8602,7 +8604,7 @@ interface MouseEvent extends UIEvent { readonly x: number; readonly y: number; getModifierState(keyArg: string): boolean; - initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget): void; + initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget | null): void; } declare var MouseEvent: { @@ -8715,6 +8717,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte readonly plugins: PluginArray; readonly pointerEnabled: boolean; readonly webdriver: boolean; + readonly hardwareConcurrency: number; getGamepads(): Gamepad[]; javaEnabled(): boolean; msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void; @@ -8732,18 +8735,18 @@ interface Node extends EventTarget { readonly attributes: NamedNodeMap; readonly baseURI: string | null; readonly childNodes: NodeList; - readonly firstChild: Node; - readonly lastChild: Node; + readonly firstChild: Node | null; + readonly lastChild: Node | null; readonly localName: string | null; readonly namespaceURI: string | null; - readonly nextSibling: Node; + readonly nextSibling: Node | null; readonly nodeName: string; readonly nodeType: number; nodeValue: string | null; readonly ownerDocument: Document; - readonly parentElement: HTMLElement; - readonly parentNode: Node; - readonly previousSibling: Node; + readonly parentElement: HTMLElement | null; + readonly parentNode: Node | null; + readonly previousSibling: Node | null; textContent: string | null; appendChild(newChild: Node): Node; cloneNode(deep?: boolean): Node; @@ -12853,7 +12856,7 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window readonly devicePixelRatio: number; readonly doNotTrack: string; readonly document: Document; - event: Event; + event: Event | undefined; readonly external: External; readonly frameElement: Element; readonly frames: Window; @@ -13155,6 +13158,7 @@ interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget { readonly upload: XMLHttpRequestUpload; withCredentials: boolean; msCaching?: string; + readonly responseURL: string; abort(): void; getAllResponseHeaders(): string; getResponseHeader(header: string): string | null; @@ -14301,7 +14305,7 @@ declare var defaultStatus: string; declare var devicePixelRatio: number; declare var doNotTrack: string; declare var document: Document; -declare var event: Event; +declare var event: Event | undefined; declare var external: External; declare var frameElement: Element; declare var frames: Window; diff --git a/src/lib/webworker.generated.d.ts b/src/lib/webworker.generated.d.ts index b543939ef0a..4aeba696306 100644 --- a/src/lib/webworker.generated.d.ts +++ b/src/lib/webworker.generated.d.ts @@ -341,7 +341,7 @@ declare var IDBCursorWithValue: { interface IDBDatabase extends EventTarget { readonly name: string; - readonly objectStoreNames: DOMStringList; + readonly objectStoreNames: string[]; onabort: (this: this, ev: Event) => any; onerror: (this: this, ev: ErrorEvent) => any; version: number; @@ -407,7 +407,7 @@ declare var IDBKeyRange: { } interface IDBObjectStore { - readonly indexNames: DOMStringList; + readonly indexNames: string[]; keyPath: string | string[]; readonly name: string; readonly transaction: IDBTransaction; @@ -740,6 +740,7 @@ interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget { readonly upload: XMLHttpRequestUpload; withCredentials: boolean; msCaching?: string; + readonly responseURL: string; abort(): void; getAllResponseHeaders(): string; getResponseHeader(header: string): string | null; @@ -902,6 +903,7 @@ declare var WorkerLocation: { } interface WorkerNavigator extends Object, NavigatorID, NavigatorOnLine { + readonly hardwareConcurrency: number; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 6556aa01460..a02becd87c4 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -287,17 +287,20 @@ namespace ts.server { } switch (response.kind) { case "set": - this.typingsCache.updateTypingsForProject(response.projectName, response.compilerOptions, response.typingOptions, response.typings); - project.updateGraph(); + this.typingsCache.updateTypingsForProject(response.projectName, response.compilerOptions, response.typingOptions, response.unresolvedImports, response.typings); break; case "invalidate": - this.typingsCache.invalidateCachedTypingsForProject(project); + this.typingsCache.deleteTypingsForProject(response.projectName); break; } + project.updateGraph(); } setCompilerOptionsForInferredProjects(projectCompilerOptions: protocol.ExternalProjectCompilerOptions): void { this.compilerOptionsForInferredProjects = convertCompilerOptions(projectCompilerOptions); + // always set 'allowNonTsExtensions' for inferred projects since user cannot configure it from the outside + // previously we did not expose a way for user to change these settings and this option was enabled by default + this.compilerOptionsForInferredProjects.allowNonTsExtensions = true; this.compileOnSaveForInferredProjects = projectCompilerOptions.compileOnSave; for (const proj of this.inferredProjects) { proj.setCompilerOptions(this.compilerOptionsForInferredProjects); @@ -1008,7 +1011,7 @@ namespace ts.server { const useExistingProject = this.useSingleInferredProject && this.inferredProjects.length; const project = useExistingProject ? this.inferredProjects[0] - : new InferredProject(this, this.documentRegistry, /*languageServiceEnabled*/ true, this.compilerOptionsForInferredProjects, /*compileOnSaveEnabled*/ this.compileOnSaveForInferredProjects); + : new InferredProject(this, this.documentRegistry, /*languageServiceEnabled*/ true, this.compilerOptionsForInferredProjects); project.addRoot(root); diff --git a/src/server/lsHost.ts b/src/server/lsHost.ts index b36f73a19c5..628de71bb7a 100644 --- a/src/server/lsHost.ts +++ b/src/server/lsHost.ts @@ -5,59 +5,60 @@ namespace ts.server { export class LSHost implements ts.LanguageServiceHost, ModuleResolutionHost, ServerLanguageServiceHost { private compilationSettings: ts.CompilerOptions; - private readonly resolvedModuleNames: ts.FileMap>; - private readonly resolvedTypeReferenceDirectives: ts.FileMap>; + private readonly resolvedModuleNames= createFileMap>(); + private readonly resolvedTypeReferenceDirectives = createFileMap>(); private readonly getCanonicalFileName: (fileName: string) => string; + private filesWithChangedSetOfUnresolvedImports: Path[]; + private readonly resolveModuleName: typeof resolveModuleName; readonly trace: (s: string) => void; constructor(private readonly host: ServerHost, private readonly project: Project, private readonly cancellationToken: HostCancellationToken) { this.getCanonicalFileName = ts.createGetCanonicalFileName(this.host.useCaseSensitiveFileNames); - this.resolvedModuleNames = createFileMap>(); - this.resolvedTypeReferenceDirectives = createFileMap>(); if (host.trace) { this.trace = s => host.trace(s); } this.resolveModuleName = (moduleName, containingFile, compilerOptions, host) => { + const globalCache = this.project.getTypingOptions().enableAutoDiscovery + ? this.project.projectService.typingsInstaller.globalTypingsCacheLocation + : undefined; const primaryResult = resolveModuleName(moduleName, containingFile, compilerOptions, host); - if (primaryResult.resolvedModule) { - // return result immediately only if it is .ts, .tsx or .d.ts + // return result immediately only if it is .ts, .tsx or .d.ts + if (!(primaryResult.resolvedModule && extensionIsTypeScript(primaryResult.resolvedModule.extension)) && globalCache !== undefined) { // otherwise try to load typings from @types - if (fileExtensionIsAny(primaryResult.resolvedModule.resolvedFileName, supportedTypeScriptExtensions)) { - return primaryResult; + + // create different collection of failed lookup locations for second pass + // if it will fail and we've already found something during the first pass - we don't want to pollute its results + const { resolvedModule, failedLookupLocations } = loadModuleFromGlobalCache(moduleName, this.project.getProjectName(), compilerOptions, host, globalCache); + if (resolvedModule) { + return { resolvedModule, failedLookupLocations: primaryResult.failedLookupLocations.concat(failedLookupLocations) }; } } - // create different collection of failed lookup locations for second pass - // if it will fail and we've already found something during the first pass - we don't want to pollute its results - const secondaryLookupFailedLookupLocations: string[] = []; - const globalCache = this.project.projectService.typingsInstaller.globalTypingsCacheLocation; - if (this.project.getTypingOptions().enableAutoDiscovery && globalCache) { - const traceEnabled = isTraceEnabled(compilerOptions, host); - if (traceEnabled) { - trace(host, Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, this.project.getProjectName(), moduleName, globalCache); - } - const state: ModuleResolutionState = { compilerOptions, host, skipTsx: false, traceEnabled }; - const resolvedName = loadModuleFromNodeModules(moduleName, globalCache, secondaryLookupFailedLookupLocations, state, /*checkOneLevel*/ true); - if (resolvedName) { - return createResolvedModule(resolvedName, /*isExternalLibraryImport*/ true, primaryResult.failedLookupLocations.concat(secondaryLookupFailedLookupLocations)); - } - } - if (!primaryResult.resolvedModule && secondaryLookupFailedLookupLocations.length) { - primaryResult.failedLookupLocations = primaryResult.failedLookupLocations.concat(secondaryLookupFailedLookupLocations); - } return primaryResult; }; } - private resolveNamesWithLocalCache( + public startRecordingFilesWithChangedResolutions() { + this.filesWithChangedSetOfUnresolvedImports = []; + } + + public finishRecordingFilesWithChangedResolutions() { + const collected = this.filesWithChangedSetOfUnresolvedImports; + this.filesWithChangedSetOfUnresolvedImports = undefined; + return collected; + } + + private resolveNamesWithLocalCache( names: string[], containingFile: string, cache: ts.FileMap>, loader: (name: string, containingFile: string, options: CompilerOptions, host: ModuleResolutionHost) => T, - getResult: (s: T) => R): R[] { + getResult: (s: T) => R, + getResultFileName: (result: R) => string | undefined, + logChanges: boolean): R[] { const path = toPath(containingFile, this.host.getCurrentDirectory(), this.getCanonicalFileName); const currentResolutionsInFile = cache.get(path); @@ -79,6 +80,11 @@ namespace ts.server { else { newResolutions[name] = resolution = loader(name, containingFile, compilerOptions, this); } + if (logChanges && this.filesWithChangedSetOfUnresolvedImports && !resolutionIsEqualTo(existingResolution, resolution)) { + this.filesWithChangedSetOfUnresolvedImports.push(path); + // reset log changes to avoid recording the same file multiple times + logChanges = false; + } } ts.Debug.assert(resolution !== undefined); @@ -90,6 +96,24 @@ namespace ts.server { cache.set(path, newResolutions); return resolvedModules; + function resolutionIsEqualTo(oldResolution: T, newResolution: T): boolean { + if (oldResolution === newResolution) { + return true; + } + if (!oldResolution || !newResolution) { + return false; + } + const oldResult = getResult(oldResolution); + const newResult = getResult(newResolution); + if (oldResult === newResult) { + return true; + } + if (!oldResult || !newResult) { + return false; + } + return getResultFileName(oldResult) === getResultFileName(newResult); + } + function moduleResolutionIsValid(resolution: T): boolean { if (!resolution) { return false; @@ -97,10 +121,7 @@ namespace ts.server { const result = getResult(resolution); if (result) { - if (result.resolvedFileName && result.resolvedFileName === lastDeletedFileName) { - return false; - } - return true; + return getResultFileName(result) !== lastDeletedFileName; } // consider situation if we have no candidate locations as valid resolution. @@ -126,11 +147,13 @@ namespace ts.server { } resolveTypeReferenceDirectives(typeDirectiveNames: string[], containingFile: string): ResolvedTypeReferenceDirective[] { - return this.resolveNamesWithLocalCache(typeDirectiveNames, containingFile, this.resolvedTypeReferenceDirectives, resolveTypeReferenceDirective, m => m.resolvedTypeReferenceDirective); + return this.resolveNamesWithLocalCache(typeDirectiveNames, containingFile, this.resolvedTypeReferenceDirectives, resolveTypeReferenceDirective, + m => m.resolvedTypeReferenceDirective, r => r.resolvedFileName, /*logChanges*/ false); } - resolveModuleNames(moduleNames: string[], containingFile: string): ResolvedModule[] { - return this.resolveNamesWithLocalCache(moduleNames, containingFile, this.resolvedModuleNames, this.resolveModuleName, m => m.resolvedModule); + resolveModuleNames(moduleNames: string[], containingFile: string): ResolvedModuleFull[] { + return this.resolveNamesWithLocalCache(moduleNames, containingFile, this.resolvedModuleNames, this.resolveModuleName, + m => m.resolvedModule, r => r.resolvedFileName, /*logChanges*/ true); } getDefaultLibFileName() { @@ -197,10 +220,11 @@ namespace ts.server { } setCompilationSettings(opt: ts.CompilerOptions) { + if (changesAffectModuleResolution(this.compilationSettings, opt)) { + this.resolvedModuleNames.clear(); + this.resolvedTypeReferenceDirectives.clear(); + } this.compilationSettings = opt; - // conservatively assume that changing compiler options might affect module resolution strategy - this.resolvedModuleNames.clear(); - this.resolvedTypeReferenceDirectives.clear(); } } } \ No newline at end of file diff --git a/src/server/project.ts b/src/server/project.ts index dd8902e83d1..457f5e2b261 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -62,12 +62,43 @@ namespace ts.server { projectErrors: Diagnostic[]; } + export class UnresolvedImportsMap { + readonly perFileMap = createFileMap>(); + private version = 0; + + public clear() { + this.perFileMap.clear(); + this.version = 0; + } + + public getVersion() { + return this.version; + } + + public remove(path: Path) { + this.perFileMap.remove(path); + this.version++; + } + + public get(path: Path) { + return this.perFileMap.get(path); + } + + public set(path: Path, value: ReadonlyArray) { + this.perFileMap.set(path, value); + this.version++; + } + } + export abstract class Project { private rootFiles: ScriptInfo[] = []; private rootFilesMap: FileMap = createFileMap(); private lsHost: ServerLanguageServiceHost; private program: ts.Program; + private cachedUnresolvedImportsPerFile = new UnresolvedImportsMap(); + private lastCachedUnresolvedImportsList: SortedReadonlyArray; + private languageService: LanguageService; builder: Builder; /** @@ -91,7 +122,7 @@ namespace ts.server { */ private projectStateVersion = 0; - private typingFiles: TypingsArray; + private typingFiles: SortedReadonlyArray; protected projectErrors: Diagnostic[]; @@ -107,6 +138,10 @@ namespace ts.server { return hasOneOrMoreJsAndNoTsFiles(this); } + public getCachedUnresolvedImportsPerFile_TestOnly() { + return this.cachedUnresolvedImportsPerFile; + } + constructor( readonly projectKind: ProjectKind, readonly projectService: ProjectService, @@ -326,6 +361,7 @@ namespace ts.server { removeFile(info: ScriptInfo, detachFromProject = true) { this.removeRootFileIfNecessary(info); this.lsHost.notifyFileRemoved(info); + this.cachedUnresolvedImportsPerFile.remove(info.path); if (detachFromProject) { info.detachFromProject(this); @@ -338,6 +374,38 @@ namespace ts.server { this.projectStateVersion++; } + private extractUnresolvedImportsFromSourceFile(file: SourceFile, result: string[]) { + const cached = this.cachedUnresolvedImportsPerFile.get(file.path); + if (cached) { + // found cached result - use it and return + for (const f of cached) { + result.push(f); + } + return; + } + let unresolvedImports: string[]; + if (file.resolvedModules) { + for (const name in file.resolvedModules) { + // pick unresolved non-relative names + if (!file.resolvedModules[name] && !isExternalModuleNameRelative(name)) { + // for non-scoped names extract part up-to the first slash + // for scoped names - extract up to the second slash + let trimmed = name.trim(); + let i = trimmed.indexOf("/"); + if (i !== -1 && trimmed.charCodeAt(0) === CharacterCodes.at) { + i = trimmed.indexOf("/", i + 1); + } + if (i !== -1) { + trimmed = trimmed.substr(0, i); + } + (unresolvedImports || (unresolvedImports = [])).push(trimmed); + result.push(trimmed); + } + } + } + this.cachedUnresolvedImportsPerFile.set(file.path, unresolvedImports || emptyArray); + } + /** * Updates set of files that contribute to this project * @returns: true if set of files in the project stays the same and false - otherwise. @@ -346,8 +414,35 @@ namespace ts.server { if (!this.languageServiceEnabled) { return true; } + + this.lsHost.startRecordingFilesWithChangedResolutions(); + let hasChanges = this.updateGraphWorker(); - const cachedTypings = this.projectService.typingsCache.getTypingsForProject(this, hasChanges); + + const changedFiles: ReadonlyArray = this.lsHost.finishRecordingFilesWithChangedResolutions() || emptyArray; + + for (const file of changedFiles) { + // delete cached information for changed files + this.cachedUnresolvedImportsPerFile.remove(file); + } + + // 1. no changes in structure, no changes in unresolved imports - do nothing + // 2. no changes in structure, unresolved imports were changed - collect unresolved imports for all files + // (can reuse cached imports for files that were not changed) + // 3. new files were added/removed, but compilation settings stays the same - collect unresolved imports for all new/modified files + // (can reuse cached imports for files that were not changed) + // 4. compilation settings were changed in the way that might affect module resolution - drop all caches and collect all data from the scratch + let unresolvedImports: SortedReadonlyArray; + if (hasChanges || changedFiles.length) { + const result: string[] = []; + for (const sourceFile of this.program.getSourceFiles()) { + this.extractUnresolvedImportsFromSourceFile(sourceFile, result); + } + this.lastCachedUnresolvedImportsList = toSortedReadonlyArray(result); + } + unresolvedImports = this.lastCachedUnresolvedImportsList; + + const cachedTypings = this.projectService.typingsCache.getTypingsForProject(this, unresolvedImports, hasChanges); if (this.setTypings(cachedTypings)) { hasChanges = this.updateGraphWorker() || hasChanges; } @@ -357,7 +452,7 @@ namespace ts.server { return !hasChanges; } - private setTypings(typings: TypingsArray): boolean { + private setTypings(typings: SortedReadonlyArray): boolean { if (arrayIsEqualTo(this.typingFiles, typings)) { return false; } @@ -430,6 +525,11 @@ namespace ts.server { compilerOptions.allowJs = true; } compilerOptions.allowNonTsExtensions = true; + if (changesAffectModuleResolution(this.compilerOptions, compilerOptions)) { + // reset cached unresolved imports if changes in compiler options affected module resolution + this.cachedUnresolvedImportsPerFile.clear(); + this.lastCachedUnresolvedImportsList = undefined; + } this.compilerOptions = compilerOptions; this.lsHost.setCompilationSettings(compilerOptions); @@ -566,14 +666,14 @@ namespace ts.server { // Used to keep track of what directories are watched for this project directoriesWatchedForTsconfig: string[] = []; - constructor(projectService: ProjectService, documentRegistry: ts.DocumentRegistry, languageServiceEnabled: boolean, compilerOptions: CompilerOptions, public compileOnSaveEnabled: boolean) { + constructor(projectService: ProjectService, documentRegistry: ts.DocumentRegistry, languageServiceEnabled: boolean, compilerOptions: CompilerOptions) { super(ProjectKind.Inferred, projectService, documentRegistry, /*files*/ undefined, languageServiceEnabled, compilerOptions, - compileOnSaveEnabled); + /*compileOnSaveEnabled*/ false); this.inferredProjectName = makeInferredProjectName(InferredProject.NextId); InferredProject.NextId++; diff --git a/src/server/server.ts b/src/server/server.ts index 6ddd267f56e..5057a13dbd1 100644 --- a/src/server/server.ts +++ b/src/server/server.ts @@ -14,21 +14,33 @@ namespace ts.server { } = require("child_process"); const os: { - homedir(): string + homedir?(): string; + tmpdir(): string; } = require("os"); - function getGlobalTypingsCacheLocation() { let basePath: string; switch (process.platform) { case "win32": - basePath = process.env.LOCALAPPDATA || process.env.APPDATA || os.homedir(); + basePath = process.env.LOCALAPPDATA || + process.env.APPDATA || + (os.homedir && os.homedir()) || + process.env.USERPROFILE || + (process.env.HOMEDRIVE && process.env.HOMEPATH && normalizeSlashes(process.env.HOMEDRIVE + process.env.HOMEPATH)) || + os.tmpdir(); break; case "linux": - basePath = os.homedir(); + basePath = (os.homedir && os.homedir()) || + process.env.HOME || + ((process.env.LOGNAME || process.env.USER) && `/home/${process.env.LOGNAME || process.env.USER}`) || + os.tmpdir(); break; case "darwin": - basePath = combinePaths(os.homedir(), "Library/Application Support/"); + const homeDir = (os.homedir && os.homedir()) || + process.env.HOME || + ((process.env.LOGNAME || process.env.USER) && `/Users/${process.env.LOGNAME || process.env.USER}`) || + os.tmpdir(); + basePath = combinePaths(homeDir, "Library/Application Support/"); break; } @@ -40,6 +52,7 @@ namespace ts.server { send(message: any, sendHandle?: any): void; on(message: "message", f: (m: any) => void): void; kill(): void; + pid: number; } interface NodeSocket { @@ -179,21 +192,40 @@ namespace ts.server { class NodeTypingsInstaller implements ITypingsInstaller { private installer: NodeChildProcess; + private installerPidReported = false; private socket: NodeSocket; private projectService: ProjectService; + private throttledOperations: ThrottledOperations; constructor( private readonly logger: server.Logger, + host: ServerHost, eventPort: number, readonly globalTypingsCacheLocation: string, private newLine: string) { + this.throttledOperations = new ThrottledOperations(host); if (eventPort) { const s = net.connect({ port: eventPort }, () => { this.socket = s; + this.reportInstallerProcessId(); }); } } + private reportInstallerProcessId() { + if (this.installerPidReported) { + return; + } + if (this.socket && this.installer) { + this.sendEvent(0, "typingsInstallerPid", { pid: this.installer.pid }); + this.installerPidReported = true; + } + } + + private sendEvent(seq: number, event: string, body: any): void { + this.socket.write(formatMessage({ seq, type: "event", event, body }, this.logger, Buffer.byteLength, this.newLine), "utf8"); + } + attach(projectService: ProjectService) { this.projectService = projectService; if (this.logger.hasLevel(LogLevel.requestTime)) { @@ -222,6 +254,8 @@ namespace ts.server { this.installer = childProcess.fork(combinePaths(__dirname, "typingsInstaller.js"), args, { execArgv }); this.installer.on("message", m => this.handleMessage(m)); + this.reportInstallerProcessId(); + process.on("exit", () => { this.installer.kill(); }); @@ -231,12 +265,19 @@ namespace ts.server { this.installer.send({ projectName: p.getProjectName(), kind: "closeProject" }); } - enqueueInstallTypingsRequest(project: Project, typingOptions: TypingOptions): void { - const request = createInstallTypingsRequest(project, typingOptions); + enqueueInstallTypingsRequest(project: Project, typingOptions: TypingOptions, unresolvedImports: SortedReadonlyArray): void { + const request = createInstallTypingsRequest(project, typingOptions, unresolvedImports); if (this.logger.hasLevel(LogLevel.verbose)) { - this.logger.info(`Sending request: ${JSON.stringify(request)}`); + if (this.logger.hasLevel(LogLevel.verbose)) { + this.logger.info(`Scheduling throttled operation: ${JSON.stringify(request)}`); + } } - this.installer.send(request); + this.throttledOperations.schedule(project.getProjectName(), /*ms*/ 250, () => { + if (this.logger.hasLevel(LogLevel.verbose)) { + this.logger.info(`Sending request: ${JSON.stringify(request)}`); + } + this.installer.send(request); + }); } private handleMessage(response: SetTypings | InvalidateCachedTypings) { @@ -245,7 +286,7 @@ namespace ts.server { } this.projectService.updateTypingsForProject(response); if (response.kind == "set" && this.socket) { - this.socket.write(formatMessage({ seq: 0, type: "event", message: response }, this.logger, Buffer.byteLength, this.newLine), "utf8"); + this.sendEvent(0, "setTypings", response); } } } @@ -266,7 +307,7 @@ namespace ts.server { useSingleInferredProject, disableAutomaticTypingAcquisition ? nullTypingsInstaller - : new NodeTypingsInstaller(logger, installerEventPort, globalTypingsCacheLocation, host.newLine), + : new NodeTypingsInstaller(logger, host, installerEventPort, globalTypingsCacheLocation, host.newLine), Buffer.byteLength, process.hrtime, logger, diff --git a/src/server/types.d.ts b/src/server/types.d.ts index 14af59d5cd3..ec2befe8fa9 100644 --- a/src/server/types.d.ts +++ b/src/server/types.d.ts @@ -18,6 +18,10 @@ declare namespace ts.server { trace?(s: string): void; } + export interface SortedReadonlyArray extends ReadonlyArray { + " __sortedReadonlyArrayBrand": any; + } + export interface TypingInstallerRequest { readonly projectName: string; readonly kind: "discover" | "closeProject"; @@ -26,8 +30,9 @@ declare namespace ts.server { export interface DiscoverTypings extends TypingInstallerRequest { readonly fileNames: string[]; readonly projectRootPath: ts.Path; - readonly typingOptions: ts.TypingOptions; readonly compilerOptions: ts.CompilerOptions; + readonly typingOptions: ts.TypingOptions; + readonly unresolvedImports: SortedReadonlyArray; readonly cachePath?: string; readonly kind: "discover"; } @@ -36,20 +41,23 @@ declare namespace ts.server { readonly kind: "closeProject"; } + export type SetRequest = "set"; + export type InvalidateRequest = "invalidate"; export interface TypingInstallerResponse { readonly projectName: string; - readonly kind: "set" | "invalidate"; + readonly kind: SetRequest | InvalidateRequest; } export interface SetTypings extends TypingInstallerResponse { readonly typingOptions: ts.TypingOptions; readonly compilerOptions: ts.CompilerOptions; readonly typings: string[]; - readonly kind: "set"; + readonly unresolvedImports: SortedReadonlyArray; + readonly kind: SetRequest; } export interface InvalidateCachedTypings extends TypingInstallerResponse { - readonly kind: "invalidate"; + readonly kind: InvalidateRequest; } export interface InstallTypingHost extends JsTyping.TypingResolutionHost { diff --git a/src/server/typingsCache.ts b/src/server/typingsCache.ts index 04c321b46f9..9013622e24a 100644 --- a/src/server/typingsCache.ts +++ b/src/server/typingsCache.ts @@ -2,7 +2,7 @@ namespace ts.server { export interface ITypingsInstaller { - enqueueInstallTypingsRequest(p: Project, typingOptions: TypingOptions): void; + enqueueInstallTypingsRequest(p: Project, typingOptions: TypingOptions, unresolvedImports: SortedReadonlyArray): void; attach(projectService: ProjectService): void; onProjectClosed(p: Project): void; readonly globalTypingsCacheLocation: string; @@ -18,7 +18,9 @@ namespace ts.server { class TypingsCacheEntry { readonly typingOptions: TypingOptions; readonly compilerOptions: CompilerOptions; - readonly typings: TypingsArray; + readonly typings: SortedReadonlyArray; + readonly unresolvedImports: SortedReadonlyArray; + /* mainly useful for debugging */ poisoned: boolean; } @@ -61,13 +63,11 @@ namespace ts.server { return opt1.allowJs != opt2.allowJs; } - export interface TypingsArray extends ReadonlyArray { - " __typingsArrayBrand": any; - } - - function toTypingsArray(arr: string[]): TypingsArray { - arr.sort(); - return arr; + function unresolvedImportsChanged(imports1: SortedReadonlyArray, imports2: SortedReadonlyArray): boolean { + if (imports1 === imports2) { + return false; + } + return !arrayIsEqualTo(imports1, imports2); } export class TypingsCache { @@ -76,7 +76,7 @@ namespace ts.server { constructor(private readonly installer: ITypingsInstaller) { } - getTypingsForProject(project: Project, forceRefresh: boolean): TypingsArray { + getTypingsForProject(project: Project, unresolvedImports: SortedReadonlyArray, forceRefresh: boolean): SortedReadonlyArray { const typingOptions = project.getTypingOptions(); if (!typingOptions || !typingOptions.enableAutoDiscovery) { @@ -84,39 +84,41 @@ namespace ts.server { } const entry = this.perProjectCache[project.getProjectName()]; - const result: TypingsArray = entry ? entry.typings : emptyArray; - if (forceRefresh || !entry || typingOptionsChanged(typingOptions, entry.typingOptions) || compilerOptionsChanged(project.getCompilerOptions(), entry.compilerOptions)) { + const result: SortedReadonlyArray = entry ? entry.typings : emptyArray; + if (forceRefresh || + !entry || + typingOptionsChanged(typingOptions, entry.typingOptions) || + compilerOptionsChanged(project.getCompilerOptions(), entry.compilerOptions) || + unresolvedImportsChanged(unresolvedImports, entry.unresolvedImports)) { // Note: entry is now poisoned since it does not really contain typings for a given combination of compiler options\typings options. // instead it acts as a placeholder to prevent issuing multiple requests this.perProjectCache[project.getProjectName()] = { compilerOptions: project.getCompilerOptions(), typingOptions, typings: result, + unresolvedImports, poisoned: true }; // something has been changed, issue a request to update typings - this.installer.enqueueInstallTypingsRequest(project, typingOptions); + this.installer.enqueueInstallTypingsRequest(project, typingOptions, unresolvedImports); } return result; } - invalidateCachedTypingsForProject(project: Project) { - const typingOptions = project.getTypingOptions(); - if (!typingOptions.enableAutoDiscovery) { - return; - } - this.installer.enqueueInstallTypingsRequest(project, typingOptions); - } - - updateTypingsForProject(projectName: string, compilerOptions: CompilerOptions, typingOptions: TypingOptions, newTypings: string[]) { + updateTypingsForProject(projectName: string, compilerOptions: CompilerOptions, typingOptions: TypingOptions, unresolvedImports: SortedReadonlyArray, newTypings: string[]) { this.perProjectCache[projectName] = { compilerOptions, typingOptions, - typings: toTypingsArray(newTypings), + typings: toSortedReadonlyArray(newTypings), + unresolvedImports, poisoned: false }; } + deleteTypingsForProject(projectName: string) { + delete this.perProjectCache[projectName]; + } + onProjectClosed(project: Project) { delete this.perProjectCache[project.getProjectName()]; this.installer.onProjectClosed(project); diff --git a/src/server/typingsInstaller/typingsInstaller.ts b/src/server/typingsInstaller/typingsInstaller.ts index 21f85c241a6..df043fc26ae 100644 --- a/src/server/typingsInstaller/typingsInstaller.ts +++ b/src/server/typingsInstaller/typingsInstaller.ts @@ -26,6 +26,7 @@ namespace ts.server.typingsInstaller { export enum PackageNameValidationResult { Ok, ScopedPackagesNotSupported, + EmptyName, NameTooLong, NameStartsWithDot, NameStartsWithUnderscore, @@ -38,7 +39,9 @@ namespace ts.server.typingsInstaller { * Validates package name using rules defined at https://docs.npmjs.com/files/package.json */ export function validatePackageName(packageName: string): PackageNameValidationResult { - Debug.assert(!!packageName, "Package name is not specified"); + if (!packageName) { + return PackageNameValidationResult.EmptyName; + } if (packageName.length > MaxPackageNameLength) { return PackageNameValidationResult.NameTooLong; } @@ -145,7 +148,8 @@ namespace ts.server.typingsInstaller { req.projectRootPath, this.safeListPath, this.packageNameToTypingLocation, - req.typingOptions); + req.typingOptions, + req.unresolvedImports); if (this.log.isEnabled()) { this.log.writeLine(`Finished typings discovery: ${JSON.stringify(discoverTypingsResult)}`); @@ -238,6 +242,9 @@ namespace ts.server.typingsInstaller { this.missingTypingsSet[typing] = true; if (this.log.isEnabled()) { switch (validationResult) { + case PackageNameValidationResult.EmptyName: + this.log.writeLine(`Package name '${typing}' cannot be empty`); + break; case PackageNameValidationResult.NameTooLong: this.log.writeLine(`Package name '${typing}' should be less than ${MaxPackageNameLength} characters`); break; @@ -397,6 +404,7 @@ namespace ts.server.typingsInstaller { typingOptions: request.typingOptions, compilerOptions: request.compilerOptions, typings, + unresolvedImports: request.unresolvedImports, kind: "set" }; } diff --git a/src/server/utilities.ts b/src/server/utilities.ts index 5bd3423e570..8806b759e3f 100644 --- a/src/server/utilities.ts +++ b/src/server/utilities.ts @@ -45,12 +45,13 @@ namespace ts.server { } } - export function createInstallTypingsRequest(project: Project, typingOptions: TypingOptions, cachePath?: string): DiscoverTypings { + export function createInstallTypingsRequest(project: Project, typingOptions: TypingOptions, unresolvedImports: SortedReadonlyArray, cachePath?: string): DiscoverTypings { return { projectName: project.getProjectName(), fileNames: project.getFileNames(), compilerOptions: project.getCompilerOptions(), typingOptions, + unresolvedImports, projectRootPath: getProjectRootPath(project), cachePath, kind: "discover" @@ -209,11 +210,15 @@ namespace ts.server { export interface ServerLanguageServiceHost { setCompilationSettings(options: CompilerOptions): void; notifyFileRemoved(info: ScriptInfo): void; + startRecordingFilesWithChangedResolutions(): void; + finishRecordingFilesWithChangedResolutions(): Path[]; } export const nullLanguageServiceHost: ServerLanguageServiceHost = { setCompilationSettings: () => undefined, - notifyFileRemoved: () => undefined + notifyFileRemoved: () => undefined, + startRecordingFilesWithChangedResolutions: () => undefined, + finishRecordingFilesWithChangedResolutions: () => undefined }; export interface ProjectOptions { @@ -240,6 +245,11 @@ namespace ts.server { return `/dev/null/inferredProject${counter}*`; } + export function toSortedReadonlyArray(arr: string[]): SortedReadonlyArray { + arr.sort(); + return arr; + } + export class ThrottledOperations { private pendingTimeouts: Map = createMap(); constructor(private readonly host: ServerHost) { diff --git a/src/services/completions.ts b/src/services/completions.ts index ba5d1503075..b710aa8cd78 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -1590,7 +1590,9 @@ namespace ts.Completions { if (m.kind !== SyntaxKind.PropertyAssignment && m.kind !== SyntaxKind.ShorthandPropertyAssignment && m.kind !== SyntaxKind.BindingElement && - m.kind !== SyntaxKind.MethodDeclaration) { + m.kind !== SyntaxKind.MethodDeclaration && + m.kind !== SyntaxKind.GetAccessor && + m.kind !== SyntaxKind.SetAccessor) { continue; } diff --git a/src/services/jsTyping.ts b/src/services/jsTyping.ts index 561e0110cda..0f635c15174 100644 --- a/src/services/jsTyping.ts +++ b/src/services/jsTyping.ts @@ -31,6 +31,17 @@ namespace ts.JsTyping { const EmptySafeList: Map = createMap(); + /* @internal */ + export const nodeCoreModuleList: ReadonlyArray = [ + "buffer", "querystring", "events", "http", "cluster", + "zlib", "os", "https", "punycode", "repl", "readline", + "vm", "child_process", "url", "dns", "net", + "dgram", "fs", "path", "string_decoder", "tls", + "crypto", "stream", "util", "assert", "tty", "domain", + "constants", "process", "v8", "timers", "console"]; + + const nodeCoreModules = arrayToMap(nodeCoreModuleList, x => x); + /** * @param host is the object providing I/O related operations. * @param fileNames are the file names that belong to the same project @@ -46,7 +57,8 @@ namespace ts.JsTyping { projectRootPath: Path, safeListPath: Path, packageNameToTypingLocation: Map, - typingOptions: TypingOptions): + typingOptions: TypingOptions, + unresolvedImports: ReadonlyArray): { cachedTypingPaths: string[], newTypingNames: string[], filesToWatch: string[] } { // A typing name to typing file path mapping @@ -92,6 +104,15 @@ namespace ts.JsTyping { } getTypingNamesFromSourceFileNames(fileNames); + // add typings for unresolved imports + if (unresolvedImports) { + for (const moduleId of unresolvedImports) { + const typingName = moduleId in nodeCoreModules ? "node" : moduleId; + if (!(typingName in inferredTypings)) { + inferredTypings[typingName] = undefined; + } + } + } // Add the cached typing locations for inferred typings that are already installed for (const name in packageNameToTypingLocation) { if (name in inferredTypings && !inferredTypings[name]) { diff --git a/src/services/navigationBar.ts b/src/services/navigationBar.ts index 7b4fb8cdba6..51ce9b6001d 100644 --- a/src/services/navigationBar.ts +++ b/src/services/navigationBar.ts @@ -403,6 +403,9 @@ namespace ts.NavigationBar { if (getModifierFlags(node) & ModifierFlags.Default) { return "default"; } + // We may get a string with newlines or other whitespace in the case of an object dereference + // (eg: "app\n.onactivated"), so we should remove the whitespace for readabiltiy in the + // navigation bar. return getFunctionOrClassName(node); case SyntaxKind.Constructor: return "constructor"; @@ -602,7 +605,7 @@ namespace ts.NavigationBar { // See if it is of the form " = function(){...}". If so, use the text from the left-hand side. else if (node.parent.kind === SyntaxKind.BinaryExpression && (node.parent as BinaryExpression).operatorToken.kind === SyntaxKind.EqualsToken) { - return nodeText((node.parent as BinaryExpression).left); + return nodeText((node.parent as BinaryExpression).left).replace(whiteSpaceRegex, ""); } // See if it is a property assignment, and if so use the property name else if (node.parent.kind === SyntaxKind.PropertyAssignment && (node.parent as PropertyAssignment).name) { @@ -620,4 +623,19 @@ namespace ts.NavigationBar { function isFunctionOrClassExpression(node: Node): boolean { return node.kind === SyntaxKind.FunctionExpression || node.kind === SyntaxKind.ArrowFunction || node.kind === SyntaxKind.ClassExpression; } + + /** + * Matches all whitespace characters in a string. Eg: + * + * "app. + * + * onactivated" + * + * matches because of the newline, whereas + * + * "app.onactivated" + * + * does not match. + */ + const whiteSpaceRegex = /\s+/g; } diff --git a/src/services/services.ts b/src/services/services.ts index 5669134d37e..8c11c707e5d 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -467,7 +467,7 @@ namespace ts { public languageVariant: LanguageVariant; public identifiers: Map; public nameTable: Map; - public resolvedModules: Map; + public resolvedModules: Map; public resolvedTypeReferenceDirectiveNames: Map; public imports: LiteralExpression[]; public moduleAugmentations: LiteralExpression[]; diff --git a/src/services/shims.ts b/src/services/shims.ts index bd4c48838da..b1fac14674c 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -316,7 +316,7 @@ namespace ts { private loggingEnabled = false; private tracingEnabled = false; - public resolveModuleNames: (moduleName: string[], containingFile: string) => ResolvedModule[]; + public resolveModuleNames: (moduleName: string[], containingFile: string) => ResolvedModuleFull[]; public resolveTypeReferenceDirectives: (typeDirectiveNames: string[], containingFile: string) => ResolvedTypeReferenceDirective[]; public directoryExists: (directoryName: string) => boolean; @@ -328,7 +328,7 @@ namespace ts { const resolutionsInFile = >JSON.parse(this.shimHost.getModuleResolutionsForFile(containingFile)); return map(moduleNames, name => { const result = getProperty(resolutionsInFile, name); - return result ? { resolvedFileName: result } : undefined; + return result ? { resolvedFileName: result, extension: extensionFromPath(result), isExternalLibraryImport: false } : undefined; }); }; } @@ -1168,7 +1168,8 @@ namespace ts { toPath(info.projectRootPath, info.projectRootPath, getCanonicalFileName), toPath(info.safeListPath, info.safeListPath, getCanonicalFileName), info.packageNameToTypingLocation, - info.typingOptions); + info.typingOptions, + info.unresolvedImports); }); } } diff --git a/src/services/tsconfig.json b/src/services/tsconfig.json index e81db68325c..a585236c666 100644 --- a/src/services/tsconfig.json +++ b/src/services/tsconfig.json @@ -31,6 +31,7 @@ "../compiler/transformers/es2017.ts", "../compiler/transformers/es2016.ts", "../compiler/transformers/es2015.ts", + "../compiler/transformers/es5.ts", "../compiler/transformers/generators.ts", "../compiler/transformers/generators.ts", "../compiler/transformers/destructuring.ts", diff --git a/tests/baselines/reference/ExportAssignment7.js b/tests/baselines/reference/ExportAssignment7.js index bc7cee12b1d..461631e0e7d 100644 --- a/tests/baselines/reference/ExportAssignment7.js +++ b/tests/baselines/reference/ExportAssignment7.js @@ -11,5 +11,4 @@ var C = (function () { } return C; }()); -exports.C = C; module.exports = B; diff --git a/tests/baselines/reference/ExportAssignment8.js b/tests/baselines/reference/ExportAssignment8.js index e31a38c651c..d0963008012 100644 --- a/tests/baselines/reference/ExportAssignment8.js +++ b/tests/baselines/reference/ExportAssignment8.js @@ -11,5 +11,4 @@ var C = (function () { } return C; }()); -exports.C = C; module.exports = B; diff --git a/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.typedefTagWithChildrenTags.json b/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.typedefTagWithChildrenTags.json index 30ca205587e..7ef64f5a971 100644 --- a/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.typedefTagWithChildrenTags.json +++ b/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.typedefTagWithChildrenTags.json @@ -18,6 +18,12 @@ "end": 16, "text": "typedef" }, + "fullName": { + "kind": "Identifier", + "pos": 17, + "end": 23, + "text": "People" + }, "name": { "kind": "Identifier", "pos": 17, diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.js b/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.js index 3cd522d3c2c..713d2ac7f18 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.js +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedEnums.js @@ -14,11 +14,11 @@ var b = A.Day.Monday; //// [ModuleWithExportedAndNonExportedEnums.js] var A; (function (A) { + var Color; (function (Color) { Color[Color["Red"] = 0] = "Red"; Color[Color["Blue"] = 1] = "Blue"; - })(A.Color || (A.Color = {})); - var Color = A.Color; + })(Color = A.Color || (A.Color = {})); var Day; (function (Day) { Day[Day["Monday"] = 0] = "Monday"; diff --git a/tests/baselines/reference/ambientRequireFunction.js b/tests/baselines/reference/ambientRequireFunction.js new file mode 100644 index 00000000000..cd00b287c82 --- /dev/null +++ b/tests/baselines/reference/ambientRequireFunction.js @@ -0,0 +1,21 @@ +//// [tests/cases/compiler/ambientRequireFunction.ts] //// + +//// [node.d.ts] + + +declare function require(moduleName: string): any; + +declare module "fs" { + export function readFileSync(s: string): string; +} + +//// [app.js] +/// + +const fs = require("fs"); +const text = fs.readFileSync("/a/b/c"); + +//// [app.js] +/// +var fs = require("fs"); +var text = fs.readFileSync("/a/b/c"); diff --git a/tests/baselines/reference/ambientRequireFunction.symbols b/tests/baselines/reference/ambientRequireFunction.symbols new file mode 100644 index 00000000000..6afb47e37fb --- /dev/null +++ b/tests/baselines/reference/ambientRequireFunction.symbols @@ -0,0 +1,27 @@ +=== tests/cases/compiler/app.js === +/// + +const fs = require("fs"); +>fs : Symbol(fs, Decl(app.js, 2, 5)) +>require : Symbol(require, Decl(node.d.ts, 0, 0)) +>"fs" : Symbol("fs", Decl(node.d.ts, 2, 50)) + +const text = fs.readFileSync("/a/b/c"); +>text : Symbol(text, Decl(app.js, 3, 5)) +>fs.readFileSync : Symbol(readFileSync, Decl(node.d.ts, 4, 21)) +>fs : Symbol(fs, Decl(app.js, 2, 5)) +>readFileSync : Symbol(readFileSync, Decl(node.d.ts, 4, 21)) + +=== tests/cases/compiler/node.d.ts === + + +declare function require(moduleName: string): any; +>require : Symbol(require, Decl(node.d.ts, 0, 0)) +>moduleName : Symbol(moduleName, Decl(node.d.ts, 2, 25)) + +declare module "fs" { + export function readFileSync(s: string): string; +>readFileSync : Symbol(readFileSync, Decl(node.d.ts, 4, 21)) +>s : Symbol(s, Decl(node.d.ts, 5, 33)) +} + diff --git a/tests/baselines/reference/ambientRequireFunction.types b/tests/baselines/reference/ambientRequireFunction.types new file mode 100644 index 00000000000..7b01a59268f --- /dev/null +++ b/tests/baselines/reference/ambientRequireFunction.types @@ -0,0 +1,30 @@ +=== tests/cases/compiler/app.js === +/// + +const fs = require("fs"); +>fs : typeof "fs" +>require("fs") : typeof "fs" +>require : (moduleName: string) => any +>"fs" : "fs" + +const text = fs.readFileSync("/a/b/c"); +>text : string +>fs.readFileSync("/a/b/c") : string +>fs.readFileSync : (s: string) => string +>fs : typeof "fs" +>readFileSync : (s: string) => string +>"/a/b/c" : "/a/b/c" + +=== tests/cases/compiler/node.d.ts === + + +declare function require(moduleName: string): any; +>require : (moduleName: string) => any +>moduleName : string + +declare module "fs" { + export function readFileSync(s: string): string; +>readFileSync : (s: string) => string +>s : string +} + diff --git a/tests/baselines/reference/amdImportAsPrimaryExpression.js b/tests/baselines/reference/amdImportAsPrimaryExpression.js index 1281b7f7f47..3c2e9c041fa 100644 --- a/tests/baselines/reference/amdImportAsPrimaryExpression.js +++ b/tests/baselines/reference/amdImportAsPrimaryExpression.js @@ -15,12 +15,12 @@ if(foo.E1.A === 0){ //// [foo_0.js] define(["require", "exports"], function (require, exports) { "use strict"; + var E1; (function (E1) { E1[E1["A"] = 0] = "A"; E1[E1["B"] = 1] = "B"; E1[E1["C"] = 2] = "C"; - })(exports.E1 || (exports.E1 = {})); - var E1 = exports.E1; + })(E1 = exports.E1 || (exports.E1 = {})); }); //// [foo_1.js] define(["require", "exports", "./foo_0"], function (require, exports, foo) { diff --git a/tests/baselines/reference/amdImportNotAsPrimaryExpression.js b/tests/baselines/reference/amdImportNotAsPrimaryExpression.js index b8e9f5346b0..a0bd7c83d64 100644 --- a/tests/baselines/reference/amdImportNotAsPrimaryExpression.js +++ b/tests/baselines/reference/amdImportNotAsPrimaryExpression.js @@ -40,14 +40,14 @@ define(["require", "exports"], function (require, exports) { } return C1; }()); - exports.C1 = C1; C1.s1 = true; + exports.C1 = C1; + var E1; (function (E1) { E1[E1["A"] = 0] = "A"; E1[E1["B"] = 1] = "B"; E1[E1["C"] = 2] = "C"; - })(exports.E1 || (exports.E1 = {})); - var E1 = exports.E1; + })(E1 = exports.E1 || (exports.E1 = {})); }); //// [foo_1.js] define(["require", "exports"], function (require, exports) { diff --git a/tests/baselines/reference/asyncAliasReturnType_es5.errors.txt b/tests/baselines/reference/asyncAliasReturnType_es5.errors.txt new file mode 100644 index 00000000000..5e524e265e2 --- /dev/null +++ b/tests/baselines/reference/asyncAliasReturnType_es5.errors.txt @@ -0,0 +1,10 @@ +tests/cases/conformance/async/es5/asyncAliasReturnType_es5.ts(3,21): error TS1055: Type 'PromiseAlias' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. + + +==== tests/cases/conformance/async/es5/asyncAliasReturnType_es5.ts (1 errors) ==== + type PromiseAlias = Promise; + + async function f(): PromiseAlias { + ~~~~~~~~~~~~~~~~~~ +!!! error TS1055: Type 'PromiseAlias' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. + } \ No newline at end of file diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es5.js b/tests/baselines/reference/asyncAwaitIsolatedModules_es5.js index fe99be204fc..2f11dddf7de 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es5.js +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es5.js @@ -77,6 +77,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; var _this = this; +var missing_1 = require("missing"); function f0() { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 /*return*/]; diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt index 3ea03927aa9..5fa33233912 100644 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt +++ b/tests/baselines/reference/asyncFunctionDeclaration15_es5.errors.txt @@ -1,9 +1,9 @@ -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(6,23): error TS1055: Type '{}' is not a valid async function return type. -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(7,23): error TS1055: Type 'any' is not a valid async function return type. -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(8,23): error TS1055: Type 'number' is not a valid async function return type. -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(9,23): error TS1055: Type 'PromiseLike' is not a valid async function return type. -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(10,23): error TS1055: Type 'typeof Thenable' is not a valid async function return type. -tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(10,23): error TS1055: Type 'typeof Thenable' is not a valid async function return type. +tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(6,23): error TS1055: Type '{}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. +tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(7,23): error TS1055: Type 'any' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. +tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(8,23): error TS1055: Type 'number' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. +tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(9,23): error TS1055: Type 'PromiseLike' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. +tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(10,23): error TS1055: Type 'typeof Thenable' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. +tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(10,23): error TS1055: Type 'typeof Thenable' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. Type 'Thenable' is not assignable to type 'PromiseLike'. Types of property 'then' are incompatible. Type '() => void' is not assignable to type '{ (onfulfilled?: (value: any) => any, onrejected?: (reason: any) => any): PromiseLike; (onfulfilled: (value: any) => any, onrejected: (reason: any) => TResult | PromiseLike): PromiseLike; (onfulfilled: (value: any) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike; (onfulfilled: (value: any) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): PromiseLike; }'. @@ -20,21 +20,21 @@ tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration1 async function fn1() { } // valid: Promise async function fn2(): { } { } // error ~~~ -!!! error TS1055: Type '{}' is not a valid async function return type. +!!! error TS1055: Type '{}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. async function fn3(): any { } // error ~~~ -!!! error TS1055: Type 'any' is not a valid async function return type. +!!! error TS1055: Type 'any' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. async function fn4(): number { } // error ~~~~~~ -!!! error TS1055: Type 'number' is not a valid async function return type. +!!! error TS1055: Type 'number' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. async function fn5(): PromiseLike { } // error ~~~~~~~~~~~~~~~~~ -!!! error TS1055: Type 'PromiseLike' is not a valid async function return type. +!!! error TS1055: Type 'PromiseLike' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. async function fn6(): Thenable { } // error ~~~~~~~~ -!!! error TS1055: Type 'typeof Thenable' is not a valid async function return type. +!!! error TS1055: Type 'typeof Thenable' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. ~~~~~~~~ -!!! error TS1055: Type 'typeof Thenable' is not a valid async function return type. +!!! error TS1055: Type 'typeof Thenable' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value. !!! error TS1055: Type 'Thenable' is not assignable to type 'PromiseLike'. !!! error TS1055: Types of property 'then' are incompatible. !!! error TS1055: Type '() => void' is not assignable to type '{ (onfulfilled?: (value: any) => any, onrejected?: (reason: any) => any): PromiseLike; (onfulfilled: (value: any) => any, onrejected: (reason: any) => TResult | PromiseLike): PromiseLike; (onfulfilled: (value: any) => TResult | PromiseLike, onrejected?: (reason: any) => TResult | PromiseLike): PromiseLike; (onfulfilled: (value: any) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): PromiseLike; }'. diff --git a/tests/baselines/reference/asyncIIFE.js b/tests/baselines/reference/asyncIIFE.js new file mode 100644 index 00000000000..79779af62f3 --- /dev/null +++ b/tests/baselines/reference/asyncIIFE.js @@ -0,0 +1,28 @@ +//// [asyncIIFE.ts] + +function f1() { + (async () => { + await 10 + throw new Error(); + })(); + + var x = 1; +} + + +//// [asyncIIFE.js] +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments)).next()); + }); +}; +function f1() { + (() => __awaiter(this, void 0, void 0, function* () { + yield 10; + throw new Error(); + }))(); + var x = 1; +} diff --git a/tests/baselines/reference/asyncIIFE.symbols b/tests/baselines/reference/asyncIIFE.symbols new file mode 100644 index 00000000000..92eb054bff0 --- /dev/null +++ b/tests/baselines/reference/asyncIIFE.symbols @@ -0,0 +1,16 @@ +=== tests/cases/compiler/asyncIIFE.ts === + +function f1() { +>f1 : Symbol(f1, Decl(asyncIIFE.ts, 0, 0)) + + (async () => { + await 10 + throw new Error(); +>Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + })(); + + var x = 1; +>x : Symbol(x, Decl(asyncIIFE.ts, 7, 7)) +} + diff --git a/tests/baselines/reference/asyncIIFE.types b/tests/baselines/reference/asyncIIFE.types new file mode 100644 index 00000000000..e49ab96681f --- /dev/null +++ b/tests/baselines/reference/asyncIIFE.types @@ -0,0 +1,25 @@ +=== tests/cases/compiler/asyncIIFE.ts === + +function f1() { +>f1 : () => void + + (async () => { +>(async () => { await 10 throw new Error(); })() : Promise +>(async () => { await 10 throw new Error(); }) : () => Promise +>async () => { await 10 throw new Error(); } : () => Promise + + await 10 +>await 10 : 10 +>10 : 10 + + throw new Error(); +>new Error() : Error +>Error : ErrorConstructor + + })(); + + var x = 1; +>x : number +>1 : 1 +} + diff --git a/tests/baselines/reference/capturedLetConstInLoop4.js b/tests/baselines/reference/capturedLetConstInLoop4.js index e3587ad64c6..2cade08f0a6 100644 --- a/tests/baselines/reference/capturedLetConstInLoop4.js +++ b/tests/baselines/reference/capturedLetConstInLoop4.js @@ -151,13 +151,13 @@ System.register([], function (exports_1, context_1) { function exportedFoo() { return v0 + v00 + v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8; } + exports_1("exportedFoo", exportedFoo); //======const function exportedFoo2() { return v0_c + v00_c + v1_c + v2_c + v3_c + v4_c + v5_c + v6_c + v7_c + v8_c; } - var v0, v00, v1, v2, v3, v4, v5, v6, v7, v8, v0_c, v00_c, v1_c, v2_c, v3_c, v4_c, v5_c, v6_c, v7_c, v8_c; - exports_1("exportedFoo", exportedFoo); exports_1("exportedFoo2", exportedFoo2); + var v0, v00, v1, v2, v3, v4, v5, v6, v7, v8, v0_c, v00_c, v1_c, v2_c, v3_c, v4_c, v5_c, v6_c, v7_c, v8_c; return { setters: [], execute: function () { diff --git a/tests/baselines/reference/catchClauseWithBindingPattern1.errors.txt b/tests/baselines/reference/catchClauseWithBindingPattern1.errors.txt deleted file mode 100644 index 0b7482850e5..00000000000 --- a/tests/baselines/reference/catchClauseWithBindingPattern1.errors.txt +++ /dev/null @@ -1,10 +0,0 @@ -tests/cases/compiler/catchClauseWithBindingPattern1.ts(3,8): error TS1195: Catch clause variable name must be an identifier. - - -==== tests/cases/compiler/catchClauseWithBindingPattern1.ts (1 errors) ==== - try { - } - catch ({a}) { - ~ -!!! error TS1195: Catch clause variable name must be an identifier. - } \ No newline at end of file diff --git a/tests/baselines/reference/catchClauseWithBindingPattern1.js b/tests/baselines/reference/catchClauseWithBindingPattern1.js deleted file mode 100644 index bbdc259946c..00000000000 --- a/tests/baselines/reference/catchClauseWithBindingPattern1.js +++ /dev/null @@ -1,11 +0,0 @@ -//// [catchClauseWithBindingPattern1.ts] -try { -} -catch ({a}) { -} - -//// [catchClauseWithBindingPattern1.js] -try { -} -catch (a = (void 0).a) { -} diff --git a/tests/baselines/reference/collisionExportsRequireAndEnum.js b/tests/baselines/reference/collisionExportsRequireAndEnum.js index 3935ee312fb..47d127e8a67 100644 --- a/tests/baselines/reference/collisionExportsRequireAndEnum.js +++ b/tests/baselines/reference/collisionExportsRequireAndEnum.js @@ -63,16 +63,16 @@ module m4 { //// [collisionExportsRequireAndEnum_externalmodule.js] define(["require", "exports"], function (require, exports) { "use strict"; + var require; (function (require) { require[require["_thisVal1"] = 0] = "_thisVal1"; require[require["_thisVal2"] = 1] = "_thisVal2"; - })(exports.require || (exports.require = {})); - var require = exports.require; + })(require = exports.require || (exports.require = {})); + var exports; (function (exports) { exports[exports["_thisVal1"] = 0] = "_thisVal1"; exports[exports["_thisVal2"] = 1] = "_thisVal2"; - })(exports.exports || (exports.exports = {})); - var exports = exports.exports; + })(exports = exports.exports || (exports.exports = {})); var m1; (function (m1) { var require; @@ -88,16 +88,16 @@ define(["require", "exports"], function (require, exports) { })(m1 || (m1 = {})); var m2; (function (m2) { + var require; (function (require) { require[require["_thisVal1"] = 0] = "_thisVal1"; require[require["_thisVal2"] = 1] = "_thisVal2"; - })(m2.require || (m2.require = {})); - var require = m2.require; + })(require = m2.require || (m2.require = {})); + var exports; (function (exports) { exports[exports["_thisVal1"] = 0] = "_thisVal1"; exports[exports["_thisVal2"] = 1] = "_thisVal2"; - })(m2.exports || (m2.exports = {})); - var exports = m2.exports; + })(exports = m2.exports || (m2.exports = {})); })(m2 || (m2 = {})); }); //// [collisionExportsRequireAndEnum_globalFile.js] @@ -126,14 +126,14 @@ var m3; })(m3 || (m3 = {})); var m4; (function (m4) { + var require; (function (require) { require[require["_thisVal1"] = 0] = "_thisVal1"; require[require["_thisVal2"] = 1] = "_thisVal2"; - })(m4.require || (m4.require = {})); - var require = m4.require; + })(require = m4.require || (m4.require = {})); + var exports; (function (exports) { exports[exports["_thisVal1"] = 0] = "_thisVal1"; exports[exports["_thisVal2"] = 1] = "_thisVal2"; - })(m4.exports || (m4.exports = {})); - var exports = m4.exports; + })(exports = m4.exports || (m4.exports = {})); })(m4 || (m4 = {})); diff --git a/tests/baselines/reference/commentOnExportEnumDeclaration.js b/tests/baselines/reference/commentOnExportEnumDeclaration.js index 6ded51456d8..61307b95b1c 100644 --- a/tests/baselines/reference/commentOnExportEnumDeclaration.js +++ b/tests/baselines/reference/commentOnExportEnumDeclaration.js @@ -11,9 +11,9 @@ export enum Color { /** * comment */ +var Color; (function (Color) { Color[Color["r"] = 0] = "r"; Color[Color["g"] = 1] = "g"; Color[Color["b"] = 2] = "b"; -})(exports.Color || (exports.Color = {})); -var Color = exports.Color; +})(Color = exports.Color || (exports.Color = {})); diff --git a/tests/baselines/reference/commonJSImportAsPrimaryExpression.js b/tests/baselines/reference/commonJSImportAsPrimaryExpression.js index d22b5b2855b..b8cf42ea762 100644 --- a/tests/baselines/reference/commonJSImportAsPrimaryExpression.js +++ b/tests/baselines/reference/commonJSImportAsPrimaryExpression.js @@ -21,8 +21,8 @@ var C1 = (function () { } return C1; }()); -exports.C1 = C1; C1.s1 = true; +exports.C1 = C1; //// [foo_1.js] "use strict"; var foo = require("./foo_0"); diff --git a/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js b/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js index e7496f3445f..eb77d1baa3c 100644 --- a/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js +++ b/tests/baselines/reference/commonJSImportNotAsPrimaryExpression.js @@ -39,14 +39,14 @@ var C1 = (function () { } return C1; }()); -exports.C1 = C1; C1.s1 = true; +exports.C1 = C1; +var E1; (function (E1) { E1[E1["A"] = 0] = "A"; E1[E1["B"] = 1] = "B"; E1[E1["C"] = 2] = "C"; -})(exports.E1 || (exports.E1 = {})); -var E1 = exports.E1; +})(E1 = exports.E1 || (exports.E1 = {})); //// [foo_1.js] "use strict"; var i; diff --git a/tests/baselines/reference/constructorWithCapturedSuper.js b/tests/baselines/reference/constructorWithCapturedSuper.js new file mode 100644 index 00000000000..895f78eb04b --- /dev/null +++ b/tests/baselines/reference/constructorWithCapturedSuper.js @@ -0,0 +1,123 @@ +//// [constructorWithCapturedSuper.ts] +let oneA: A; + +class A { + constructor() { + return oneA; + } +} + +class B extends A { + constructor(x: number) { + super(); + if (x === 1) { + return; + } + while (x < 2) { + return; + } + try { + return + } + catch (e) { + return; + } + finally { + return; + } + } +} + +class C extends A { + constructor(x: number) { + super(); + for (let i = 0; i < 10; ++i) { + () => i + x; + if (x === 1) { + return; + } + } + } +} + +class D extends A { + constructor(x: number) { + super(); + () => { + return; + } + function foo() { + return; + } + } +} + +//// [constructorWithCapturedSuper.js] +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var oneA; +var A = (function () { + function A() { + return oneA; + } + return A; +}()); +var B = (function (_super) { + __extends(B, _super); + function B(x) { + var _this = _super.call(this) || this; + if (x === 1) { + return _this; + } + while (x < 2) { + return _this; + } + try { + return _this; + } + catch (e) { + return _this; + } + finally { + return _this; + } + return _this; + } + return B; +}(A)); +var C = (function (_super) { + __extends(C, _super); + function C(x) { + var _this = _super.call(this) || this; + var _loop_1 = function (i) { + (function () { return i + x; }); + if (x === 1) { + return { value: _this }; + } + }; + for (var i = 0; i < 10; ++i) { + var state_1 = _loop_1(i); + if (typeof state_1 === "object") + return state_1.value; + } + return _this; + } + return C; +}(A)); +var D = (function (_super) { + __extends(D, _super); + function D(x) { + var _this = _super.call(this) || this; + (function () { + return; + }); + function foo() { + return; + } + return _this; + } + return D; +}(A)); diff --git a/tests/baselines/reference/constructorWithCapturedSuper.symbols b/tests/baselines/reference/constructorWithCapturedSuper.symbols new file mode 100644 index 00000000000..1743ee61612 --- /dev/null +++ b/tests/baselines/reference/constructorWithCapturedSuper.symbols @@ -0,0 +1,96 @@ +=== tests/cases/compiler/constructorWithCapturedSuper.ts === +let oneA: A; +>oneA : Symbol(oneA, Decl(constructorWithCapturedSuper.ts, 0, 3)) +>A : Symbol(A, Decl(constructorWithCapturedSuper.ts, 0, 12)) + +class A { +>A : Symbol(A, Decl(constructorWithCapturedSuper.ts, 0, 12)) + + constructor() { + return oneA; +>oneA : Symbol(oneA, Decl(constructorWithCapturedSuper.ts, 0, 3)) + } +} + +class B extends A { +>B : Symbol(B, Decl(constructorWithCapturedSuper.ts, 6, 1)) +>A : Symbol(A, Decl(constructorWithCapturedSuper.ts, 0, 12)) + + constructor(x: number) { +>x : Symbol(x, Decl(constructorWithCapturedSuper.ts, 9, 16)) + + super(); +>super : Symbol(A, Decl(constructorWithCapturedSuper.ts, 0, 12)) + + if (x === 1) { +>x : Symbol(x, Decl(constructorWithCapturedSuper.ts, 9, 16)) + + return; + } + while (x < 2) { +>x : Symbol(x, Decl(constructorWithCapturedSuper.ts, 9, 16)) + + return; + } + try { + return + } + catch (e) { +>e : Symbol(e, Decl(constructorWithCapturedSuper.ts, 20, 15)) + + return; + } + finally { + return; + } + } +} + +class C extends A { +>C : Symbol(C, Decl(constructorWithCapturedSuper.ts, 27, 1)) +>A : Symbol(A, Decl(constructorWithCapturedSuper.ts, 0, 12)) + + constructor(x: number) { +>x : Symbol(x, Decl(constructorWithCapturedSuper.ts, 30, 16)) + + super(); +>super : Symbol(A, Decl(constructorWithCapturedSuper.ts, 0, 12)) + + for (let i = 0; i < 10; ++i) { +>i : Symbol(i, Decl(constructorWithCapturedSuper.ts, 32, 16)) +>i : Symbol(i, Decl(constructorWithCapturedSuper.ts, 32, 16)) +>i : Symbol(i, Decl(constructorWithCapturedSuper.ts, 32, 16)) + + () => i + x; +>i : Symbol(i, Decl(constructorWithCapturedSuper.ts, 32, 16)) +>x : Symbol(x, Decl(constructorWithCapturedSuper.ts, 30, 16)) + + if (x === 1) { +>x : Symbol(x, Decl(constructorWithCapturedSuper.ts, 30, 16)) + + return; + } + } + } +} + +class D extends A { +>D : Symbol(D, Decl(constructorWithCapturedSuper.ts, 39, 1)) +>A : Symbol(A, Decl(constructorWithCapturedSuper.ts, 0, 12)) + + constructor(x: number) { +>x : Symbol(x, Decl(constructorWithCapturedSuper.ts, 42, 16)) + + super(); +>super : Symbol(A, Decl(constructorWithCapturedSuper.ts, 0, 12)) + + () => { + return; + } + function foo() { +>foo : Symbol(foo, Decl(constructorWithCapturedSuper.ts, 46, 9)) + + return; + } + } +} diff --git a/tests/baselines/reference/constructorWithCapturedSuper.types b/tests/baselines/reference/constructorWithCapturedSuper.types new file mode 100644 index 00000000000..13696029d53 --- /dev/null +++ b/tests/baselines/reference/constructorWithCapturedSuper.types @@ -0,0 +1,113 @@ +=== tests/cases/compiler/constructorWithCapturedSuper.ts === +let oneA: A; +>oneA : A +>A : A + +class A { +>A : A + + constructor() { + return oneA; +>oneA : A + } +} + +class B extends A { +>B : B +>A : A + + constructor(x: number) { +>x : number + + super(); +>super() : void +>super : typeof A + + if (x === 1) { +>x === 1 : boolean +>x : number +>1 : 1 + + return; + } + while (x < 2) { +>x < 2 : boolean +>x : number +>2 : 2 + + return; + } + try { + return + } + catch (e) { +>e : any + + return; + } + finally { + return; + } + } +} + +class C extends A { +>C : C +>A : A + + constructor(x: number) { +>x : number + + super(); +>super() : void +>super : typeof A + + for (let i = 0; i < 10; ++i) { +>i : number +>0 : 0 +>i < 10 : boolean +>i : number +>10 : 10 +>++i : number +>i : number + + () => i + x; +>() => i + x : () => number +>i + x : number +>i : number +>x : number + + if (x === 1) { +>x === 1 : boolean +>x : number +>1 : 1 + + return; + } + } + } +} + +class D extends A { +>D : D +>A : A + + constructor(x: number) { +>x : number + + super(); +>super() : void +>super : typeof A + + () => { +>() => { return; } : () => void + + return; + } + function foo() { +>foo : () => void + + return; + } + } +} diff --git a/tests/baselines/reference/contextualTypingOfTooShortOverloads.js b/tests/baselines/reference/contextualTypingOfTooShortOverloads.js new file mode 100644 index 00000000000..55f1361f5a8 --- /dev/null +++ b/tests/baselines/reference/contextualTypingOfTooShortOverloads.js @@ -0,0 +1,59 @@ +//// [contextualTypingOfTooShortOverloads.ts] +// small repro from #11875 +var use: Overload; +use((req, res) => {}); + +interface Overload { + (handler1: (req1: string) => void): void; + (handler2: (req2: number, res2: number) => void): void; +} +// larger repro from #11875 +let app: MyApp; +app.use((err: any, req, res, next) => { return; }); + + +interface MyApp { + use: IRouterHandler & IRouterMatcher; +} + +interface IRouterHandler { + (...handlers: RequestHandler[]): T; + (...handlers: RequestHandlerParams[]): T; +} + +interface IRouterMatcher { + (path: PathParams, ...handlers: RequestHandler[]): T; + (path: PathParams, ...handlers: RequestHandlerParams[]): T; +} + +type PathParams = string | RegExp | (string | RegExp)[]; +type RequestHandlerParams = RequestHandler | ErrorRequestHandler | (RequestHandler | ErrorRequestHandler)[]; + +interface RequestHandler { + (req: Request, res: Response, next: NextFunction): any; +} + +interface ErrorRequestHandler { + (err: any, req: Request, res: Response, next: NextFunction): any; +} + +interface Request { + method: string; +} + +interface Response { + statusCode: number; +} + +interface NextFunction { + (err?: any): void; +} + + +//// [contextualTypingOfTooShortOverloads.js] +// small repro from #11875 +var use; +use(function (req, res) { }); +// larger repro from #11875 +var app; +app.use(function (err, req, res, next) { return; }); diff --git a/tests/baselines/reference/contextualTypingOfTooShortOverloads.symbols b/tests/baselines/reference/contextualTypingOfTooShortOverloads.symbols new file mode 100644 index 00000000000..8f196cf4825 --- /dev/null +++ b/tests/baselines/reference/contextualTypingOfTooShortOverloads.symbols @@ -0,0 +1,139 @@ +=== tests/cases/compiler/contextualTypingOfTooShortOverloads.ts === +// small repro from #11875 +var use: Overload; +>use : Symbol(use, Decl(contextualTypingOfTooShortOverloads.ts, 1, 3)) +>Overload : Symbol(Overload, Decl(contextualTypingOfTooShortOverloads.ts, 2, 22)) + +use((req, res) => {}); +>use : Symbol(use, Decl(contextualTypingOfTooShortOverloads.ts, 1, 3)) +>req : Symbol(req, Decl(contextualTypingOfTooShortOverloads.ts, 2, 5)) +>res : Symbol(res, Decl(contextualTypingOfTooShortOverloads.ts, 2, 9)) + +interface Overload { +>Overload : Symbol(Overload, Decl(contextualTypingOfTooShortOverloads.ts, 2, 22)) + + (handler1: (req1: string) => void): void; +>handler1 : Symbol(handler1, Decl(contextualTypingOfTooShortOverloads.ts, 5, 5)) +>req1 : Symbol(req1, Decl(contextualTypingOfTooShortOverloads.ts, 5, 16)) + + (handler2: (req2: number, res2: number) => void): void; +>handler2 : Symbol(handler2, Decl(contextualTypingOfTooShortOverloads.ts, 6, 5)) +>req2 : Symbol(req2, Decl(contextualTypingOfTooShortOverloads.ts, 6, 16)) +>res2 : Symbol(res2, Decl(contextualTypingOfTooShortOverloads.ts, 6, 29)) +} +// larger repro from #11875 +let app: MyApp; +>app : Symbol(app, Decl(contextualTypingOfTooShortOverloads.ts, 9, 3)) +>MyApp : Symbol(MyApp, Decl(contextualTypingOfTooShortOverloads.ts, 10, 51)) + +app.use((err: any, req, res, next) => { return; }); +>app.use : Symbol(MyApp.use, Decl(contextualTypingOfTooShortOverloads.ts, 13, 17)) +>app : Symbol(app, Decl(contextualTypingOfTooShortOverloads.ts, 9, 3)) +>use : Symbol(MyApp.use, Decl(contextualTypingOfTooShortOverloads.ts, 13, 17)) +>err : Symbol(err, Decl(contextualTypingOfTooShortOverloads.ts, 10, 9)) +>req : Symbol(req, Decl(contextualTypingOfTooShortOverloads.ts, 10, 18)) +>res : Symbol(res, Decl(contextualTypingOfTooShortOverloads.ts, 10, 23)) +>next : Symbol(next, Decl(contextualTypingOfTooShortOverloads.ts, 10, 28)) + + +interface MyApp { +>MyApp : Symbol(MyApp, Decl(contextualTypingOfTooShortOverloads.ts, 10, 51)) + + use: IRouterHandler & IRouterMatcher; +>use : Symbol(MyApp.use, Decl(contextualTypingOfTooShortOverloads.ts, 13, 17)) +>IRouterHandler : Symbol(IRouterHandler, Decl(contextualTypingOfTooShortOverloads.ts, 15, 1)) +>IRouterMatcher : Symbol(IRouterMatcher, Decl(contextualTypingOfTooShortOverloads.ts, 20, 1)) +} + +interface IRouterHandler { +>IRouterHandler : Symbol(IRouterHandler, Decl(contextualTypingOfTooShortOverloads.ts, 15, 1)) +>T : Symbol(T, Decl(contextualTypingOfTooShortOverloads.ts, 17, 25)) + + (...handlers: RequestHandler[]): T; +>handlers : Symbol(handlers, Decl(contextualTypingOfTooShortOverloads.ts, 18, 5)) +>RequestHandler : Symbol(RequestHandler, Decl(contextualTypingOfTooShortOverloads.ts, 28, 108)) +>T : Symbol(T, Decl(contextualTypingOfTooShortOverloads.ts, 17, 25)) + + (...handlers: RequestHandlerParams[]): T; +>handlers : Symbol(handlers, Decl(contextualTypingOfTooShortOverloads.ts, 19, 5)) +>RequestHandlerParams : Symbol(RequestHandlerParams, Decl(contextualTypingOfTooShortOverloads.ts, 27, 56)) +>T : Symbol(T, Decl(contextualTypingOfTooShortOverloads.ts, 17, 25)) +} + +interface IRouterMatcher { +>IRouterMatcher : Symbol(IRouterMatcher, Decl(contextualTypingOfTooShortOverloads.ts, 20, 1)) +>T : Symbol(T, Decl(contextualTypingOfTooShortOverloads.ts, 22, 25)) + + (path: PathParams, ...handlers: RequestHandler[]): T; +>path : Symbol(path, Decl(contextualTypingOfTooShortOverloads.ts, 23, 5)) +>PathParams : Symbol(PathParams, Decl(contextualTypingOfTooShortOverloads.ts, 25, 1)) +>handlers : Symbol(handlers, Decl(contextualTypingOfTooShortOverloads.ts, 23, 22)) +>RequestHandler : Symbol(RequestHandler, Decl(contextualTypingOfTooShortOverloads.ts, 28, 108)) +>T : Symbol(T, Decl(contextualTypingOfTooShortOverloads.ts, 22, 25)) + + (path: PathParams, ...handlers: RequestHandlerParams[]): T; +>path : Symbol(path, Decl(contextualTypingOfTooShortOverloads.ts, 24, 5)) +>PathParams : Symbol(PathParams, Decl(contextualTypingOfTooShortOverloads.ts, 25, 1)) +>handlers : Symbol(handlers, Decl(contextualTypingOfTooShortOverloads.ts, 24, 22)) +>RequestHandlerParams : Symbol(RequestHandlerParams, Decl(contextualTypingOfTooShortOverloads.ts, 27, 56)) +>T : Symbol(T, Decl(contextualTypingOfTooShortOverloads.ts, 22, 25)) +} + +type PathParams = string | RegExp | (string | RegExp)[]; +>PathParams : Symbol(PathParams, Decl(contextualTypingOfTooShortOverloads.ts, 25, 1)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) + +type RequestHandlerParams = RequestHandler | ErrorRequestHandler | (RequestHandler | ErrorRequestHandler)[]; +>RequestHandlerParams : Symbol(RequestHandlerParams, Decl(contextualTypingOfTooShortOverloads.ts, 27, 56)) +>RequestHandler : Symbol(RequestHandler, Decl(contextualTypingOfTooShortOverloads.ts, 28, 108)) +>ErrorRequestHandler : Symbol(ErrorRequestHandler, Decl(contextualTypingOfTooShortOverloads.ts, 32, 1)) +>RequestHandler : Symbol(RequestHandler, Decl(contextualTypingOfTooShortOverloads.ts, 28, 108)) +>ErrorRequestHandler : Symbol(ErrorRequestHandler, Decl(contextualTypingOfTooShortOverloads.ts, 32, 1)) + +interface RequestHandler { +>RequestHandler : Symbol(RequestHandler, Decl(contextualTypingOfTooShortOverloads.ts, 28, 108)) + + (req: Request, res: Response, next: NextFunction): any; +>req : Symbol(req, Decl(contextualTypingOfTooShortOverloads.ts, 31, 5)) +>Request : Symbol(Request, Decl(contextualTypingOfTooShortOverloads.ts, 36, 1)) +>res : Symbol(res, Decl(contextualTypingOfTooShortOverloads.ts, 31, 18)) +>Response : Symbol(Response, Decl(contextualTypingOfTooShortOverloads.ts, 40, 1)) +>next : Symbol(next, Decl(contextualTypingOfTooShortOverloads.ts, 31, 33)) +>NextFunction : Symbol(NextFunction, Decl(contextualTypingOfTooShortOverloads.ts, 44, 1)) +} + +interface ErrorRequestHandler { +>ErrorRequestHandler : Symbol(ErrorRequestHandler, Decl(contextualTypingOfTooShortOverloads.ts, 32, 1)) + + (err: any, req: Request, res: Response, next: NextFunction): any; +>err : Symbol(err, Decl(contextualTypingOfTooShortOverloads.ts, 35, 5)) +>req : Symbol(req, Decl(contextualTypingOfTooShortOverloads.ts, 35, 14)) +>Request : Symbol(Request, Decl(contextualTypingOfTooShortOverloads.ts, 36, 1)) +>res : Symbol(res, Decl(contextualTypingOfTooShortOverloads.ts, 35, 28)) +>Response : Symbol(Response, Decl(contextualTypingOfTooShortOverloads.ts, 40, 1)) +>next : Symbol(next, Decl(contextualTypingOfTooShortOverloads.ts, 35, 43)) +>NextFunction : Symbol(NextFunction, Decl(contextualTypingOfTooShortOverloads.ts, 44, 1)) +} + +interface Request { +>Request : Symbol(Request, Decl(contextualTypingOfTooShortOverloads.ts, 36, 1)) + + method: string; +>method : Symbol(Request.method, Decl(contextualTypingOfTooShortOverloads.ts, 38, 19)) +} + +interface Response { +>Response : Symbol(Response, Decl(contextualTypingOfTooShortOverloads.ts, 40, 1)) + + statusCode: number; +>statusCode : Symbol(Response.statusCode, Decl(contextualTypingOfTooShortOverloads.ts, 42, 20)) +} + +interface NextFunction { +>NextFunction : Symbol(NextFunction, Decl(contextualTypingOfTooShortOverloads.ts, 44, 1)) + + (err?: any): void; +>err : Symbol(err, Decl(contextualTypingOfTooShortOverloads.ts, 47, 5)) +} + diff --git a/tests/baselines/reference/contextualTypingOfTooShortOverloads.types b/tests/baselines/reference/contextualTypingOfTooShortOverloads.types new file mode 100644 index 00000000000..769bd55d4b5 --- /dev/null +++ b/tests/baselines/reference/contextualTypingOfTooShortOverloads.types @@ -0,0 +1,143 @@ +=== tests/cases/compiler/contextualTypingOfTooShortOverloads.ts === +// small repro from #11875 +var use: Overload; +>use : Overload +>Overload : Overload + +use((req, res) => {}); +>use((req, res) => {}) : void +>use : Overload +>(req, res) => {} : (req: any, res: any) => void +>req : any +>res : any + +interface Overload { +>Overload : Overload + + (handler1: (req1: string) => void): void; +>handler1 : (req1: string) => void +>req1 : string + + (handler2: (req2: number, res2: number) => void): void; +>handler2 : (req2: number, res2: number) => void +>req2 : number +>res2 : number +} +// larger repro from #11875 +let app: MyApp; +>app : MyApp +>MyApp : MyApp + +app.use((err: any, req, res, next) => { return; }); +>app.use((err: any, req, res, next) => { return; }) : MyApp +>app.use : IRouterHandler & IRouterMatcher +>app : MyApp +>use : IRouterHandler & IRouterMatcher +>(err: any, req, res, next) => { return; } : (err: any, req: any, res: any, next: any) => void +>err : any +>req : any +>res : any +>next : any + + +interface MyApp { +>MyApp : MyApp + + use: IRouterHandler & IRouterMatcher; +>use : IRouterHandler & IRouterMatcher +>IRouterHandler : IRouterHandler +>IRouterMatcher : IRouterMatcher +} + +interface IRouterHandler { +>IRouterHandler : IRouterHandler +>T : T + + (...handlers: RequestHandler[]): T; +>handlers : RequestHandler[] +>RequestHandler : RequestHandler +>T : T + + (...handlers: RequestHandlerParams[]): T; +>handlers : RequestHandlerParams[] +>RequestHandlerParams : RequestHandlerParams +>T : T +} + +interface IRouterMatcher { +>IRouterMatcher : IRouterMatcher +>T : T + + (path: PathParams, ...handlers: RequestHandler[]): T; +>path : PathParams +>PathParams : PathParams +>handlers : RequestHandler[] +>RequestHandler : RequestHandler +>T : T + + (path: PathParams, ...handlers: RequestHandlerParams[]): T; +>path : PathParams +>PathParams : PathParams +>handlers : RequestHandlerParams[] +>RequestHandlerParams : RequestHandlerParams +>T : T +} + +type PathParams = string | RegExp | (string | RegExp)[]; +>PathParams : PathParams +>RegExp : RegExp +>RegExp : RegExp + +type RequestHandlerParams = RequestHandler | ErrorRequestHandler | (RequestHandler | ErrorRequestHandler)[]; +>RequestHandlerParams : RequestHandlerParams +>RequestHandler : RequestHandler +>ErrorRequestHandler : ErrorRequestHandler +>RequestHandler : RequestHandler +>ErrorRequestHandler : ErrorRequestHandler + +interface RequestHandler { +>RequestHandler : RequestHandler + + (req: Request, res: Response, next: NextFunction): any; +>req : Request +>Request : Request +>res : Response +>Response : Response +>next : NextFunction +>NextFunction : NextFunction +} + +interface ErrorRequestHandler { +>ErrorRequestHandler : ErrorRequestHandler + + (err: any, req: Request, res: Response, next: NextFunction): any; +>err : any +>req : Request +>Request : Request +>res : Response +>Response : Response +>next : NextFunction +>NextFunction : NextFunction +} + +interface Request { +>Request : Request + + method: string; +>method : string +} + +interface Response { +>Response : Response + + statusCode: number; +>statusCode : number +} + +interface NextFunction { +>NextFunction : NextFunction + + (err?: any): void; +>err : any +} + diff --git a/tests/baselines/reference/declFileTypeofInAnonymousType.js b/tests/baselines/reference/declFileTypeofInAnonymousType.js index 68db3d120cd..656cd49ebfa 100644 --- a/tests/baselines/reference/declFileTypeofInAnonymousType.js +++ b/tests/baselines/reference/declFileTypeofInAnonymousType.js @@ -31,12 +31,12 @@ var m1; return c; }()); m1.c = c; + var e; (function (e) { e[e["weekday"] = 0] = "weekday"; e[e["weekend"] = 1] = "weekend"; e[e["holiday"] = 2] = "holiday"; - })(m1.e || (m1.e = {})); - var e = m1.e; + })(e = m1.e || (m1.e = {})); })(m1 || (m1 = {})); var a; var b = { diff --git a/tests/baselines/reference/declarationEmitNameConflicts2.js b/tests/baselines/reference/declarationEmitNameConflicts2.js index 41dcec4690f..05529fbf5be 100644 --- a/tests/baselines/reference/declarationEmitNameConflicts2.js +++ b/tests/baselines/reference/declarationEmitNameConflicts2.js @@ -33,9 +33,9 @@ var X; var M; (function (M) { })(M = base.M || (base.M = {})); + var E; (function (E) { - })(base.E || (base.E = {})); - var E = base.E; + })(E = base.E || (base.E = {})); })(base = Y.base || (Y.base = {})); })(Y = X.Y || (X.Y = {})); })(X || (X = {})); diff --git a/tests/baselines/reference/declarationEmitNameConflicts3.js b/tests/baselines/reference/declarationEmitNameConflicts3.js index b0a87e64483..ffcfead83bf 100644 --- a/tests/baselines/reference/declarationEmitNameConflicts3.js +++ b/tests/baselines/reference/declarationEmitNameConflicts3.js @@ -68,10 +68,10 @@ var M; return E; }(C)); P.E = E; + var D; (function (D) { D[D["f"] = 0] = "f"; - })(P.D || (P.D = {})); - var D = P.D; + })(D = P.D || (P.D = {})); P.w = M.D.f; // error, should be typeof M.D.f P.x = M.C.f; // error, should be typeof M.C.f P.x = M.E.f; // error, should be typeof M.E.f diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences1.js b/tests/baselines/reference/declarationFilesWithTypeReferences1.js new file mode 100644 index 00000000000..b4695f28f13 --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences1.js @@ -0,0 +1,22 @@ +//// [tests/cases/compiler/declarationFilesWithTypeReferences1.ts] //// + +//// [index.d.ts] + +interface Error { + stack2: string; +} + +//// [app.ts] + +function foo(): Error { + return undefined; +} + +//// [app.js] +function foo() { + return undefined; +} + + +//// [app.d.ts] +declare function foo(): Error; diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences1.symbols b/tests/baselines/reference/declarationFilesWithTypeReferences1.symbols new file mode 100644 index 00000000000..3d3df3c1622 --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences1.symbols @@ -0,0 +1,18 @@ +=== /node_modules/@types/node/index.d.ts === + +interface Error { +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(index.d.ts, 0, 0)) + + stack2: string; +>stack2 : Symbol(Error.stack2, Decl(index.d.ts, 1, 17)) +} + +=== /app.ts === + +function foo(): Error { +>foo : Symbol(foo, Decl(app.ts, 0, 0)) +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(index.d.ts, 0, 0)) + + return undefined; +>undefined : Symbol(undefined) +} diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences1.types b/tests/baselines/reference/declarationFilesWithTypeReferences1.types new file mode 100644 index 00000000000..7837b7b3a6c --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences1.types @@ -0,0 +1,18 @@ +=== /node_modules/@types/node/index.d.ts === + +interface Error { +>Error : Error + + stack2: string; +>stack2 : string +} + +=== /app.ts === + +function foo(): Error { +>foo : () => Error +>Error : Error + + return undefined; +>undefined : undefined +} diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences2.js b/tests/baselines/reference/declarationFilesWithTypeReferences2.js new file mode 100644 index 00000000000..b85dcc45107 --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences2.js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/declarationFilesWithTypeReferences2.ts] //// + +//// [index.d.ts] + +interface Error2 { + stack2: string; +} + +//// [app.ts] + +function foo(): Error2 { + return undefined; +} + +//// [app.js] +function foo() { + return undefined; +} + + +//// [app.d.ts] +/// +declare function foo(): Error2; diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences2.symbols b/tests/baselines/reference/declarationFilesWithTypeReferences2.symbols new file mode 100644 index 00000000000..dc6d8a3a6de --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences2.symbols @@ -0,0 +1,18 @@ +=== /node_modules/@types/node/index.d.ts === + +interface Error2 { +>Error2 : Symbol(Error2, Decl(index.d.ts, 0, 0)) + + stack2: string; +>stack2 : Symbol(Error2.stack2, Decl(index.d.ts, 1, 18)) +} + +=== /app.ts === + +function foo(): Error2 { +>foo : Symbol(foo, Decl(app.ts, 0, 0)) +>Error2 : Symbol(Error2, Decl(index.d.ts, 0, 0)) + + return undefined; +>undefined : Symbol(undefined) +} diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences2.types b/tests/baselines/reference/declarationFilesWithTypeReferences2.types new file mode 100644 index 00000000000..c56f4ba6a67 --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences2.types @@ -0,0 +1,18 @@ +=== /node_modules/@types/node/index.d.ts === + +interface Error2 { +>Error2 : Error2 + + stack2: string; +>stack2 : string +} + +=== /app.ts === + +function foo(): Error2 { +>foo : () => Error2 +>Error2 : Error2 + + return undefined; +>undefined : undefined +} diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences3.js b/tests/baselines/reference/declarationFilesWithTypeReferences3.js new file mode 100644 index 00000000000..3a18859c610 --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences3.js @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/declarationFilesWithTypeReferences3.ts] //// + +//// [index.d.ts] + +interface Error2 { + stack2: string; +} + +//// [app.ts] +/// +function foo(): Error2 { + return undefined; +} + +//// [app.js] +/// +function foo() { + return undefined; +} + + +//// [app.d.ts] +/// +declare function foo(): Error2; diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences3.symbols b/tests/baselines/reference/declarationFilesWithTypeReferences3.symbols new file mode 100644 index 00000000000..78335f988e9 --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences3.symbols @@ -0,0 +1,18 @@ +=== /a/node_modules/@types/node/index.d.ts === + +interface Error2 { +>Error2 : Symbol(Error2, Decl(index.d.ts, 0, 0)) + + stack2: string; +>stack2 : Symbol(Error2.stack2, Decl(index.d.ts, 1, 18)) +} + +=== /a/app.ts === +/// +function foo(): Error2 { +>foo : Symbol(foo, Decl(app.ts, 0, 0)) +>Error2 : Symbol(Error2, Decl(index.d.ts, 0, 0)) + + return undefined; +>undefined : Symbol(undefined) +} diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences3.types b/tests/baselines/reference/declarationFilesWithTypeReferences3.types new file mode 100644 index 00000000000..9ac0105890a --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences3.types @@ -0,0 +1,18 @@ +=== /a/node_modules/@types/node/index.d.ts === + +interface Error2 { +>Error2 : Error2 + + stack2: string; +>stack2 : string +} + +=== /a/app.ts === +/// +function foo(): Error2 { +>foo : () => Error2 +>Error2 : Error2 + + return undefined; +>undefined : undefined +} diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences4.js b/tests/baselines/reference/declarationFilesWithTypeReferences4.js new file mode 100644 index 00000000000..b45860be9bb --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences4.js @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/declarationFilesWithTypeReferences4.ts] //// + +//// [index.d.ts] + +interface Error { + stack2: string; +} + +//// [app.ts] +/// +function foo(): Error { + return undefined; +} + +//// [app.js] +/// +function foo() { + return undefined; +} + + +//// [app.d.ts] +declare function foo(): Error; diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences4.symbols b/tests/baselines/reference/declarationFilesWithTypeReferences4.symbols new file mode 100644 index 00000000000..216bd2a6a1c --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences4.symbols @@ -0,0 +1,18 @@ +=== /a/node_modules/@types/node/index.d.ts === + +interface Error { +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(index.d.ts, 0, 0)) + + stack2: string; +>stack2 : Symbol(Error.stack2, Decl(index.d.ts, 1, 17)) +} + +=== /a/app.ts === +/// +function foo(): Error { +>foo : Symbol(foo, Decl(app.ts, 0, 0)) +>Error : Symbol(Error, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(index.d.ts, 0, 0)) + + return undefined; +>undefined : Symbol(undefined) +} diff --git a/tests/baselines/reference/declarationFilesWithTypeReferences4.types b/tests/baselines/reference/declarationFilesWithTypeReferences4.types new file mode 100644 index 00000000000..0ae603716b1 --- /dev/null +++ b/tests/baselines/reference/declarationFilesWithTypeReferences4.types @@ -0,0 +1,18 @@ +=== /a/node_modules/@types/node/index.d.ts === + +interface Error { +>Error : Error + + stack2: string; +>stack2 : string +} + +=== /a/app.ts === +/// +function foo(): Error { +>foo : () => Error +>Error : Error + + return undefined; +>undefined : undefined +} diff --git a/tests/baselines/reference/decoratedClassExportsCommonJS1.js b/tests/baselines/reference/decoratedClassExportsCommonJS1.js index 9674d7853d5..2b20c7ec168 100644 --- a/tests/baselines/reference/decoratedClassExportsCommonJS1.js +++ b/tests/baselines/reference/decoratedClassExportsCommonJS1.js @@ -17,12 +17,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; -let Testing123_1 = class Testing123 { +let Testing123 = Testing123_1 = class Testing123 { }; -let Testing123 = Testing123_1; Testing123.prop1 = Testing123_1.prop0; Testing123 = Testing123_1 = __decorate([ Something({ v: () => Testing123_1 }), __metadata("design:paramtypes", []) ], Testing123); exports.Testing123 = Testing123; +var Testing123_1; diff --git a/tests/baselines/reference/decoratedClassExportsCommonJS2.js b/tests/baselines/reference/decoratedClassExportsCommonJS2.js index 3ca6fa2d70e..9e8b8693109 100644 --- a/tests/baselines/reference/decoratedClassExportsCommonJS2.js +++ b/tests/baselines/reference/decoratedClassExportsCommonJS2.js @@ -16,11 +16,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; -let Testing123_1 = class Testing123 { +let Testing123 = Testing123_1 = class Testing123 { }; -let Testing123 = Testing123_1; Testing123 = Testing123_1 = __decorate([ Something({ v: () => Testing123_1 }), __metadata("design:paramtypes", []) ], Testing123); exports.Testing123 = Testing123; +var Testing123_1; diff --git a/tests/baselines/reference/decoratedClassExportsSystem1.js b/tests/baselines/reference/decoratedClassExportsSystem1.js index 43a4421642e..6f7fcbd144a 100644 --- a/tests/baselines/reference/decoratedClassExportsSystem1.js +++ b/tests/baselines/reference/decoratedClassExportsSystem1.js @@ -21,13 +21,12 @@ System.register([], function (exports_1, context_1) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var __moduleName = context_1 && context_1.id; - var Testing123_1, Testing123; + var Testing123, Testing123_1; return { setters: [], execute: function () { - Testing123_1 = class Testing123 { + Testing123 = Testing123_1 = class Testing123 { }; - Testing123 = Testing123_1; Testing123.prop1 = Testing123_1.prop0; Testing123 = Testing123_1 = __decorate([ Something({ v: () => Testing123_1 }), diff --git a/tests/baselines/reference/decoratedClassExportsSystem2.js b/tests/baselines/reference/decoratedClassExportsSystem2.js index cbb592539cf..2a1a394a1f3 100644 --- a/tests/baselines/reference/decoratedClassExportsSystem2.js +++ b/tests/baselines/reference/decoratedClassExportsSystem2.js @@ -18,13 +18,12 @@ System.register([], function (exports_1, context_1) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var __moduleName = context_1 && context_1.id; - var Testing123_1, Testing123; + var Testing123, Testing123_1; return { setters: [], execute: function () { - Testing123_1 = class Testing123 { + Testing123 = Testing123_1 = class Testing123 { }; - Testing123 = Testing123_1; Testing123 = Testing123_1 = __decorate([ Something({ v: () => Testing123_1 }), __metadata("design:paramtypes", []) diff --git a/tests/baselines/reference/decoratorMetadataOnInferredType.js b/tests/baselines/reference/decoratorMetadataOnInferredType.js index 0c63bcf49da..43cdaa79ab8 100644 --- a/tests/baselines/reference/decoratorMetadataOnInferredType.js +++ b/tests/baselines/reference/decoratorMetadataOnInferredType.js @@ -33,8 +33,8 @@ var B = (function () { } return B; }()); -exports.B = B; __decorate([ decorator, __metadata("design:type", Object) ], B.prototype, "x", void 0); +exports.B = B; diff --git a/tests/baselines/reference/decoratorMetadataWithConstructorType.js b/tests/baselines/reference/decoratorMetadataWithConstructorType.js index 49b72e39a09..2c14c9b5bda 100644 --- a/tests/baselines/reference/decoratorMetadataWithConstructorType.js +++ b/tests/baselines/reference/decoratorMetadataWithConstructorType.js @@ -33,8 +33,8 @@ var B = (function () { } return B; }()); -exports.B = B; __decorate([ decorator, __metadata("design:type", A) ], B.prototype, "x", void 0); +exports.B = B; diff --git a/tests/baselines/reference/decoratorOnClass5.es6.js b/tests/baselines/reference/decoratorOnClass5.es6.js index e34740d6517..426a93668e7 100644 --- a/tests/baselines/reference/decoratorOnClass5.es6.js +++ b/tests/baselines/reference/decoratorOnClass5.es6.js @@ -16,12 +16,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; -let C_1 = class C { +let C = C_1 = class C { static x() { return C_1.y; } }; -let C = C_1; C.y = 1; C = C_1 = __decorate([ dec ], C); let c = new C(); +var C_1; diff --git a/tests/baselines/reference/decoratorOnClass6.es6.js b/tests/baselines/reference/decoratorOnClass6.es6.js index fff39d85916..7da4a20bb93 100644 --- a/tests/baselines/reference/decoratorOnClass6.es6.js +++ b/tests/baselines/reference/decoratorOnClass6.es6.js @@ -16,13 +16,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; -let C_1 = class C { +let C = C_1 = class C { static x() { return C_1.y; } }; -let C = C_1; C.y = 1; C = C_1 = __decorate([ dec ], C); export { C }; let c = new C(); +var C_1; diff --git a/tests/baselines/reference/decoratorOnClass7.es6.js b/tests/baselines/reference/decoratorOnClass7.es6.js index 7f111ea4abf..92ee02c899e 100644 --- a/tests/baselines/reference/decoratorOnClass7.es6.js +++ b/tests/baselines/reference/decoratorOnClass7.es6.js @@ -16,13 +16,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; -let C_1 = class C { +let C = C_1 = class C { static x() { return C_1.y; } }; -let C = C_1; C.y = 1; C = C_1 = __decorate([ dec ], C); export default C; let c = new C(); +var C_1; diff --git a/tests/baselines/reference/defaultExportsCannotMerge02.js b/tests/baselines/reference/defaultExportsCannotMerge02.js index ae5701b86bc..f327c62e571 100644 --- a/tests/baselines/reference/defaultExportsCannotMerge02.js +++ b/tests/baselines/reference/defaultExportsCannotMerge02.js @@ -33,7 +33,7 @@ var Decl = (function () { return Decl; }()); Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = exports.Decl; +exports.default = Decl; //// [m2.js] "use strict"; var m1_1 = require("m1"); diff --git a/tests/baselines/reference/defaultExportsCannotMerge04.js b/tests/baselines/reference/defaultExportsCannotMerge04.js index ef8d6853d98..7c9bd88bc16 100644 --- a/tests/baselines/reference/defaultExportsCannotMerge04.js +++ b/tests/baselines/reference/defaultExportsCannotMerge04.js @@ -18,7 +18,7 @@ export interface Foo { function Foo() { } Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = exports.Foo; +exports.default = Foo; var Foo; (function (Foo) { -})(exports.Foo || (exports.Foo = {})); +})(Foo || (Foo = {})); diff --git a/tests/baselines/reference/destructuringCatch.js b/tests/baselines/reference/destructuringCatch.js new file mode 100644 index 00000000000..4593b22f127 --- /dev/null +++ b/tests/baselines/reference/destructuringCatch.js @@ -0,0 +1,59 @@ +//// [destructuringCatch.ts] + +try { + throw [0, 1]; +} +catch ([a, b]) { + a + b; +} + +try { + throw { a: 0, b: 1 }; +} +catch ({a, b}) { + a + b; +} + +try { + throw [{ x: [0], z: 1 }]; +} +catch ([{x: [y], z}]) { + y + z; +} + +// Test of comment ranges. A fix to GH#11755 should update this. +try { +} +catch (/*Test comment ranges*/[/*a*/a]) { + +} + + +//// [destructuringCatch.js] +try { + throw [0, 1]; +} +catch (_a) { + var a = _a[0], b = _a[1]; + a + b; +} +try { + throw { a: 0, b: 1 }; +} +catch (_b) { + var a = _b.a, b = _b.b; + a + b; +} +try { + throw [{ x: [0], z: 1 }]; +} +catch (_c) { + var _d = _c[0], y = _d.x[0], z = _d.z; + y + z; +} +// Test of comment ranges. A fix to GH#11755 should update this. +try { +} +catch (_e) { + var /*a*/ a = _e[0]; +} diff --git a/tests/baselines/reference/destructuringCatch.symbols b/tests/baselines/reference/destructuringCatch.symbols new file mode 100644 index 00000000000..1d0a954b377 --- /dev/null +++ b/tests/baselines/reference/destructuringCatch.symbols @@ -0,0 +1,51 @@ +=== tests/cases/conformance/es6/destructuring/destructuringCatch.ts === + +try { + throw [0, 1]; +} +catch ([a, b]) { +>a : Symbol(a, Decl(destructuringCatch.ts, 4, 8)) +>b : Symbol(b, Decl(destructuringCatch.ts, 4, 10)) + + a + b; +>a : Symbol(a, Decl(destructuringCatch.ts, 4, 8)) +>b : Symbol(b, Decl(destructuringCatch.ts, 4, 10)) +} + +try { + throw { a: 0, b: 1 }; +>a : Symbol(a, Decl(destructuringCatch.ts, 9, 11)) +>b : Symbol(b, Decl(destructuringCatch.ts, 9, 17)) +} +catch ({a, b}) { +>a : Symbol(a, Decl(destructuringCatch.ts, 11, 8)) +>b : Symbol(b, Decl(destructuringCatch.ts, 11, 10)) + + a + b; +>a : Symbol(a, Decl(destructuringCatch.ts, 11, 8)) +>b : Symbol(b, Decl(destructuringCatch.ts, 11, 10)) +} + +try { + throw [{ x: [0], z: 1 }]; +>x : Symbol(x, Decl(destructuringCatch.ts, 16, 12)) +>z : Symbol(z, Decl(destructuringCatch.ts, 16, 20)) +} +catch ([{x: [y], z}]) { +>x : Symbol(x) +>y : Symbol(y, Decl(destructuringCatch.ts, 18, 13)) +>z : Symbol(z, Decl(destructuringCatch.ts, 18, 16)) + + y + z; +>y : Symbol(y, Decl(destructuringCatch.ts, 18, 13)) +>z : Symbol(z, Decl(destructuringCatch.ts, 18, 16)) +} + +// Test of comment ranges. A fix to GH#11755 should update this. +try { +} +catch (/*Test comment ranges*/[/*a*/a]) { +>a : Symbol(a, Decl(destructuringCatch.ts, 25, 31)) + +} + diff --git a/tests/baselines/reference/destructuringCatch.types b/tests/baselines/reference/destructuringCatch.types new file mode 100644 index 00000000000..3f057e64e4e --- /dev/null +++ b/tests/baselines/reference/destructuringCatch.types @@ -0,0 +1,65 @@ +=== tests/cases/conformance/es6/destructuring/destructuringCatch.ts === + +try { + throw [0, 1]; +>[0, 1] : number[] +>0 : 0 +>1 : 1 +} +catch ([a, b]) { +>a : any +>b : any + + a + b; +>a + b : any +>a : any +>b : any +} + +try { + throw { a: 0, b: 1 }; +>{ a: 0, b: 1 } : { a: number; b: number; } +>a : number +>0 : 0 +>b : number +>1 : 1 +} +catch ({a, b}) { +>a : any +>b : any + + a + b; +>a + b : any +>a : any +>b : any +} + +try { + throw [{ x: [0], z: 1 }]; +>[{ x: [0], z: 1 }] : { x: number[]; z: number; }[] +>{ x: [0], z: 1 } : { x: number[]; z: number; } +>x : number[] +>[0] : number[] +>0 : 0 +>z : number +>1 : 1 +} +catch ([{x: [y], z}]) { +>x : any +>y : any +>z : any + + y + z; +>y + z : any +>y : any +>z : any +} + +// Test of comment ranges. A fix to GH#11755 should update this. +try { +} +catch (/*Test comment ranges*/[/*a*/a]) { +>a : any + +} + diff --git a/tests/baselines/reference/disallowLineTerminatorBeforeArrow.js b/tests/baselines/reference/disallowLineTerminatorBeforeArrow.js index 1044146ccd0..0c6b98def4f 100644 --- a/tests/baselines/reference/disallowLineTerminatorBeforeArrow.js +++ b/tests/baselines/reference/disallowLineTerminatorBeforeArrow.js @@ -138,9 +138,9 @@ var m; } return City; }()); + var Enum; (function (Enum) { Enum[Enum["claw"] = (function () { return 10; })()] = "claw"; - })(m.Enum || (m.Enum = {})); - var Enum = m.Enum; + })(Enum = m.Enum || (m.Enum = {})); m.v = function (x) { return new City(Enum.claw); }; })(m || (m = {})); diff --git a/tests/baselines/reference/doWhileUnreachableCode.js b/tests/baselines/reference/doWhileUnreachableCode.js new file mode 100644 index 00000000000..3434a93f52d --- /dev/null +++ b/tests/baselines/reference/doWhileUnreachableCode.js @@ -0,0 +1,26 @@ +//// [doWhileUnreachableCode.ts] +function test() { + let foo = 0; + testLoop: do { + foo++; + continue testLoop; + } while (function() { + var x = 1; + return false; + }()); + + return foo; +} + +//// [doWhileUnreachableCode.js] +function test() { + var foo = 0; + testLoop: do { + foo++; + continue testLoop; + } while (function () { + var x = 1; + return false; + }()); + return foo; +} diff --git a/tests/baselines/reference/doWhileUnreachableCode.symbols b/tests/baselines/reference/doWhileUnreachableCode.symbols new file mode 100644 index 00000000000..571976490c3 --- /dev/null +++ b/tests/baselines/reference/doWhileUnreachableCode.symbols @@ -0,0 +1,22 @@ +=== tests/cases/compiler/doWhileUnreachableCode.ts === +function test() { +>test : Symbol(test, Decl(doWhileUnreachableCode.ts, 0, 0)) + + let foo = 0; +>foo : Symbol(foo, Decl(doWhileUnreachableCode.ts, 1, 7)) + + testLoop: do { + foo++; +>foo : Symbol(foo, Decl(doWhileUnreachableCode.ts, 1, 7)) + + continue testLoop; + } while (function() { + var x = 1; +>x : Symbol(x, Decl(doWhileUnreachableCode.ts, 6, 11)) + + return false; + }()); + + return foo; +>foo : Symbol(foo, Decl(doWhileUnreachableCode.ts, 1, 7)) +} diff --git a/tests/baselines/reference/doWhileUnreachableCode.types b/tests/baselines/reference/doWhileUnreachableCode.types new file mode 100644 index 00000000000..0c176dda799 --- /dev/null +++ b/tests/baselines/reference/doWhileUnreachableCode.types @@ -0,0 +1,34 @@ +=== tests/cases/compiler/doWhileUnreachableCode.ts === +function test() { +>test : () => number + + let foo = 0; +>foo : number +>0 : 0 + + testLoop: do { +>testLoop : any + + foo++; +>foo++ : number +>foo : number + + continue testLoop; +>testLoop : any + + } while (function() { +>function() { var x = 1; return false; }() : boolean +>function() { var x = 1; return false; } : () => boolean + + var x = 1; +>x : number +>1 : 1 + + return false; +>false : false + + }()); + + return foo; +>foo : number +} diff --git a/tests/baselines/reference/dottedNamesInSystem.js b/tests/baselines/reference/dottedNamesInSystem.js index c4bb44f03cf..257d7e616af 100644 --- a/tests/baselines/reference/dottedNamesInSystem.js +++ b/tests/baselines/reference/dottedNamesInSystem.js @@ -14,8 +14,8 @@ System.register([], function (exports_1, context_1) { function bar() { return A.B.C.foo(); } - var A; exports_1("bar", bar); + var A; return { setters: [], execute: function () { @@ -28,7 +28,7 @@ System.register([], function (exports_1, context_1) { C.foo = foo; })(C = B.C || (B.C = {})); })(B = A.B || (A.B = {})); - })(A = A || (A = {})); + })(A || (A = {})); exports_1("A", A); } }; diff --git a/tests/baselines/reference/enumAssignmentCompat3.js b/tests/baselines/reference/enumAssignmentCompat3.js index 62f05c18b5f..accaaa7a99e 100644 --- a/tests/baselines/reference/enumAssignmentCompat3.js +++ b/tests/baselines/reference/enumAssignmentCompat3.js @@ -92,78 +92,77 @@ merged2 = abc; // ok //// [enumAssignmentCompat3.js] var First; (function (First) { + var E; (function (E) { E[E["a"] = 0] = "a"; E[E["b"] = 1] = "b"; E[E["c"] = 2] = "c"; - })(First.E || (First.E = {})); - var E = First.E; + })(E = First.E || (First.E = {})); })(First || (First = {})); var Abc; (function (Abc) { + var E; (function (E) { E[E["a"] = 0] = "a"; E[E["b"] = 1] = "b"; E[E["c"] = 2] = "c"; - })(Abc.E || (Abc.E = {})); - var E = Abc.E; + })(E = Abc.E || (Abc.E = {})); + var Nope; (function (Nope) { Nope[Nope["a"] = 0] = "a"; Nope[Nope["b"] = 1] = "b"; Nope[Nope["c"] = 2] = "c"; - })(Abc.Nope || (Abc.Nope = {})); - var Nope = Abc.Nope; + })(Nope = Abc.Nope || (Abc.Nope = {})); })(Abc || (Abc = {})); var Abcd; (function (Abcd) { + var E; (function (E) { E[E["a"] = 0] = "a"; E[E["b"] = 1] = "b"; E[E["c"] = 2] = "c"; E[E["d"] = 3] = "d"; - })(Abcd.E || (Abcd.E = {})); - var E = Abcd.E; + })(E = Abcd.E || (Abcd.E = {})); })(Abcd || (Abcd = {})); var Ab; (function (Ab) { + var E; (function (E) { E[E["a"] = 0] = "a"; E[E["b"] = 1] = "b"; - })(Ab.E || (Ab.E = {})); - var E = Ab.E; + })(E = Ab.E || (Ab.E = {})); })(Ab || (Ab = {})); var Cd; (function (Cd) { + var E; (function (E) { E[E["c"] = 0] = "c"; E[E["d"] = 1] = "d"; - })(Cd.E || (Cd.E = {})); - var E = Cd.E; + })(E = Cd.E || (Cd.E = {})); })(Cd || (Cd = {})); var Decl; (function (Decl) { })(Decl || (Decl = {})); var Merged; (function (Merged) { + var E; (function (E) { E[E["a"] = 0] = "a"; E[E["b"] = 1] = "b"; - })(Merged.E || (Merged.E = {})); - var E = Merged.E; + })(E = Merged.E || (Merged.E = {})); (function (E) { E[E["c"] = 3] = "c"; E[E["d"] = 4] = "d"; - })(Merged.E || (Merged.E = {})); - var E = Merged.E; + })(E = Merged.E || (Merged.E = {})); })(Merged || (Merged = {})); var Merged2; (function (Merged2) { + var E; (function (E) { E[E["a"] = 0] = "a"; E[E["b"] = 1] = "b"; E[E["c"] = 2] = "c"; - })(Merged2.E || (Merged2.E = {})); - var E = Merged2.E; + })(E = Merged2.E || (Merged2.E = {})); (function (E) { E.d = 5; })(E = Merged2.E || (Merged2.E = {})); diff --git a/tests/baselines/reference/enumAssignmentCompat4.js b/tests/baselines/reference/enumAssignmentCompat4.js index ad28324ce0f..35bc9319ce9 100644 --- a/tests/baselines/reference/enumAssignmentCompat4.js +++ b/tests/baselines/reference/enumAssignmentCompat4.js @@ -26,20 +26,20 @@ let broken = [ //// [enumAssignmentCompat4.js] var M; (function (M) { + var MyEnum; (function (MyEnum) { MyEnum[MyEnum["BAR"] = 0] = "BAR"; - })(M.MyEnum || (M.MyEnum = {})); - var MyEnum = M.MyEnum; + })(MyEnum = M.MyEnum || (M.MyEnum = {})); M.object2 = { foo: MyEnum.BAR }; })(M || (M = {})); var N; (function (N) { + var MyEnum; (function (MyEnum) { MyEnum[MyEnum["FOO"] = 0] = "FOO"; - })(N.MyEnum || (N.MyEnum = {})); - var MyEnum = N.MyEnum; + })(MyEnum = N.MyEnum || (N.MyEnum = {})); ; N.object1 = { foo: MyEnum.FOO diff --git a/tests/baselines/reference/enumFromExternalModule.js b/tests/baselines/reference/enumFromExternalModule.js index 77f0e643969..a6e9f6b6076 100644 --- a/tests/baselines/reference/enumFromExternalModule.js +++ b/tests/baselines/reference/enumFromExternalModule.js @@ -12,10 +12,10 @@ var x = f.Mode.Open; //// [enumFromExternalModule_0.js] "use strict"; +var Mode; (function (Mode) { Mode[Mode["Open"] = 0] = "Open"; -})(exports.Mode || (exports.Mode = {})); -var Mode = exports.Mode; +})(Mode = exports.Mode || (exports.Mode = {})); //// [enumFromExternalModule_1.js] "use strict"; /// diff --git a/tests/baselines/reference/enumLiteralAssignableToEnumInsideUnion.js b/tests/baselines/reference/enumLiteralAssignableToEnumInsideUnion.js index 8786745a504..077e5690dd8 100644 --- a/tests/baselines/reference/enumLiteralAssignableToEnumInsideUnion.js +++ b/tests/baselines/reference/enumLiteralAssignableToEnumInsideUnion.js @@ -32,35 +32,35 @@ const e5: Ka.Foo | boolean = Z.Foo.A; // ok //// [enumLiteralAssignableToEnumInsideUnion.js] var X; (function (X) { + var Foo; (function (Foo) { Foo[Foo["A"] = 0] = "A"; Foo[Foo["B"] = 1] = "B"; - })(X.Foo || (X.Foo = {})); - var Foo = X.Foo; + })(Foo = X.Foo || (X.Foo = {})); })(X || (X = {})); var Y; (function (Y) { + var Foo; (function (Foo) { Foo[Foo["A"] = 0] = "A"; Foo[Foo["B"] = 1] = "B"; - })(Y.Foo || (Y.Foo = {})); - var Foo = Y.Foo; + })(Foo = Y.Foo || (Y.Foo = {})); })(Y || (Y = {})); var Z; (function (Z) { + var Foo; (function (Foo) { Foo[Foo["A"] = 2] = "A"; Foo[Foo["B"] = 4] = "B"; - })(Z.Foo || (Z.Foo = {})); - var Foo = Z.Foo; + })(Foo = Z.Foo || (Z.Foo = {})); })(Z || (Z = {})); var Ka; (function (Ka) { + var Foo; (function (Foo) { Foo[Foo["A"] = 1024] = "A"; Foo[Foo["B"] = 2048] = "B"; - })(Ka.Foo || (Ka.Foo = {})); - var Foo = Ka.Foo; + })(Foo = Ka.Foo || (Ka.Foo = {})); })(Ka || (Ka = {})); var e0 = Y.Foo.A; // ok var e1 = Z.Foo.A; // not legal, Z is computed diff --git a/tests/baselines/reference/enumMerging.js b/tests/baselines/reference/enumMerging.js index d830b03cac9..c3fa7fffeb3 100644 --- a/tests/baselines/reference/enumMerging.js +++ b/tests/baselines/reference/enumMerging.js @@ -82,35 +82,33 @@ var M1; EImpl1[EImpl1["E"] = 2] = "E"; EImpl1[EImpl1["F"] = 3] = "F"; })(EImpl1 || (EImpl1 = {})); + var EConst1; (function (EConst1) { EConst1[EConst1["A"] = 3] = "A"; EConst1[EConst1["B"] = 2] = "B"; EConst1[EConst1["C"] = 1] = "C"; - })(M1.EConst1 || (M1.EConst1 = {})); - var EConst1 = M1.EConst1; + })(EConst1 = M1.EConst1 || (M1.EConst1 = {})); (function (EConst1) { EConst1[EConst1["D"] = 7] = "D"; EConst1[EConst1["E"] = 9] = "E"; EConst1[EConst1["F"] = 8] = "F"; - })(M1.EConst1 || (M1.EConst1 = {})); - var EConst1 = M1.EConst1; + })(EConst1 = M1.EConst1 || (M1.EConst1 = {})); var x = [EConst1.A, EConst1.B, EConst1.C, EConst1.D, EConst1.E, EConst1.F]; })(M1 || (M1 = {})); // Enum with only computed members across 2 declarations with the same root module var M2; (function (M2) { + var EComp2; (function (EComp2) { EComp2[EComp2["A"] = 'foo'.length] = "A"; EComp2[EComp2["B"] = 'foo'.length] = "B"; EComp2[EComp2["C"] = 'foo'.length] = "C"; - })(M2.EComp2 || (M2.EComp2 = {})); - var EComp2 = M2.EComp2; + })(EComp2 = M2.EComp2 || (M2.EComp2 = {})); (function (EComp2) { EComp2[EComp2["D"] = 'foo'.length] = "D"; EComp2[EComp2["E"] = 'foo'.length] = "E"; EComp2[EComp2["F"] = 'foo'.length] = "F"; - })(M2.EComp2 || (M2.EComp2 = {})); - var EComp2 = M2.EComp2; + })(EComp2 = M2.EComp2 || (M2.EComp2 = {})); var x = [EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F]; })(M2 || (M2 = {})); // Enum with initializer in only one of two declarations with constant members with the same root module @@ -130,41 +128,41 @@ var M3; // Enums with same name but different root module var M4; (function (M4) { + var Color; (function (Color) { Color[Color["Red"] = 0] = "Red"; Color[Color["Green"] = 1] = "Green"; Color[Color["Blue"] = 2] = "Blue"; - })(M4.Color || (M4.Color = {})); - var Color = M4.Color; + })(Color = M4.Color || (M4.Color = {})); })(M4 || (M4 = {})); var M5; (function (M5) { + var Color; (function (Color) { Color[Color["Red"] = 0] = "Red"; Color[Color["Green"] = 1] = "Green"; Color[Color["Blue"] = 2] = "Blue"; - })(M5.Color || (M5.Color = {})); - var Color = M5.Color; + })(Color = M5.Color || (M5.Color = {})); })(M5 || (M5 = {})); var M6; (function (M6) { var A; (function (A) { + var Color; (function (Color) { Color[Color["Red"] = 0] = "Red"; Color[Color["Green"] = 1] = "Green"; Color[Color["Blue"] = 2] = "Blue"; - })(A.Color || (A.Color = {})); - var Color = A.Color; + })(Color = A.Color || (A.Color = {})); })(A = M6.A || (M6.A = {})); })(M6 || (M6 = {})); (function (M6) { var A; (function (A) { + var Color; (function (Color) { Color[Color["Yellow"] = 1] = "Yellow"; - })(A.Color || (A.Color = {})); - var Color = A.Color; + })(Color = A.Color || (A.Color = {})); })(A = M6.A || (M6.A = {})); var t = A.Color.Yellow; t = A.Color.Red; diff --git a/tests/baselines/reference/enumMergingErrors.js b/tests/baselines/reference/enumMergingErrors.js index c9b4aaef754..05482f48377 100644 --- a/tests/baselines/reference/enumMergingErrors.js +++ b/tests/baselines/reference/enumMergingErrors.js @@ -46,84 +46,84 @@ module M2 { // Enum with constant, computed, constant members split across 3 declarations with the same root module var M; (function (M) { + var E1; (function (E1) { E1[E1["A"] = 0] = "A"; - })(M.E1 || (M.E1 = {})); - var E1 = M.E1; + })(E1 = M.E1 || (M.E1 = {})); + var E2; (function (E2) { E2[E2["C"] = 0] = "C"; - })(M.E2 || (M.E2 = {})); - var E2 = M.E2; + })(E2 = M.E2 || (M.E2 = {})); + var E3; (function (E3) { E3[E3["A"] = 0] = "A"; - })(M.E3 || (M.E3 = {})); - var E3 = M.E3; + })(E3 = M.E3 || (M.E3 = {})); })(M || (M = {})); (function (M) { + var E1; (function (E1) { E1[E1["B"] = 'foo'.length] = "B"; - })(M.E1 || (M.E1 = {})); - var E1 = M.E1; + })(E1 = M.E1 || (M.E1 = {})); + var E2; (function (E2) { E2[E2["B"] = 'foo'.length] = "B"; - })(M.E2 || (M.E2 = {})); - var E2 = M.E2; + })(E2 = M.E2 || (M.E2 = {})); + var E3; (function (E3) { E3[E3["C"] = 0] = "C"; - })(M.E3 || (M.E3 = {})); - var E3 = M.E3; + })(E3 = M.E3 || (M.E3 = {})); })(M || (M = {})); (function (M) { + var E1; (function (E1) { E1[E1["C"] = 0] = "C"; - })(M.E1 || (M.E1 = {})); - var E1 = M.E1; + })(E1 = M.E1 || (M.E1 = {})); + var E2; (function (E2) { E2[E2["A"] = 0] = "A"; - })(M.E2 || (M.E2 = {})); - var E2 = M.E2; + })(E2 = M.E2 || (M.E2 = {})); + var E3; (function (E3) { E3[E3["B"] = 'foo'.length] = "B"; - })(M.E3 || (M.E3 = {})); - var E3 = M.E3; + })(E3 = M.E3 || (M.E3 = {})); })(M || (M = {})); // Enum with no initializer in either declaration with constant members with the same root module var M1; (function (M1) { + var E1; (function (E1) { E1[E1["A"] = 0] = "A"; - })(M1.E1 || (M1.E1 = {})); - var E1 = M1.E1; + })(E1 = M1.E1 || (M1.E1 = {})); })(M1 || (M1 = {})); (function (M1) { + var E1; (function (E1) { E1[E1["B"] = 0] = "B"; - })(M1.E1 || (M1.E1 = {})); - var E1 = M1.E1; + })(E1 = M1.E1 || (M1.E1 = {})); })(M1 || (M1 = {})); (function (M1) { + var E1; (function (E1) { E1[E1["C"] = 0] = "C"; - })(M1.E1 || (M1.E1 = {})); - var E1 = M1.E1; + })(E1 = M1.E1 || (M1.E1 = {})); })(M1 || (M1 = {})); // Enum with initializer in only one of three declarations with constant members with the same root module var M2; (function (M2) { + var E1; (function (E1) { E1[E1["A"] = 0] = "A"; - })(M2.E1 || (M2.E1 = {})); - var E1 = M2.E1; + })(E1 = M2.E1 || (M2.E1 = {})); })(M2 || (M2 = {})); (function (M2) { + var E1; (function (E1) { E1[E1["B"] = 0] = "B"; - })(M2.E1 || (M2.E1 = {})); - var E1 = M2.E1; + })(E1 = M2.E1 || (M2.E1 = {})); })(M2 || (M2 = {})); (function (M2) { + var E1; (function (E1) { E1[E1["C"] = 0] = "C"; - })(M2.E1 || (M2.E1 = {})); - var E1 = M2.E1; + })(E1 = M2.E1 || (M2.E1 = {})); })(M2 || (M2 = {})); diff --git a/tests/baselines/reference/es3defaultAliasIsQuoted.js b/tests/baselines/reference/es3defaultAliasIsQuoted.js index 2ce6113b4fe..89fd0c47a7e 100644 --- a/tests/baselines/reference/es3defaultAliasIsQuoted.js +++ b/tests/baselines/reference/es3defaultAliasIsQuoted.js @@ -21,8 +21,8 @@ var Foo = (function () { } return Foo; }()); -exports.Foo = Foo; Foo.CONSTANT = "Foo"; +exports.Foo = Foo; function assert(value) { if (!value) throw new Error("Assertion failed!"); diff --git a/tests/baselines/reference/es5ExportEquals.js b/tests/baselines/reference/es5ExportEquals.js index 4697c61976b..3a1ae6fe242 100644 --- a/tests/baselines/reference/es5ExportEquals.js +++ b/tests/baselines/reference/es5ExportEquals.js @@ -8,7 +8,6 @@ export = f; //// [es5ExportEquals.js] "use strict"; function f() { } -exports.f = f; module.exports = f; diff --git a/tests/baselines/reference/es5ModuleInternalNamedImports.js b/tests/baselines/reference/es5ModuleInternalNamedImports.js index 2fcbd5a53d8..cc596980889 100644 --- a/tests/baselines/reference/es5ModuleInternalNamedImports.js +++ b/tests/baselines/reference/es5ModuleInternalNamedImports.js @@ -59,9 +59,9 @@ define(["require", "exports"], function (require, exports) { function M_F() { } M.M_F = M_F; // enum + var M_E; (function (M_E) { - })(M.M_E || (M.M_E = {})); - var M_E = M.M_E; + })(M_E = M.M_E || (M.M_E = {})); // alias M.M_A = M_M; })(M = exports.M || (exports.M = {})); diff --git a/tests/baselines/reference/es6ModuleConstEnumDeclaration2.js b/tests/baselines/reference/es6ModuleConstEnumDeclaration2.js index 539ec121b6b..3e4475f2ffa 100644 --- a/tests/baselines/reference/es6ModuleConstEnumDeclaration2.js +++ b/tests/baselines/reference/es6ModuleConstEnumDeclaration2.js @@ -63,12 +63,12 @@ var x = 0 /* a */; var y = 0 /* x */; export var m1; (function (m1) { + var e3; (function (e3) { e3[e3["a"] = 0] = "a"; e3[e3["b"] = 1] = "b"; e3[e3["c"] = 2] = "c"; - })(m1.e3 || (m1.e3 = {})); - var e3 = m1.e3; + })(e3 = m1.e3 || (m1.e3 = {})); var e4; (function (e4) { e4[e4["x"] = 0] = "x"; @@ -82,12 +82,12 @@ export var m1; })(m1 || (m1 = {})); var m2; (function (m2) { + var e5; (function (e5) { e5[e5["a"] = 0] = "a"; e5[e5["b"] = 1] = "b"; e5[e5["c"] = 2] = "c"; - })(m2.e5 || (m2.e5 = {})); - var e5 = m2.e5; + })(e5 = m2.e5 || (m2.e5 = {})); var e6; (function (e6) { e6[e6["x"] = 0] = "x"; diff --git a/tests/baselines/reference/es6ModuleEnumDeclaration.js b/tests/baselines/reference/es6ModuleEnumDeclaration.js index 30c382a4508..91ba2efe8d3 100644 --- a/tests/baselines/reference/es6ModuleEnumDeclaration.js +++ b/tests/baselines/reference/es6ModuleEnumDeclaration.js @@ -62,12 +62,12 @@ var x = e1.a; var y = e2.x; export var m1; (function (m1) { + var e3; (function (e3) { e3[e3["a"] = 0] = "a"; e3[e3["b"] = 1] = "b"; e3[e3["c"] = 2] = "c"; - })(m1.e3 || (m1.e3 = {})); - var e3 = m1.e3; + })(e3 = m1.e3 || (m1.e3 = {})); var e4; (function (e4) { e4[e4["x"] = 0] = "x"; @@ -81,12 +81,12 @@ export var m1; })(m1 || (m1 = {})); var m2; (function (m2) { + var e5; (function (e5) { e5[e5["a"] = 0] = "a"; e5[e5["b"] = 1] = "b"; e5[e5["c"] = 2] = "c"; - })(m2.e5 || (m2.e5 = {})); - var e5 = m2.e5; + })(e5 = m2.e5 || (m2.e5 = {})); var e6; (function (e6) { e6[e6["x"] = 0] = "x"; diff --git a/tests/baselines/reference/es6ModuleInternalNamedImports.js b/tests/baselines/reference/es6ModuleInternalNamedImports.js index 22d15b9fd61..fe2e0217795 100644 --- a/tests/baselines/reference/es6ModuleInternalNamedImports.js +++ b/tests/baselines/reference/es6ModuleInternalNamedImports.js @@ -50,9 +50,9 @@ export var M; function M_F() { } M.M_F = M_F; // enum + var M_E; (function (M_E) { - })(M.M_E || (M.M_E = {})); - var M_E = M.M_E; + })(M_E = M.M_E || (M.M_E = {})); // alias M.M_A = M_M; })(M || (M = {})); diff --git a/tests/baselines/reference/es6ModuleInternalNamedImports2.js b/tests/baselines/reference/es6ModuleInternalNamedImports2.js index 35eabc9a65e..93d8f40c1d2 100644 --- a/tests/baselines/reference/es6ModuleInternalNamedImports2.js +++ b/tests/baselines/reference/es6ModuleInternalNamedImports2.js @@ -52,9 +52,9 @@ export var M; function M_F() { } M.M_F = M_F; // enum + var M_E; (function (M_E) { - })(M.M_E || (M.M_E = {})); - var M_E = M.M_E; + })(M_E = M.M_E || (M.M_E = {})); // alias M.M_A = M_M; })(M || (M = {})); diff --git a/tests/baselines/reference/es6modulekindWithES5Target.js b/tests/baselines/reference/es6modulekindWithES5Target.js index 10d9cd2e36f..66967cbc89f 100644 --- a/tests/baselines/reference/es6modulekindWithES5Target.js +++ b/tests/baselines/reference/es6modulekindWithES5Target.js @@ -27,13 +27,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; -export var C = (function () { +var C = (function () { function C() { this.p = 1; } C.prototype.method = function () { }; return C; }()); +export { C }; C.s = 0; export { C as C2 }; var D = (function () { diff --git a/tests/baselines/reference/es6modulekindWithES5Target12.js b/tests/baselines/reference/es6modulekindWithES5Target12.js index 316718e6f80..74646f73e55 100644 --- a/tests/baselines/reference/es6modulekindWithES5Target12.js +++ b/tests/baselines/reference/es6modulekindWithES5Target12.js @@ -38,11 +38,12 @@ export namespace F { } //// [es6modulekindWithES5Target12.js] -export var C = (function () { +var C = (function () { function C() { } return C; }()); +export { C }; (function (C) { C.x = 1; })(C || (C = {})); diff --git a/tests/baselines/reference/exportAsNamespace.d.symbols b/tests/baselines/reference/exportAsNamespace.d.symbols new file mode 100644 index 00000000000..ca65cb2574e --- /dev/null +++ b/tests/baselines/reference/exportAsNamespace.d.symbols @@ -0,0 +1,9 @@ +=== tests/cases/compiler/exportAsNamespace.d.ts === +// issue: https://github.com/Microsoft/TypeScript/issues/11545 + +export var X; +>X : Symbol(X, Decl(exportAsNamespace.d.ts, 2, 10)) + +export as namespace N +>N : Symbol(N, Decl(exportAsNamespace.d.ts, 2, 13)) + diff --git a/tests/baselines/reference/exportAsNamespace.d.types b/tests/baselines/reference/exportAsNamespace.d.types new file mode 100644 index 00000000000..706857bf8ed --- /dev/null +++ b/tests/baselines/reference/exportAsNamespace.d.types @@ -0,0 +1,9 @@ +=== tests/cases/compiler/exportAsNamespace.d.ts === +// issue: https://github.com/Microsoft/TypeScript/issues/11545 + +export var X; +>X : any + +export as namespace N +>N : typeof N + diff --git a/tests/baselines/reference/exportAssignmentAndDeclaration.js b/tests/baselines/reference/exportAssignmentAndDeclaration.js index 9e87d733c6b..df1f2ef0d0a 100644 --- a/tests/baselines/reference/exportAssignmentAndDeclaration.js +++ b/tests/baselines/reference/exportAssignmentAndDeclaration.js @@ -13,12 +13,12 @@ export = C1; //// [foo_0.js] define(["require", "exports"], function (require, exports) { "use strict"; + var E1; (function (E1) { E1[E1["A"] = 0] = "A"; E1[E1["B"] = 1] = "B"; E1[E1["C"] = 2] = "C"; - })(exports.E1 || (exports.E1 = {})); - var E1 = exports.E1; + })(E1 = exports.E1 || (exports.E1 = {})); var C1 = (function () { function C1() { } diff --git a/tests/baselines/reference/exportAssignmentWithExports.js b/tests/baselines/reference/exportAssignmentWithExports.js index 626e7881548..8441b7b4320 100644 --- a/tests/baselines/reference/exportAssignmentWithExports.js +++ b/tests/baselines/reference/exportAssignmentWithExports.js @@ -10,7 +10,6 @@ var C = (function () { } return C; }()); -exports.C = C; var D = (function () { function D() { } diff --git a/tests/baselines/reference/exportCodeGen.js b/tests/baselines/reference/exportCodeGen.js index 41564c35d1a..d72c633731d 100644 --- a/tests/baselines/reference/exportCodeGen.js +++ b/tests/baselines/reference/exportCodeGen.js @@ -90,10 +90,10 @@ var D; // validate all exportable statements var E; (function (E) { + var Color; (function (Color) { Color[Color["Red"] = 0] = "Red"; - })(E.Color || (E.Color = {})); - var Color = E.Color; + })(Color = E.Color || (E.Color = {})); function fn() { } E.fn = fn; var C = (function () { diff --git a/tests/baselines/reference/exportEqualsAmd.js b/tests/baselines/reference/exportEqualsAmd.js index 385012a6e0f..8b66b8896e3 100644 --- a/tests/baselines/reference/exportEqualsAmd.js +++ b/tests/baselines/reference/exportEqualsAmd.js @@ -4,6 +4,6 @@ export = { ["hi"]: "there" }; //// [exportEqualsAmd.js] define(["require", "exports"], function (require, exports) { "use strict"; - return _a = {}, _a["hi"] = "there", _a; var _a; + return _a = {}, _a["hi"] = "there", _a; }); diff --git a/tests/baselines/reference/exportEqualsCommonJs.js b/tests/baselines/reference/exportEqualsCommonJs.js index 01b7a43b310..03202239b17 100644 --- a/tests/baselines/reference/exportEqualsCommonJs.js +++ b/tests/baselines/reference/exportEqualsCommonJs.js @@ -3,5 +3,5 @@ export = { ["hi"]: "there" }; //// [exportEqualsCommonJs.js] "use strict"; -module.exports = (_a = {}, _a["hi"] = "there", _a); var _a; +module.exports = (_a = {}, _a["hi"] = "there", _a); diff --git a/tests/baselines/reference/exportEqualsUmd.js b/tests/baselines/reference/exportEqualsUmd.js index cd4c99f504d..500c8795dc7 100644 --- a/tests/baselines/reference/exportEqualsUmd.js +++ b/tests/baselines/reference/exportEqualsUmd.js @@ -11,6 +11,6 @@ export = { ["hi"]: "there" }; } })(["require", "exports"], function (require, exports) { "use strict"; - return _a = {}, _a["hi"] = "there", _a; var _a; + return _a = {}, _a["hi"] = "there", _a; }); diff --git a/tests/baselines/reference/exportsAndImports3-amd.js b/tests/baselines/reference/exportsAndImports3-amd.js index 0e315f1f18b..cbf30735182 100644 --- a/tests/baselines/reference/exportsAndImports3-amd.js +++ b/tests/baselines/reference/exportsAndImports3-amd.js @@ -49,12 +49,12 @@ define(["require", "exports"], function (require, exports) { }()); exports.C = C; exports.C1 = C; + var E; (function (E) { E[E["A"] = 0] = "A"; E[E["B"] = 1] = "B"; E[E["C"] = 2] = "C"; - })(exports.E || (exports.E = {})); - var E = exports.E; + })(E = exports.E || (exports.E = {})); exports.E1 = E; var M; (function (M) { diff --git a/tests/baselines/reference/exportsAndImports3-es6.js b/tests/baselines/reference/exportsAndImports3-es6.js index ea16836b1f2..85daa3f0f5c 100644 --- a/tests/baselines/reference/exportsAndImports3-es6.js +++ b/tests/baselines/reference/exportsAndImports3-es6.js @@ -45,12 +45,12 @@ class C { } exports.C = C; exports.C1 = C; +var E; (function (E) { E[E["A"] = 0] = "A"; E[E["B"] = 1] = "B"; E[E["C"] = 2] = "C"; -})(exports.E || (exports.E = {})); -var E = exports.E; +})(E = exports.E || (exports.E = {})); exports.E1 = E; var M; (function (M) { diff --git a/tests/baselines/reference/exportsAndImports3.js b/tests/baselines/reference/exportsAndImports3.js index 16115a192da..dbcd9486215 100644 --- a/tests/baselines/reference/exportsAndImports3.js +++ b/tests/baselines/reference/exportsAndImports3.js @@ -48,12 +48,12 @@ var C = (function () { }()); exports.C = C; exports.C1 = C; +var E; (function (E) { E[E["A"] = 0] = "A"; E[E["B"] = 1] = "B"; E[E["C"] = 2] = "C"; -})(exports.E || (exports.E = {})); -var E = exports.E; +})(E = exports.E || (exports.E = {})); exports.E1 = E; var M; (function (M) { diff --git a/tests/baselines/reference/extendPrivateConstructorClass.errors.txt b/tests/baselines/reference/extendPrivateConstructorClass.errors.txt new file mode 100644 index 00000000000..02e9c6a1c88 --- /dev/null +++ b/tests/baselines/reference/extendPrivateConstructorClass.errors.txt @@ -0,0 +1,15 @@ +tests/cases/compiler/extendPrivateConstructorClass.ts(7,17): error TS2675: Cannot extend a class 'abc.XYZ'. Class constructor is marked as private. + + +==== tests/cases/compiler/extendPrivateConstructorClass.ts (1 errors) ==== + declare namespace abc { + class XYZ { + private constructor(); + } + } + + class C extends abc.XYZ { + ~~~~~~~ +!!! error TS2675: Cannot extend a class 'abc.XYZ'. Class constructor is marked as private. + } + \ No newline at end of file diff --git a/tests/baselines/reference/extendPrivateConstructorClass.js b/tests/baselines/reference/extendPrivateConstructorClass.js new file mode 100644 index 00000000000..8893e9735ff --- /dev/null +++ b/tests/baselines/reference/extendPrivateConstructorClass.js @@ -0,0 +1,24 @@ +//// [extendPrivateConstructorClass.ts] +declare namespace abc { + class XYZ { + private constructor(); + } +} + +class C extends abc.XYZ { +} + + +//// [extendPrivateConstructorClass.js] +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var C = (function (_super) { + __extends(C, _super); + function C() { + return _super.apply(this, arguments) || this; + } + return C; +}(abc.XYZ)); diff --git a/tests/baselines/reference/externModule.js b/tests/baselines/reference/externModule.js index ff83d07ef98..f7edc1283df 100644 --- a/tests/baselines/reference/externModule.js +++ b/tests/baselines/reference/externModule.js @@ -43,11 +43,12 @@ n=XDate.UTC(1964,2,1); declare; module; { - export var XDate = (function () { + var XDate = (function () { function XDate() { } return XDate; }()); + export { XDate }; } var d = new XDate(); d.getDay(); diff --git a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js index 6d65ee5531b..401a2e94b68 100644 --- a/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js +++ b/tests/baselines/reference/genericRecursiveImplicitConstructorErrors2.js @@ -37,11 +37,11 @@ var TypeScript2; ; ; ; + var PullSymbolVisibility; (function (PullSymbolVisibility) { PullSymbolVisibility[PullSymbolVisibility["Private"] = 0] = "Private"; PullSymbolVisibility[PullSymbolVisibility["Public"] = 1] = "Public"; - })(TypeScript2.PullSymbolVisibility || (TypeScript2.PullSymbolVisibility = {})); - var PullSymbolVisibility = TypeScript2.PullSymbolVisibility; + })(PullSymbolVisibility = TypeScript2.PullSymbolVisibility || (TypeScript2.PullSymbolVisibility = {})); var PullSymbol = (function () { function PullSymbol(name, declKind) { } diff --git a/tests/baselines/reference/importImportOnlyModule.js b/tests/baselines/reference/importImportOnlyModule.js index 38ffc08d65e..013999321f9 100644 --- a/tests/baselines/reference/importImportOnlyModule.js +++ b/tests/baselines/reference/importImportOnlyModule.js @@ -24,8 +24,8 @@ define(["require", "exports"], function (require, exports) { } return C1; }()); - exports.C1 = C1; C1.s1 = true; + exports.C1 = C1; }); //// [foo_1.js] define(["require", "exports"], function (require, exports) { diff --git a/tests/baselines/reference/importWithTrailingSlash_noResolve.trace.json b/tests/baselines/reference/importWithTrailingSlash_noResolve.trace.json index e010603106f..55b75c57dde 100644 --- a/tests/baselines/reference/importWithTrailingSlash_noResolve.trace.json +++ b/tests/baselines/reference/importWithTrailingSlash_noResolve.trace.json @@ -6,5 +6,9 @@ "File '/foo/index.ts' does not exist.", "File '/foo/index.tsx' does not exist.", "File '/foo/index.d.ts' does not exist.", + "Loading module as file / folder, candidate module location '/foo/'.", + "File '/foo/package.json' does not exist.", + "File '/foo/index.js' does not exist.", + "File '/foo/index.jsx' does not exist.", "======== Module name './foo/' was not resolved. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/innerModExport1.js b/tests/baselines/reference/innerModExport1.js index cbeced37046..285120c7462 100644 --- a/tests/baselines/reference/innerModExport1.js +++ b/tests/baselines/reference/innerModExport1.js @@ -27,10 +27,9 @@ var Outer; module; { var non_export_var = 0; - Outer.export_var = 1; + export var export_var = 1; function NonExportFunc() { return 0; } - function ExportFunc() { return 0; } - Outer.ExportFunc = ExportFunc; + export function ExportFunc() { return 0; } } Outer.outer_var_export = 0; function outerFuncExport() { return 0; } diff --git a/tests/baselines/reference/innerModExport2.js b/tests/baselines/reference/innerModExport2.js index a1526daf6f3..2024cd8284f 100644 --- a/tests/baselines/reference/innerModExport2.js +++ b/tests/baselines/reference/innerModExport2.js @@ -28,10 +28,9 @@ var Outer; module; { var non_export_var = 0; - Outer.export_var = 1; + export var export_var = 1; function NonExportFunc() { return 0; } - function ExportFunc() { return 0; } - Outer.ExportFunc = ExportFunc; + export function ExportFunc() { return 0; } } var export_var; Outer.outer_var_export = 0; diff --git a/tests/baselines/reference/instantiatedModule.js b/tests/baselines/reference/instantiatedModule.js index d8ef427619a..8e7027d5fd7 100644 --- a/tests/baselines/reference/instantiatedModule.js +++ b/tests/baselines/reference/instantiatedModule.js @@ -101,11 +101,11 @@ var p2 = new m2.Point(); var p2 = new M2.Point(); var M3; (function (M3) { + var Color; (function (Color) { Color[Color["Blue"] = 0] = "Blue"; Color[Color["Red"] = 1] = "Red"; - })(M3.Color || (M3.Color = {})); - var Color = M3.Color; + })(Color = M3.Color || (M3.Color = {})); })(M3 || (M3 = {})); var m3; var m3 = M3; diff --git a/tests/baselines/reference/interfaceAssignmentCompat.js b/tests/baselines/reference/interfaceAssignmentCompat.js index edaebbd38a2..98586da24e5 100644 --- a/tests/baselines/reference/interfaceAssignmentCompat.js +++ b/tests/baselines/reference/interfaceAssignmentCompat.js @@ -55,12 +55,12 @@ M.test(); //// [interfaceAssignmentCompat.js] var M; (function (M) { + var Color; (function (Color) { Color[Color["Green"] = 0] = "Green"; Color[Color["Blue"] = 1] = "Blue"; Color[Color["Brown"] = 2] = "Brown"; - })(M.Color || (M.Color = {})); - var Color = M.Color; + })(Color = M.Color || (M.Color = {})); function CompareEyes(a, b) { return a.color - b.color; } diff --git a/tests/baselines/reference/internalAliasEnum.js b/tests/baselines/reference/internalAliasEnum.js index 6400cf26ddc..40fac82eb4d 100644 --- a/tests/baselines/reference/internalAliasEnum.js +++ b/tests/baselines/reference/internalAliasEnum.js @@ -16,12 +16,12 @@ module c { //// [internalAliasEnum.js] var a; (function (a) { + var weekend; (function (weekend) { weekend[weekend["Friday"] = 0] = "Friday"; weekend[weekend["Saturday"] = 1] = "Saturday"; weekend[weekend["Sunday"] = 2] = "Sunday"; - })(a.weekend || (a.weekend = {})); - var weekend = a.weekend; + })(weekend = a.weekend || (a.weekend = {})); })(a || (a = {})); var c; (function (c) { diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js index dd30dc814ae..c7b8bf2cacc 100644 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithExport.js @@ -17,12 +17,12 @@ export module c { "use strict"; var a; (function (a) { + var weekend; (function (weekend) { weekend[weekend["Friday"] = 0] = "Friday"; weekend[weekend["Saturday"] = 1] = "Saturday"; weekend[weekend["Sunday"] = 2] = "Sunday"; - })(a.weekend || (a.weekend = {})); - var weekend = a.weekend; + })(weekend = a.weekend || (a.weekend = {})); })(a = exports.a || (exports.a = {})); var c; (function (c) { diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js index 7f00d69a8d6..267fffc7b70 100644 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExport.js @@ -17,12 +17,12 @@ export module c { "use strict"; var a; (function (a) { + var weekend; (function (weekend) { weekend[weekend["Friday"] = 0] = "Friday"; weekend[weekend["Saturday"] = 1] = "Saturday"; weekend[weekend["Sunday"] = 2] = "Sunday"; - })(a.weekend || (a.weekend = {})); - var weekend = a.weekend; + })(weekend = a.weekend || (a.weekend = {})); })(a = exports.a || (exports.a = {})); var c; (function (c) { diff --git a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js index 8612e74f829..a44298b6864 100644 --- a/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js +++ b/tests/baselines/reference/internalAliasEnumInsideLocalModuleWithoutExportAccessError.js @@ -18,12 +18,12 @@ var happyFriday = c.b.Friday; "use strict"; var a; (function (a) { + var weekend; (function (weekend) { weekend[weekend["Friday"] = 0] = "Friday"; weekend[weekend["Saturday"] = 1] = "Saturday"; weekend[weekend["Sunday"] = 2] = "Sunday"; - })(a.weekend || (a.weekend = {})); - var weekend = a.weekend; + })(weekend = a.weekend || (a.weekend = {})); })(a = exports.a || (exports.a = {})); var c; (function (c) { diff --git a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.js b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.js index c7396fded2a..8e11f60dcc7 100644 --- a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.js +++ b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithExport.js @@ -16,12 +16,12 @@ define(["require", "exports"], function (require, exports) { "use strict"; var a; (function (a) { + var weekend; (function (weekend) { weekend[weekend["Friday"] = 0] = "Friday"; weekend[weekend["Saturday"] = 1] = "Saturday"; weekend[weekend["Sunday"] = 2] = "Sunday"; - })(a.weekend || (a.weekend = {})); - var weekend = a.weekend; + })(weekend = a.weekend || (a.weekend = {})); })(a = exports.a || (exports.a = {})); exports.b = a.weekend; exports.bVal = exports.b.Sunday; diff --git a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.js b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.js index 1cf1b0b8b16..8ec0dcea815 100644 --- a/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.js +++ b/tests/baselines/reference/internalAliasEnumInsideTopLevelModuleWithoutExport.js @@ -16,12 +16,12 @@ define(["require", "exports"], function (require, exports) { "use strict"; var a; (function (a) { + var weekend; (function (weekend) { weekend[weekend["Friday"] = 0] = "Friday"; weekend[weekend["Saturday"] = 1] = "Saturday"; weekend[weekend["Sunday"] = 2] = "Sunday"; - })(a.weekend || (a.weekend = {})); - var weekend = a.weekend; + })(weekend = a.weekend || (a.weekend = {})); })(a = exports.a || (exports.a = {})); var b = a.weekend; exports.bVal = b.Sunday; diff --git a/tests/baselines/reference/invalidModuleWithVarStatements.js b/tests/baselines/reference/invalidModuleWithVarStatements.js index ce5fbd54ed1..caa6b24f00f 100644 --- a/tests/baselines/reference/invalidModuleWithVarStatements.js +++ b/tests/baselines/reference/invalidModuleWithVarStatements.js @@ -39,11 +39,11 @@ var Y2; })(Y2 || (Y2 = {})); var Y4; (function (Y4) { - static var x = 0; + var x = 0; })(Y4 || (Y4 = {})); var YY; (function (YY) { - static function fn(x) { } + function fn(x) { } })(YY || (YY = {})); var YY2; (function (YY2) { diff --git a/tests/baselines/reference/jsxEmitWithAttributes.js b/tests/baselines/reference/jsxEmitWithAttributes.js new file mode 100644 index 00000000000..1acead2801d --- /dev/null +++ b/tests/baselines/reference/jsxEmitWithAttributes.js @@ -0,0 +1,81 @@ +//// [tests/cases/compiler/jsxEmitWithAttributes.ts] //// + +//// [Element.ts] + +declare namespace JSX { + interface Element { + name: string; + isIntrinsic: boolean; + isCustomElement: boolean; + toString(renderId?: number): string; + bindDOM(renderId?: number): number; + resetComponent(): void; + instantiateComponents(renderId?: number): number; + props: any; + } +} +export namespace Element { + export function isElement(el: any): el is JSX.Element { + return el.markAsChildOfRootElement !== undefined; + } + + export function createElement(args: any[]) { + + return { + } + } +} + +export let createElement = Element.createElement; + +function toCamelCase(text: string): string { + return text[0].toLowerCase() + text.substring(1); +} + +//// [test.tsx] +import { Element} from './Element'; + +let c: { + a?: { + b: string + } +}; + +class A { + view() { + return [ + , + + ]; + } +} + +//// [Element.js] +"use strict"; +var Element; +(function (Element) { + function isElement(el) { + return el.markAsChildOfRootElement !== undefined; + } + Element.isElement = isElement; + function createElement(args) { + return {}; + } + Element.createElement = createElement; +})(Element = exports.Element || (exports.Element = {})); +exports.createElement = Element.createElement; +function toCamelCase(text) { + return text[0].toLowerCase() + text.substring(1); +} +//// [test.js] +"use strict"; +const Element_1 = require("./Element"); +let c; +class A { + view() { + return [ + Element_1.Element.createElement("meta", { content: "helloworld" }), + Element_1.Element.createElement("meta", { content: c.a.b }) + ]; + } +} diff --git a/tests/baselines/reference/jsxEmitWithAttributes.symbols b/tests/baselines/reference/jsxEmitWithAttributes.symbols new file mode 100644 index 00000000000..16cd35d1ca3 --- /dev/null +++ b/tests/baselines/reference/jsxEmitWithAttributes.symbols @@ -0,0 +1,119 @@ +=== tests/cases/compiler/Element.ts === + +declare namespace JSX { +>JSX : Symbol(JSX, Decl(Element.ts, 0, 0)) + + interface Element { +>Element : Symbol(Element, Decl(Element.ts, 1, 23)) + + name: string; +>name : Symbol(Element.name, Decl(Element.ts, 2, 23)) + + isIntrinsic: boolean; +>isIntrinsic : Symbol(Element.isIntrinsic, Decl(Element.ts, 3, 21)) + + isCustomElement: boolean; +>isCustomElement : Symbol(Element.isCustomElement, Decl(Element.ts, 4, 29)) + + toString(renderId?: number): string; +>toString : Symbol(Element.toString, Decl(Element.ts, 5, 33)) +>renderId : Symbol(renderId, Decl(Element.ts, 6, 17)) + + bindDOM(renderId?: number): number; +>bindDOM : Symbol(Element.bindDOM, Decl(Element.ts, 6, 44)) +>renderId : Symbol(renderId, Decl(Element.ts, 7, 16)) + + resetComponent(): void; +>resetComponent : Symbol(Element.resetComponent, Decl(Element.ts, 7, 43)) + + instantiateComponents(renderId?: number): number; +>instantiateComponents : Symbol(Element.instantiateComponents, Decl(Element.ts, 8, 31)) +>renderId : Symbol(renderId, Decl(Element.ts, 9, 30)) + + props: any; +>props : Symbol(Element.props, Decl(Element.ts, 9, 57)) + } +} +export namespace Element { +>Element : Symbol(Element, Decl(Element.ts, 12, 1)) + + export function isElement(el: any): el is JSX.Element { +>isElement : Symbol(isElement, Decl(Element.ts, 13, 26)) +>el : Symbol(el, Decl(Element.ts, 14, 30)) +>el : Symbol(el, Decl(Element.ts, 14, 30)) +>JSX : Symbol(JSX, Decl(Element.ts, 0, 0)) +>Element : Symbol(JSX.Element, Decl(Element.ts, 1, 23)) + + return el.markAsChildOfRootElement !== undefined; +>el : Symbol(el, Decl(Element.ts, 14, 30)) +>undefined : Symbol(undefined) + } + + export function createElement(args: any[]) { +>createElement : Symbol(createElement, Decl(Element.ts, 16, 5)) +>args : Symbol(args, Decl(Element.ts, 18, 34)) + + return { + } + } +} + +export let createElement = Element.createElement; +>createElement : Symbol(createElement, Decl(Element.ts, 25, 10)) +>Element.createElement : Symbol(Element.createElement, Decl(Element.ts, 16, 5)) +>Element : Symbol(Element, Decl(Element.ts, 12, 1)) +>createElement : Symbol(Element.createElement, Decl(Element.ts, 16, 5)) + +function toCamelCase(text: string): string { +>toCamelCase : Symbol(toCamelCase, Decl(Element.ts, 25, 49)) +>text : Symbol(text, Decl(Element.ts, 27, 21)) + + return text[0].toLowerCase() + text.substring(1); +>text[0].toLowerCase : Symbol(String.toLowerCase, Decl(lib.es5.d.ts, --, --)) +>text : Symbol(text, Decl(Element.ts, 27, 21)) +>toLowerCase : Symbol(String.toLowerCase, Decl(lib.es5.d.ts, --, --)) +>text.substring : Symbol(String.substring, Decl(lib.es5.d.ts, --, --)) +>text : Symbol(text, Decl(Element.ts, 27, 21)) +>substring : Symbol(String.substring, Decl(lib.es5.d.ts, --, --)) +} + +=== tests/cases/compiler/test.tsx === +import { Element} from './Element'; +>Element : Symbol(Element, Decl(test.tsx, 0, 8)) + +let c: { +>c : Symbol(c, Decl(test.tsx, 2, 3)) + + a?: { +>a : Symbol(a, Decl(test.tsx, 2, 8)) + + b: string +>b : Symbol(b, Decl(test.tsx, 3, 6)) + } +}; + +class A { +>A : Symbol(A, Decl(test.tsx, 6, 2)) + + view() { +>view : Symbol(A.view, Decl(test.tsx, 8, 9)) + + return [ + , +>meta : Symbol(unknown) +>content : Symbol(unknown) +>meta : Symbol(unknown) + + +>meta : Symbol(unknown) +>content : Symbol(unknown) +>c.a!.b : Symbol(b, Decl(test.tsx, 3, 6)) +>c.a : Symbol(a, Decl(test.tsx, 2, 8)) +>c : Symbol(c, Decl(test.tsx, 2, 3)) +>a : Symbol(a, Decl(test.tsx, 2, 8)) +>b : Symbol(b, Decl(test.tsx, 3, 6)) +>meta : Symbol(unknown) + + ]; + } +} diff --git a/tests/baselines/reference/jsxEmitWithAttributes.types b/tests/baselines/reference/jsxEmitWithAttributes.types new file mode 100644 index 00000000000..663ba4b5bfc --- /dev/null +++ b/tests/baselines/reference/jsxEmitWithAttributes.types @@ -0,0 +1,134 @@ +=== tests/cases/compiler/Element.ts === + +declare namespace JSX { +>JSX : any + + interface Element { +>Element : Element + + name: string; +>name : string + + isIntrinsic: boolean; +>isIntrinsic : boolean + + isCustomElement: boolean; +>isCustomElement : boolean + + toString(renderId?: number): string; +>toString : (renderId?: number) => string +>renderId : number + + bindDOM(renderId?: number): number; +>bindDOM : (renderId?: number) => number +>renderId : number + + resetComponent(): void; +>resetComponent : () => void + + instantiateComponents(renderId?: number): number; +>instantiateComponents : (renderId?: number) => number +>renderId : number + + props: any; +>props : any + } +} +export namespace Element { +>Element : typeof Element + + export function isElement(el: any): el is JSX.Element { +>isElement : (el: any) => el is JSX.Element +>el : any +>el : any +>JSX : any +>Element : JSX.Element + + return el.markAsChildOfRootElement !== undefined; +>el.markAsChildOfRootElement !== undefined : boolean +>el.markAsChildOfRootElement : any +>el : any +>markAsChildOfRootElement : any +>undefined : undefined + } + + export function createElement(args: any[]) { +>createElement : (args: any[]) => {} +>args : any[] + + return { +>{ } : {} + } + } +} + +export let createElement = Element.createElement; +>createElement : (args: any[]) => {} +>Element.createElement : (args: any[]) => {} +>Element : typeof Element +>createElement : (args: any[]) => {} + +function toCamelCase(text: string): string { +>toCamelCase : (text: string) => string +>text : string + + return text[0].toLowerCase() + text.substring(1); +>text[0].toLowerCase() + text.substring(1) : string +>text[0].toLowerCase() : string +>text[0].toLowerCase : () => string +>text[0] : string +>text : string +>0 : 0 +>toLowerCase : () => string +>text.substring(1) : string +>text.substring : (start: number, end?: number) => string +>text : string +>substring : (start: number, end?: number) => string +>1 : 1 +} + +=== tests/cases/compiler/test.tsx === +import { Element} from './Element'; +>Element : typeof Element + +let c: { +>c : { a?: { b: string; }; } + + a?: { +>a : { b: string; } + + b: string +>b : string + } +}; + +class A { +>A : A + + view() { +>view : () => any[] + + return [ +>[ , ] : any[] + + , +> : any +>meta : any +>content : any +>meta : any + + +> : any +>meta : any +>content : any +>c.a!.b : string +>c.a! : { b: string; } +>c.a : { b: string; } +>c : { a?: { b: string; }; } +>a : { b: string; } +>b : string +>meta : any + + ]; + } +} diff --git a/tests/baselines/reference/library-reference-11.trace.json b/tests/baselines/reference/library-reference-11.trace.json index e0af1e39c5a..6428f421d7e 100644 --- a/tests/baselines/reference/library-reference-11.trace.json +++ b/tests/baselines/reference/library-reference-11.trace.json @@ -2,17 +2,12 @@ "======== Resolving type reference directive 'jquery', containing file '/a/b/consumer.ts', root directory not set. ========", "Root directory cannot be determined, skipping primary search paths.", "Looking up in 'node_modules' folder, initial location '/a/b'", - "File '/a/b/node_modules/jquery.ts' does not exist.", "File '/a/b/node_modules/jquery.d.ts' does not exist.", "File '/a/b/node_modules/jquery/package.json' does not exist.", - "File '/a/b/node_modules/jquery/index.ts' does not exist.", "File '/a/b/node_modules/jquery/index.d.ts' does not exist.", - "File '/a/b/node_modules/@types/jquery.ts' does not exist.", "File '/a/b/node_modules/@types/jquery.d.ts' does not exist.", "File '/a/b/node_modules/@types/jquery/package.json' does not exist.", - "File '/a/b/node_modules/@types/jquery/index.ts' does not exist.", "File '/a/b/node_modules/@types/jquery/index.d.ts' does not exist.", - "File '/a/node_modules/jquery.ts' does not exist.", "File '/a/node_modules/jquery.d.ts' does not exist.", "Found 'package.json' at '/a/node_modules/jquery/package.json'.", "'package.json' has 'typings' field 'jquery.d.ts' that references '/a/node_modules/jquery/jquery.d.ts'.", diff --git a/tests/baselines/reference/library-reference-12.trace.json b/tests/baselines/reference/library-reference-12.trace.json index 2cdf1f5f20a..37017c86f0c 100644 --- a/tests/baselines/reference/library-reference-12.trace.json +++ b/tests/baselines/reference/library-reference-12.trace.json @@ -2,17 +2,12 @@ "======== Resolving type reference directive 'jquery', containing file '/a/b/consumer.ts', root directory not set. ========", "Root directory cannot be determined, skipping primary search paths.", "Looking up in 'node_modules' folder, initial location '/a/b'", - "File '/a/b/node_modules/jquery.ts' does not exist.", "File '/a/b/node_modules/jquery.d.ts' does not exist.", "File '/a/b/node_modules/jquery/package.json' does not exist.", - "File '/a/b/node_modules/jquery/index.ts' does not exist.", "File '/a/b/node_modules/jquery/index.d.ts' does not exist.", - "File '/a/b/node_modules/@types/jquery.ts' does not exist.", "File '/a/b/node_modules/@types/jquery.d.ts' does not exist.", "File '/a/b/node_modules/@types/jquery/package.json' does not exist.", - "File '/a/b/node_modules/@types/jquery/index.ts' does not exist.", "File '/a/b/node_modules/@types/jquery/index.d.ts' does not exist.", - "File '/a/node_modules/jquery.ts' does not exist.", "File '/a/node_modules/jquery.d.ts' does not exist.", "Found 'package.json' at '/a/node_modules/jquery/package.json'.", "'package.json' has 'types' field 'dist/jquery.d.ts' that references '/a/node_modules/jquery/dist/jquery.d.ts'.", diff --git a/tests/baselines/reference/library-reference-3.trace.json b/tests/baselines/reference/library-reference-3.trace.json index 419fe6d055d..72cc8c95077 100644 --- a/tests/baselines/reference/library-reference-3.trace.json +++ b/tests/baselines/reference/library-reference-3.trace.json @@ -2,10 +2,8 @@ "======== Resolving type reference directive 'jquery', containing file '/src/consumer.ts', root directory not set. ========", "Root directory cannot be determined, skipping primary search paths.", "Looking up in 'node_modules' folder, initial location '/src'", - "File '/src/node_modules/jquery.ts' does not exist.", "File '/src/node_modules/jquery.d.ts' does not exist.", "File '/src/node_modules/jquery/package.json' does not exist.", - "File '/src/node_modules/jquery/index.ts' does not exist.", "File '/src/node_modules/jquery/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'jquery' was successfully resolved to '/src/node_modules/jquery/index.d.ts', primary: false. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-4.trace.json b/tests/baselines/reference/library-reference-4.trace.json index 5df7320d322..2a128b4fcbe 100644 --- a/tests/baselines/reference/library-reference-4.trace.json +++ b/tests/baselines/reference/library-reference-4.trace.json @@ -4,20 +4,14 @@ "File '/src/foo/package.json' does not exist.", "File '/src/foo/index.d.ts' does not exist.", "Looking up in 'node_modules' folder, initial location '/src'", - "File '/src/node_modules/foo.ts' does not exist.", "File '/src/node_modules/foo.d.ts' does not exist.", "File '/src/node_modules/foo/package.json' does not exist.", - "File '/src/node_modules/foo/index.ts' does not exist.", "File '/src/node_modules/foo/index.d.ts' does not exist.", - "File '/src/node_modules/@types/foo.ts' does not exist.", "File '/src/node_modules/@types/foo.d.ts' does not exist.", "File '/src/node_modules/@types/foo/package.json' does not exist.", - "File '/src/node_modules/@types/foo/index.ts' does not exist.", "File '/src/node_modules/@types/foo/index.d.ts' does not exist.", - "File '/node_modules/foo.ts' does not exist.", "File '/node_modules/foo.d.ts' does not exist.", "File '/node_modules/foo/package.json' does not exist.", - "File '/node_modules/foo/index.ts' does not exist.", "File '/node_modules/foo/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'foo' was successfully resolved to '/node_modules/foo/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'bar', containing file '/src/root.ts', root directory '/src'. ========", @@ -25,20 +19,14 @@ "File '/src/bar/package.json' does not exist.", "File '/src/bar/index.d.ts' does not exist.", "Looking up in 'node_modules' folder, initial location '/src'", - "File '/src/node_modules/bar.ts' does not exist.", "File '/src/node_modules/bar.d.ts' does not exist.", "File '/src/node_modules/bar/package.json' does not exist.", - "File '/src/node_modules/bar/index.ts' does not exist.", "File '/src/node_modules/bar/index.d.ts' does not exist.", - "File '/src/node_modules/@types/bar.ts' does not exist.", "File '/src/node_modules/@types/bar.d.ts' does not exist.", "File '/src/node_modules/@types/bar/package.json' does not exist.", - "File '/src/node_modules/@types/bar/index.ts' does not exist.", "File '/src/node_modules/@types/bar/index.d.ts' does not exist.", - "File '/node_modules/bar.ts' does not exist.", "File '/node_modules/bar.d.ts' does not exist.", "File '/node_modules/bar/package.json' does not exist.", - "File '/node_modules/bar/index.ts' does not exist.", "File '/node_modules/bar/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'bar' was successfully resolved to '/node_modules/bar/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'alpha', containing file '/node_modules/foo/index.d.ts', root directory '/src'. ========", @@ -46,10 +34,8 @@ "File '/src/alpha/package.json' does not exist.", "File '/src/alpha/index.d.ts' does not exist.", "Looking up in 'node_modules' folder, initial location '/node_modules/foo'", - "File '/node_modules/foo/node_modules/alpha.ts' does not exist.", "File '/node_modules/foo/node_modules/alpha.d.ts' does not exist.", "File '/node_modules/foo/node_modules/alpha/package.json' does not exist.", - "File '/node_modules/foo/node_modules/alpha/index.ts' does not exist.", "File '/node_modules/foo/node_modules/alpha/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'alpha' was successfully resolved to '/node_modules/foo/node_modules/alpha/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'alpha', containing file '/node_modules/bar/index.d.ts', root directory '/src'. ========", @@ -57,10 +43,8 @@ "File '/src/alpha/package.json' does not exist.", "File '/src/alpha/index.d.ts' does not exist.", "Looking up in 'node_modules' folder, initial location '/node_modules/bar'", - "File '/node_modules/bar/node_modules/alpha.ts' does not exist.", "File '/node_modules/bar/node_modules/alpha.d.ts' does not exist.", "File '/node_modules/bar/node_modules/alpha/package.json' does not exist.", - "File '/node_modules/bar/node_modules/alpha/index.ts' does not exist.", "File '/node_modules/bar/node_modules/alpha/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'alpha' was successfully resolved to '/node_modules/bar/node_modules/alpha/index.d.ts', primary: false. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-5.trace.json b/tests/baselines/reference/library-reference-5.trace.json index 9b8705f0323..dc9bff30b27 100644 --- a/tests/baselines/reference/library-reference-5.trace.json +++ b/tests/baselines/reference/library-reference-5.trace.json @@ -4,20 +4,14 @@ "File 'types/foo/package.json' does not exist.", "File 'types/foo/index.d.ts' does not exist.", "Looking up in 'node_modules' folder, initial location '/src'", - "File '/src/node_modules/foo.ts' does not exist.", "File '/src/node_modules/foo.d.ts' does not exist.", "File '/src/node_modules/foo/package.json' does not exist.", - "File '/src/node_modules/foo/index.ts' does not exist.", "File '/src/node_modules/foo/index.d.ts' does not exist.", - "File '/src/node_modules/@types/foo.ts' does not exist.", "File '/src/node_modules/@types/foo.d.ts' does not exist.", "File '/src/node_modules/@types/foo/package.json' does not exist.", - "File '/src/node_modules/@types/foo/index.ts' does not exist.", "File '/src/node_modules/@types/foo/index.d.ts' does not exist.", - "File '/node_modules/foo.ts' does not exist.", "File '/node_modules/foo.d.ts' does not exist.", "File '/node_modules/foo/package.json' does not exist.", - "File '/node_modules/foo/index.ts' does not exist.", "File '/node_modules/foo/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'foo' was successfully resolved to '/node_modules/foo/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'bar', containing file '/src/root.ts', root directory 'types'. ========", @@ -25,20 +19,14 @@ "File 'types/bar/package.json' does not exist.", "File 'types/bar/index.d.ts' does not exist.", "Looking up in 'node_modules' folder, initial location '/src'", - "File '/src/node_modules/bar.ts' does not exist.", "File '/src/node_modules/bar.d.ts' does not exist.", "File '/src/node_modules/bar/package.json' does not exist.", - "File '/src/node_modules/bar/index.ts' does not exist.", "File '/src/node_modules/bar/index.d.ts' does not exist.", - "File '/src/node_modules/@types/bar.ts' does not exist.", "File '/src/node_modules/@types/bar.d.ts' does not exist.", "File '/src/node_modules/@types/bar/package.json' does not exist.", - "File '/src/node_modules/@types/bar/index.ts' does not exist.", "File '/src/node_modules/@types/bar/index.d.ts' does not exist.", - "File '/node_modules/bar.ts' does not exist.", "File '/node_modules/bar.d.ts' does not exist.", "File '/node_modules/bar/package.json' does not exist.", - "File '/node_modules/bar/index.ts' does not exist.", "File '/node_modules/bar/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'bar' was successfully resolved to '/node_modules/bar/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'alpha', containing file '/node_modules/foo/index.d.ts', root directory 'types'. ========", @@ -46,10 +34,8 @@ "File 'types/alpha/package.json' does not exist.", "File 'types/alpha/index.d.ts' does not exist.", "Looking up in 'node_modules' folder, initial location '/node_modules/foo'", - "File '/node_modules/foo/node_modules/alpha.ts' does not exist.", "File '/node_modules/foo/node_modules/alpha.d.ts' does not exist.", "File '/node_modules/foo/node_modules/alpha/package.json' does not exist.", - "File '/node_modules/foo/node_modules/alpha/index.ts' does not exist.", "File '/node_modules/foo/node_modules/alpha/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'alpha' was successfully resolved to '/node_modules/foo/node_modules/alpha/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'alpha', containing file '/node_modules/bar/index.d.ts', root directory 'types'. ========", @@ -57,10 +43,8 @@ "File 'types/alpha/package.json' does not exist.", "File 'types/alpha/index.d.ts' does not exist.", "Looking up in 'node_modules' folder, initial location '/node_modules/bar'", - "File '/node_modules/bar/node_modules/alpha.ts' does not exist.", "File '/node_modules/bar/node_modules/alpha.d.ts' does not exist.", "File '/node_modules/bar/node_modules/alpha/package.json' does not exist.", - "File '/node_modules/bar/node_modules/alpha/index.ts' does not exist.", "File '/node_modules/bar/node_modules/alpha/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'alpha' was successfully resolved to '/node_modules/bar/node_modules/alpha/index.d.ts', primary: false. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-7.trace.json b/tests/baselines/reference/library-reference-7.trace.json index 419fe6d055d..72cc8c95077 100644 --- a/tests/baselines/reference/library-reference-7.trace.json +++ b/tests/baselines/reference/library-reference-7.trace.json @@ -2,10 +2,8 @@ "======== Resolving type reference directive 'jquery', containing file '/src/consumer.ts', root directory not set. ========", "Root directory cannot be determined, skipping primary search paths.", "Looking up in 'node_modules' folder, initial location '/src'", - "File '/src/node_modules/jquery.ts' does not exist.", "File '/src/node_modules/jquery.d.ts' does not exist.", "File '/src/node_modules/jquery/package.json' does not exist.", - "File '/src/node_modules/jquery/index.ts' does not exist.", "File '/src/node_modules/jquery/index.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'jquery' was successfully resolved to '/src/node_modules/jquery/index.d.ts', primary: false. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/localImportNameVsGlobalName.js b/tests/baselines/reference/localImportNameVsGlobalName.js index 45ecdc4745e..916bdcc2960 100644 --- a/tests/baselines/reference/localImportNameVsGlobalName.js +++ b/tests/baselines/reference/localImportNameVsGlobalName.js @@ -16,13 +16,13 @@ module App { //// [localImportNameVsGlobalName.js] var Keyboard; (function (Keyboard) { + var Key; (function (Key) { Key[Key["UP"] = 0] = "UP"; Key[Key["DOWN"] = 1] = "DOWN"; Key[Key["LEFT"] = 2] = "LEFT"; Key[Key["RIGHT"] = 3] = "RIGHT"; - })(Keyboard.Key || (Keyboard.Key = {})); - var Key = Keyboard.Key; + })(Key = Keyboard.Key || (Keyboard.Key = {})); })(Keyboard || (Keyboard = {})); var App; (function (App) { diff --git a/tests/baselines/reference/localRequireFunction.js b/tests/baselines/reference/localRequireFunction.js new file mode 100644 index 00000000000..1ae20821a07 --- /dev/null +++ b/tests/baselines/reference/localRequireFunction.js @@ -0,0 +1,15 @@ +//// [app.js] + +function require(a) { + return a; +} + +const fs = require("fs"); +const text = fs.readFileSync("/a/b/c"); + +//// [app.js] +function require(a) { + return a; +} +var fs = require("fs"); +var text = fs.readFileSync("/a/b/c"); diff --git a/tests/baselines/reference/localRequireFunction.symbols b/tests/baselines/reference/localRequireFunction.symbols new file mode 100644 index 00000000000..b977328f0ef --- /dev/null +++ b/tests/baselines/reference/localRequireFunction.symbols @@ -0,0 +1,18 @@ +=== tests/cases/compiler/app.js === + +function require(a) { +>require : Symbol(require, Decl(app.js, 0, 0)) +>a : Symbol(a, Decl(app.js, 1, 17)) + + return a; +>a : Symbol(a, Decl(app.js, 1, 17)) +} + +const fs = require("fs"); +>fs : Symbol(fs, Decl(app.js, 5, 5)) +>require : Symbol(require, Decl(app.js, 0, 0)) + +const text = fs.readFileSync("/a/b/c"); +>text : Symbol(text, Decl(app.js, 6, 5)) +>fs : Symbol(fs, Decl(app.js, 5, 5)) + diff --git a/tests/baselines/reference/localRequireFunction.types b/tests/baselines/reference/localRequireFunction.types new file mode 100644 index 00000000000..4b5c7578cd9 --- /dev/null +++ b/tests/baselines/reference/localRequireFunction.types @@ -0,0 +1,24 @@ +=== tests/cases/compiler/app.js === + +function require(a) { +>require : (a: any) => any +>a : any + + return a; +>a : any +} + +const fs = require("fs"); +>fs : any +>require("fs") : any +>require : (a: any) => any +>"fs" : "fs" + +const text = fs.readFileSync("/a/b/c"); +>text : any +>fs.readFileSync("/a/b/c") : any +>fs.readFileSync : any +>fs : any +>readFileSync : any +>"/a/b/c" : "/a/b/c" + diff --git a/tests/baselines/reference/maxNodeModuleJsDepthDefaultsToZero.trace.json b/tests/baselines/reference/maxNodeModuleJsDepthDefaultsToZero.trace.json index e53b2a0934f..3a9d8c4ea79 100644 --- a/tests/baselines/reference/maxNodeModuleJsDepthDefaultsToZero.trace.json +++ b/tests/baselines/reference/maxNodeModuleJsDepthDefaultsToZero.trace.json @@ -5,24 +5,22 @@ "File '/node_modules/shortid.ts' does not exist.", "File '/node_modules/shortid.tsx' does not exist.", "File '/node_modules/shortid.d.ts' does not exist.", - "File '/node_modules/shortid.js' does not exist.", - "File '/node_modules/shortid.jsx' does not exist.", "File '/node_modules/shortid/package.json' does not exist.", "File '/node_modules/shortid/index.ts' does not exist.", "File '/node_modules/shortid/index.tsx' does not exist.", "File '/node_modules/shortid/index.d.ts' does not exist.", - "File '/node_modules/shortid/index.js' exist - use it as a name resolution result.", "File '/node_modules/@types/shortid.ts' does not exist.", "File '/node_modules/@types/shortid.tsx' does not exist.", "File '/node_modules/@types/shortid.d.ts' does not exist.", - "File '/node_modules/@types/shortid.js' does not exist.", - "File '/node_modules/@types/shortid.jsx' does not exist.", "File '/node_modules/@types/shortid/package.json' does not exist.", "File '/node_modules/@types/shortid/index.ts' does not exist.", "File '/node_modules/@types/shortid/index.tsx' does not exist.", "File '/node_modules/@types/shortid/index.d.ts' does not exist.", - "File '/node_modules/@types/shortid/index.js' does not exist.", - "File '/node_modules/@types/shortid/index.jsx' does not exist.", + "Loading module 'shortid' from 'node_modules' folder.", + "File '/node_modules/shortid.js' does not exist.", + "File '/node_modules/shortid.jsx' does not exist.", + "File '/node_modules/shortid/package.json' does not exist.", + "File '/node_modules/shortid/index.js' exist - use it as a name resolution result.", "Resolving real path for '/node_modules/shortid/index.js', result '/node_modules/shortid/index.js'", "======== Module name 'shortid' was successfully resolved to '/node_modules/shortid/index.js'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/mergeWithImportedType.js b/tests/baselines/reference/mergeWithImportedType.js index 89fc353d395..e8dc5a3c2f3 100644 --- a/tests/baselines/reference/mergeWithImportedType.js +++ b/tests/baselines/reference/mergeWithImportedType.js @@ -10,9 +10,9 @@ export type E = E; //// [f1.js] "use strict"; +var E; (function (E) { E[E["X"] = 0] = "X"; -})(exports.E || (exports.E = {})); -var E = exports.E; +})(E = exports.E || (exports.E = {})); //// [f2.js] "use strict"; diff --git a/tests/baselines/reference/mergedDeclarations3.js b/tests/baselines/reference/mergedDeclarations3.js index ddf94b46e81..d3b4e8fc9d5 100644 --- a/tests/baselines/reference/mergedDeclarations3.js +++ b/tests/baselines/reference/mergedDeclarations3.js @@ -42,11 +42,11 @@ M.foo.z // error //// [mergedDeclarations3.js] var M; (function (M) { + var Color; (function (Color) { Color[Color["Red"] = 0] = "Red"; Color[Color["Green"] = 1] = "Green"; - })(M.Color || (M.Color = {})); - var Color = M.Color; + })(Color = M.Color || (M.Color = {})); })(M || (M = {})); (function (M) { var Color; diff --git a/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js b/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js index 11a4773d63a..8891dbf61e2 100644 --- a/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js +++ b/tests/baselines/reference/mergedModuleDeclarationCodeGen5.js @@ -45,9 +45,9 @@ var M; return fudge; }()); plop_1.fudge = fudge; + var plop; (function (plop) { - })(plop_1.plop || (plop_1.plop = {})); - var plop = plop_1.plop; + })(plop = plop_1.plop || (plop_1.plop = {})); // Emit these references as follows var v1 = gunk; // gunk var v2 = buz; // buz diff --git a/tests/baselines/reference/moduleCodeGenTest5.js b/tests/baselines/reference/moduleCodeGenTest5.js index fa09b432ab7..6a7113c0368 100644 --- a/tests/baselines/reference/moduleCodeGenTest5.js +++ b/tests/baselines/reference/moduleCodeGenTest5.js @@ -43,10 +43,10 @@ var C2 = (function () { C2.prototype.p2 = function () { }; return C2; }()); +var E1; (function (E1) { E1[E1["A"] = 0] = "A"; -})(exports.E1 || (exports.E1 = {})); -var E1 = exports.E1; +})(E1 = exports.E1 || (exports.E1 = {})); var u = E1.A; var E2; (function (E2) { diff --git a/tests/baselines/reference/moduleDuplicateIdentifiers.js b/tests/baselines/reference/moduleDuplicateIdentifiers.js index 097192ac73c..64b82f82500 100644 --- a/tests/baselines/reference/moduleDuplicateIdentifiers.js +++ b/tests/baselines/reference/moduleDuplicateIdentifiers.js @@ -67,12 +67,12 @@ var Kettle = (function () { exports.Kettle = Kettle; exports.Pot = 2; exports.Pot = 42; // Shouldn't error +var Utensils; (function (Utensils) { Utensils[Utensils["Spoon"] = 0] = "Spoon"; Utensils[Utensils["Fork"] = 1] = "Fork"; Utensils[Utensils["Knife"] = 2] = "Knife"; -})(exports.Utensils || (exports.Utensils = {})); -var Utensils = exports.Utensils; +})(Utensils = exports.Utensils || (exports.Utensils = {})); (function (Utensils) { Utensils[Utensils["Spork"] = 3] = "Spork"; -})(exports.Utensils || (exports.Utensils = {})); +})(Utensils = exports.Utensils || (exports.Utensils = {})); diff --git a/tests/baselines/reference/moduleElementsInWrongContext3.js b/tests/baselines/reference/moduleElementsInWrongContext3.js index 76220eab251..851ad654494 100644 --- a/tests/baselines/reference/moduleElementsInWrongContext3.js +++ b/tests/baselines/reference/moduleElementsInWrongContext3.js @@ -47,9 +47,8 @@ var P; } return C; }()); - P.C = C; - function bee() { } - P.bee = bee; + export default C; + export function bee() { } import I2 = require("foo"); import * as Foo from "ambient"; import bar from "ambient"; diff --git a/tests/baselines/reference/moduleResolutionNoTs.js b/tests/baselines/reference/moduleResolutionNoTs.js index 9ff33d688ea..a17f108d872 100644 --- a/tests/baselines/reference/moduleResolutionNoTs.js +++ b/tests/baselines/reference/moduleResolutionNoTs.js @@ -25,7 +25,7 @@ import z2 from "./z"; "use strict"; exports.__esModule = true; exports["default"] = 0; -//// [y.js] +//// [y.jsx] "use strict"; exports.__esModule = true; exports["default"] = 0; diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.errors.txt b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.errors.txt new file mode 100644 index 00000000000..aa415a95b1b --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.errors.txt @@ -0,0 +1,23 @@ +/a.ts(1,17): error TS6142: Module './tsx' was resolved to '/tsx.tsx', but '--jsx' is not set. +/a.ts(2,17): error TS6142: Module './jsx' was resolved to '/jsx.jsx', but '--jsx' is not set. +/a.ts(3,16): error TS6143: Module './js' was resolved to '/js.js', but '--allowJs' is not set. + + +==== /a.ts (3 errors) ==== + import tsx from "./tsx"; + ~~~~~~~ +!!! error TS6142: Module './tsx' was resolved to '/tsx.tsx', but '--jsx' is not set. + import jsx from "./jsx"; + ~~~~~~~ +!!! error TS6142: Module './jsx' was resolved to '/jsx.jsx', but '--jsx' is not set. + import js from "./js"; + ~~~~~~ +!!! error TS6143: Module './js' was resolved to '/js.js', but '--allowJs' is not set. + +==== /tsx.tsx (0 errors) ==== + + +==== /jsx.jsx (0 errors) ==== + +==== /js.js (0 errors) ==== + \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.js b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.js new file mode 100644 index 00000000000..2e5297bdf65 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.js @@ -0,0 +1,17 @@ +//// [tests/cases/compiler/moduleResolutionWithExtensions_notSupported.ts] //// + +//// [tsx.tsx] + + +//// [jsx.jsx] + +//// [js.js] + +//// [a.ts] +import tsx from "./tsx"; +import jsx from "./jsx"; +import js from "./js"; + + +//// [a.js] +"use strict"; diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.trace.json new file mode 100644 index 00000000000..0073abaca3a --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported.trace.json @@ -0,0 +1,38 @@ +[ + "======== Resolving module './tsx' from '/a.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "Loading module as file / folder, candidate module location '/tsx'.", + "File '/tsx.ts' does not exist.", + "File '/tsx.tsx' exist - use it as a name resolution result.", + "Resolving real path for '/tsx.tsx', result '/tsx.tsx'", + "======== Module name './tsx' was successfully resolved to '/tsx.tsx'. ========", + "======== Resolving module './jsx' from '/a.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "Loading module as file / folder, candidate module location '/jsx'.", + "File '/jsx.ts' does not exist.", + "File '/jsx.tsx' does not exist.", + "File '/jsx.d.ts' does not exist.", + "File '/jsx/package.json' does not exist.", + "File '/jsx/index.ts' does not exist.", + "File '/jsx/index.tsx' does not exist.", + "File '/jsx/index.d.ts' does not exist.", + "Loading module as file / folder, candidate module location '/jsx'.", + "File '/jsx.js' does not exist.", + "File '/jsx.jsx' exist - use it as a name resolution result.", + "Resolving real path for '/jsx.jsx', result '/jsx.jsx'", + "======== Module name './jsx' was successfully resolved to '/jsx.jsx'. ========", + "======== Resolving module './js' from '/a.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "Loading module as file / folder, candidate module location '/js'.", + "File '/js.ts' does not exist.", + "File '/js.tsx' does not exist.", + "File '/js.d.ts' does not exist.", + "File '/js/package.json' does not exist.", + "File '/js/index.ts' does not exist.", + "File '/js/index.tsx' does not exist.", + "File '/js/index.d.ts' does not exist.", + "Loading module as file / folder, candidate module location '/js'.", + "File '/js.js' exist - use it as a name resolution result.", + "Resolving real path for '/js.js', result '/js.js'", + "======== Module name './js' was successfully resolved to '/js.js'. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.errors.txt b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.errors.txt new file mode 100644 index 00000000000..bb8a0664ed6 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.errors.txt @@ -0,0 +1,12 @@ +/a.ts(1,17): error TS6142: Module './jsx' was resolved to '/jsx.jsx', but '--jsx' is not set. + + +==== /a.ts (1 errors) ==== + import jsx from "./jsx"; + ~~~~~~~ +!!! error TS6142: Module './jsx' was resolved to '/jsx.jsx', but '--jsx' is not set. + +==== /jsx.jsx (0 errors) ==== + // Test the error message if we have `--allowJs` but not `--jsx`. + + \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.js b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.js new file mode 100644 index 00000000000..c340f65f251 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.js @@ -0,0 +1,12 @@ +//// [tests/cases/compiler/moduleResolutionWithExtensions_notSupported2.ts] //// + +//// [jsx.jsx] +// Test the error message if we have `--allowJs` but not `--jsx`. + + +//// [a.ts] +import jsx from "./jsx"; + + +//// [a.js] +"use strict"; diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.trace.json new file mode 100644 index 00000000000..c366843ce86 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported2.trace.json @@ -0,0 +1,17 @@ +[ + "======== Resolving module './jsx' from '/a.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "Loading module as file / folder, candidate module location '/jsx'.", + "File '/jsx.ts' does not exist.", + "File '/jsx.tsx' does not exist.", + "File '/jsx.d.ts' does not exist.", + "File '/jsx/package.json' does not exist.", + "File '/jsx/index.ts' does not exist.", + "File '/jsx/index.tsx' does not exist.", + "File '/jsx/index.d.ts' does not exist.", + "Loading module as file / folder, candidate module location '/jsx'.", + "File '/jsx.js' does not exist.", + "File '/jsx.jsx' exist - use it as a name resolution result.", + "Resolving real path for '/jsx.jsx', result '/jsx.jsx'", + "======== Module name './jsx' was successfully resolved to '/jsx.jsx'. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported3.errors.txt b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported3.errors.txt new file mode 100644 index 00000000000..45e058bae54 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported3.errors.txt @@ -0,0 +1,12 @@ +/a.ts(1,17): error TS6143: Module './jsx' was resolved to '/jsx.jsx', but '--allowJs' is not set. + + +==== /a.ts (1 errors) ==== + import jsx from "./jsx"; + ~~~~~~~ +!!! error TS6143: Module './jsx' was resolved to '/jsx.jsx', but '--allowJs' is not set. + +==== /jsx.jsx (0 errors) ==== + // Test the error message if we have `--jsx` but not `--allowJw`. + + \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported3.js b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported3.js new file mode 100644 index 00000000000..f362701bbda --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported3.js @@ -0,0 +1,12 @@ +//// [tests/cases/compiler/moduleResolutionWithExtensions_notSupported3.ts] //// + +//// [jsx.jsx] +// Test the error message if we have `--jsx` but not `--allowJw`. + + +//// [a.ts] +import jsx from "./jsx"; + + +//// [a.js] +"use strict"; diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_notSupported3.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported3.trace.json new file mode 100644 index 00000000000..c366843ce86 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_notSupported3.trace.json @@ -0,0 +1,17 @@ +[ + "======== Resolving module './jsx' from '/a.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "Loading module as file / folder, candidate module location '/jsx'.", + "File '/jsx.ts' does not exist.", + "File '/jsx.tsx' does not exist.", + "File '/jsx.d.ts' does not exist.", + "File '/jsx/package.json' does not exist.", + "File '/jsx/index.ts' does not exist.", + "File '/jsx/index.tsx' does not exist.", + "File '/jsx/index.d.ts' does not exist.", + "Loading module as file / folder, candidate module location '/jsx'.", + "File '/jsx.js' does not exist.", + "File '/jsx.jsx' exist - use it as a name resolution result.", + "Resolving real path for '/jsx.jsx', result '/jsx.jsx'", + "======== Module name './jsx' was successfully resolved to '/jsx.jsx'. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.js b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.js new file mode 100644 index 00000000000..177321c7d08 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.js @@ -0,0 +1,18 @@ +//// [tests/cases/compiler/moduleResolutionWithExtensions_preferTs.ts] //// + +//// [b.js] + + +//// [index.ts] +export default 0; + +//// [a.ts] +import b from "./b"; + + +//// [index.js] +"use strict"; +exports.__esModule = true; +exports["default"] = 0; +//// [a.js] +"use strict"; diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.symbols b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.symbols new file mode 100644 index 00000000000..af9dc4154d4 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.symbols @@ -0,0 +1,8 @@ +=== /a.ts === +import b from "./b"; +>b : Symbol(b, Decl(a.ts, 0, 6)) + +=== /b/index.ts === +export default 0; +No type information for this code. +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.trace.json new file mode 100644 index 00000000000..292472c710c --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.trace.json @@ -0,0 +1,12 @@ +[ + "======== Resolving module './b' from '/a.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "Loading module as file / folder, candidate module location '/b'.", + "File '/b.ts' does not exist.", + "File '/b.tsx' does not exist.", + "File '/b.d.ts' does not exist.", + "File '/b/package.json' does not exist.", + "File '/b/index.ts' exist - use it as a name resolution result.", + "Resolving real path for '/b/index.ts', result '/b/index.ts'", + "======== Module name './b' was successfully resolved to '/b/index.ts'. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.types b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.types new file mode 100644 index 00000000000..0e418c5dc14 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_preferTs.types @@ -0,0 +1,8 @@ +=== /a.ts === +import b from "./b"; +>b : 0 + +=== /b/index.ts === +export default 0; +No type information for this code. +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.js b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.js new file mode 100644 index 00000000000..51d476338c0 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.js @@ -0,0 +1,18 @@ +//// [tests/cases/compiler/moduleResolutionWithExtensions_withAmbientPresent.ts] //// + +//// [index.js] +// Allowjs is false, but this should *not* warn about the unused 'index.js' + + +//// [declarations.d.ts] +declare module "js" { + export const x = 0; +} + +//// [a.ts] +/// +import { x } from "js"; + + +//// [a.js] +"use strict"; diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.symbols b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.symbols new file mode 100644 index 00000000000..1259c83ccde --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.symbols @@ -0,0 +1,11 @@ +=== /a.ts === +/// +import { x } from "js"; +>x : Symbol(x, Decl(a.ts, 1, 8)) + +=== /declarations.d.ts === +declare module "js" { + export const x = 0; +>x : Symbol(x, Decl(declarations.d.ts, 1, 16)) +} + diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.trace.json new file mode 100644 index 00000000000..9c6d96fc190 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.trace.json @@ -0,0 +1,26 @@ +[ + "======== Resolving module 'js' from '/a.ts'. ========", + "Module resolution kind is not specified, using 'NodeJs'.", + "Loading module 'js' from 'node_modules' folder.", + "File '/node_modules/js.ts' does not exist.", + "File '/node_modules/js.tsx' does not exist.", + "File '/node_modules/js.d.ts' does not exist.", + "File '/node_modules/js/package.json' does not exist.", + "File '/node_modules/js/index.ts' does not exist.", + "File '/node_modules/js/index.tsx' does not exist.", + "File '/node_modules/js/index.d.ts' does not exist.", + "File '/node_modules/@types/js.ts' does not exist.", + "File '/node_modules/@types/js.tsx' does not exist.", + "File '/node_modules/@types/js.d.ts' does not exist.", + "File '/node_modules/@types/js/package.json' does not exist.", + "File '/node_modules/@types/js/index.ts' does not exist.", + "File '/node_modules/@types/js/index.tsx' does not exist.", + "File '/node_modules/@types/js/index.d.ts' does not exist.", + "Loading module 'js' from 'node_modules' folder.", + "File '/node_modules/js.js' does not exist.", + "File '/node_modules/js.jsx' does not exist.", + "File '/node_modules/js/package.json' does not exist.", + "File '/node_modules/js/index.js' exist - use it as a name resolution result.", + "Resolving real path for '/node_modules/js/index.js', result '/node_modules/js/index.js'", + "======== Module name 'js' was successfully resolved to '/node_modules/js/index.js'. ========" +] \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.types b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.types new file mode 100644 index 00000000000..1e5af4e7579 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.types @@ -0,0 +1,12 @@ +=== /a.ts === +/// +import { x } from "js"; +>x : 0 + +=== /declarations.d.ts === +declare module "js" { + export const x = 0; +>x : 0 +>0 : 0 +} + diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks.errors.txt b/tests/baselines/reference/moduleResolutionWithSymlinks.errors.txt deleted file mode 100644 index b51933902a4..00000000000 --- a/tests/baselines/reference/moduleResolutionWithSymlinks.errors.txt +++ /dev/null @@ -1,21 +0,0 @@ -/src/library-b/index.ts(1,23): error TS2307: Cannot find module 'library-a'. - - -==== /src/app.ts (0 errors) ==== - import { MyClass } from "./library-a"; - import { MyClass2 } from "./library-b"; - - let x: MyClass; - let y: MyClass2; - x = y; - y = x; -==== /src/library-a/index.ts (0 errors) ==== - - export class MyClass{} - -==== /src/library-b/index.ts (1 errors) ==== - import {MyClass} from "library-a"; - ~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'library-a'. - export { MyClass as MyClass2 } - \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks.js b/tests/baselines/reference/moduleResolutionWithSymlinks.js index 4123430045e..fa6fea5520b 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks.js +++ b/tests/baselines/reference/moduleResolutionWithSymlinks.js @@ -2,7 +2,7 @@ //// [index.ts] -export class MyClass{} +export class MyClass { private x: number; } //// [index.ts] import {MyClass} from "library-a"; diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks.symbols b/tests/baselines/reference/moduleResolutionWithSymlinks.symbols new file mode 100644 index 00000000000..9e9e3ee8a67 --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithSymlinks.symbols @@ -0,0 +1,37 @@ +=== /src/app.ts === +import { MyClass } from "./library-a"; +>MyClass : Symbol(MyClass, Decl(app.ts, 0, 8)) + +import { MyClass2 } from "./library-b"; +>MyClass2 : Symbol(MyClass2, Decl(app.ts, 1, 8)) + +let x: MyClass; +>x : Symbol(x, Decl(app.ts, 3, 3)) +>MyClass : Symbol(MyClass, Decl(app.ts, 0, 8)) + +let y: MyClass2; +>y : Symbol(y, Decl(app.ts, 4, 3)) +>MyClass2 : Symbol(MyClass2, Decl(app.ts, 1, 8)) + +x = y; +>x : Symbol(x, Decl(app.ts, 3, 3)) +>y : Symbol(y, Decl(app.ts, 4, 3)) + +y = x; +>y : Symbol(y, Decl(app.ts, 4, 3)) +>x : Symbol(x, Decl(app.ts, 3, 3)) + +=== /src/library-a/index.ts === + +export class MyClass { private x: number; } +>MyClass : Symbol(MyClass, Decl(index.ts, 0, 0)) +>x : Symbol(MyClass.x, Decl(index.ts, 1, 22)) + +=== /src/library-b/index.ts === +import {MyClass} from "library-a"; +>MyClass : Symbol(MyClass, Decl(index.ts, 0, 8)) + +export { MyClass as MyClass2 } +>MyClass : Symbol(MyClass2, Decl(index.ts, 1, 8)) +>MyClass2 : Symbol(MyClass2, Decl(index.ts, 1, 8)) + diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks.trace.json b/tests/baselines/reference/moduleResolutionWithSymlinks.trace.json index f3bfae4b173..7f1c2890180 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks.trace.json +++ b/tests/baselines/reference/moduleResolutionWithSymlinks.trace.json @@ -26,43 +26,7 @@ "File '/src/library-b/node_modules/library-a.tsx' does not exist.", "File '/src/library-b/node_modules/library-a.d.ts' does not exist.", "File '/src/library-b/node_modules/library-a/package.json' does not exist.", - "File '/src/library-b/node_modules/library-a/index.ts' does not exist.", - "File '/src/library-b/node_modules/library-a/index.tsx' does not exist.", - "File '/src/library-b/node_modules/library-a/index.d.ts' does not exist.", - "File '/src/library-b/node_modules/@types/library-a.ts' does not exist.", - "File '/src/library-b/node_modules/@types/library-a.tsx' does not exist.", - "File '/src/library-b/node_modules/@types/library-a.d.ts' does not exist.", - "File '/src/library-b/node_modules/@types/library-a/package.json' does not exist.", - "File '/src/library-b/node_modules/@types/library-a/index.ts' does not exist.", - "File '/src/library-b/node_modules/@types/library-a/index.tsx' does not exist.", - "File '/src/library-b/node_modules/@types/library-a/index.d.ts' does not exist.", - "File '/src/node_modules/library-a.ts' does not exist.", - "File '/src/node_modules/library-a.tsx' does not exist.", - "File '/src/node_modules/library-a.d.ts' does not exist.", - "File '/src/node_modules/library-a/package.json' does not exist.", - "File '/src/node_modules/library-a/index.ts' does not exist.", - "File '/src/node_modules/library-a/index.tsx' does not exist.", - "File '/src/node_modules/library-a/index.d.ts' does not exist.", - "File '/src/node_modules/@types/library-a.ts' does not exist.", - "File '/src/node_modules/@types/library-a.tsx' does not exist.", - "File '/src/node_modules/@types/library-a.d.ts' does not exist.", - "File '/src/node_modules/@types/library-a/package.json' does not exist.", - "File '/src/node_modules/@types/library-a/index.ts' does not exist.", - "File '/src/node_modules/@types/library-a/index.tsx' does not exist.", - "File '/src/node_modules/@types/library-a/index.d.ts' does not exist.", - "File '/node_modules/library-a.ts' does not exist.", - "File '/node_modules/library-a.tsx' does not exist.", - "File '/node_modules/library-a.d.ts' does not exist.", - "File '/node_modules/library-a/package.json' does not exist.", - "File '/node_modules/library-a/index.ts' does not exist.", - "File '/node_modules/library-a/index.tsx' does not exist.", - "File '/node_modules/library-a/index.d.ts' does not exist.", - "File '/node_modules/@types/library-a.ts' does not exist.", - "File '/node_modules/@types/library-a.tsx' does not exist.", - "File '/node_modules/@types/library-a.d.ts' does not exist.", - "File '/node_modules/@types/library-a/package.json' does not exist.", - "File '/node_modules/@types/library-a/index.ts' does not exist.", - "File '/node_modules/@types/library-a/index.tsx' does not exist.", - "File '/node_modules/@types/library-a/index.d.ts' does not exist.", - "======== Module name 'library-a' was not resolved. ========" + "File '/src/library-b/node_modules/library-a/index.ts' exist - use it as a name resolution result.", + "Resolving real path for '/src/library-b/node_modules/library-a/index.ts', result '/src/library-a/index.ts'", + "======== Module name 'library-a' was successfully resolved to '/src/library-a/index.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks.types b/tests/baselines/reference/moduleResolutionWithSymlinks.types new file mode 100644 index 00000000000..3c0ccd168dd --- /dev/null +++ b/tests/baselines/reference/moduleResolutionWithSymlinks.types @@ -0,0 +1,39 @@ +=== /src/app.ts === +import { MyClass } from "./library-a"; +>MyClass : typeof MyClass + +import { MyClass2 } from "./library-b"; +>MyClass2 : typeof MyClass + +let x: MyClass; +>x : MyClass +>MyClass : MyClass + +let y: MyClass2; +>y : MyClass +>MyClass2 : MyClass + +x = y; +>x = y : MyClass +>x : MyClass +>y : MyClass + +y = x; +>y = x : MyClass +>y : MyClass +>x : MyClass + +=== /src/library-a/index.ts === + +export class MyClass { private x: number; } +>MyClass : MyClass +>x : number + +=== /src/library-b/index.ts === +import {MyClass} from "library-a"; +>MyClass : typeof MyClass + +export { MyClass as MyClass2 } +>MyClass : typeof MyClass +>MyClass2 : typeof MyClass + diff --git a/tests/baselines/reference/moduleSameValueDuplicateExportedBindings2.js b/tests/baselines/reference/moduleSameValueDuplicateExportedBindings2.js index 99a09af149a..208e90c69d8 100644 --- a/tests/baselines/reference/moduleSameValueDuplicateExportedBindings2.js +++ b/tests/baselines/reference/moduleSameValueDuplicateExportedBindings2.js @@ -15,11 +15,11 @@ export enum Animals { //// [c.js] "use strict"; +var Animals; (function (Animals) { Animals[Animals["Cat"] = 0] = "Cat"; Animals[Animals["Dog"] = 1] = "Dog"; -})(exports.Animals || (exports.Animals = {})); -var Animals = exports.Animals; +})(Animals = exports.Animals || (exports.Animals = {})); ; //// [b.js] "use strict"; diff --git a/tests/baselines/reference/moduleVisibilityTest1.js b/tests/baselines/reference/moduleVisibilityTest1.js index 52afcf169d9..537ec23b393 100644 --- a/tests/baselines/reference/moduleVisibilityTest1.js +++ b/tests/baselines/reference/moduleVisibilityTest1.js @@ -86,12 +86,12 @@ var M; function someExportedInnerFunc() { return -2; } InnerMod.someExportedInnerFunc = someExportedInnerFunc; })(InnerMod = M.InnerMod || (M.InnerMod = {})); + var E; (function (E) { E[E["A"] = 0] = "A"; E[E["B"] = 1] = "B"; E[E["C"] = 2] = "C"; - })(M.E || (M.E = {})); - var E = M.E; + })(E = M.E || (M.E = {})); M.x = 5; var y = M.x + M.x; var B = (function () { diff --git a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js index 1558ef742ab..4243c9849cf 100644 --- a/tests/baselines/reference/moduleWithStatementsOfEveryKind.js +++ b/tests/baselines/reference/moduleWithStatementsOfEveryKind.js @@ -151,11 +151,11 @@ var Y; return A; }()); })(Module = Y.Module || (Y.Module = {})); + var Color; (function (Color) { Color[Color["Blue"] = 0] = "Blue"; Color[Color["Red"] = 1] = "Red"; - })(Y.Color || (Y.Color = {})); - var Color = Y.Color; + })(Color = Y.Color || (Y.Color = {})); Y.x = 12; function F(s) { return 2; diff --git a/tests/baselines/reference/nameCollision.js b/tests/baselines/reference/nameCollision.js index e51bd5e7c69..bb4f4a092f9 100644 --- a/tests/baselines/reference/nameCollision.js +++ b/tests/baselines/reference/nameCollision.js @@ -85,11 +85,11 @@ var Y; (function (Y_2) { var Y; (function (Y_3) { + var Y; (function (Y) { Y[Y["Red"] = 0] = "Red"; Y[Y["Blue"] = 1] = "Blue"; - })(Y_3.Y || (Y_3.Y = {})); - var Y = Y_3.Y; + })(Y = Y_3.Y || (Y_3.Y = {})); })(Y = Y_2.Y || (Y_2.Y = {})); })(Y || (Y = {})); // no collision, since interface doesn't diff --git a/tests/baselines/reference/outFilerootDirModuleNamesSystem.js b/tests/baselines/reference/outFilerootDirModuleNamesSystem.js index 6754f3ef89a..efc49f90209 100644 --- a/tests/baselines/reference/outFilerootDirModuleNamesSystem.js +++ b/tests/baselines/reference/outFilerootDirModuleNamesSystem.js @@ -15,8 +15,8 @@ System.register("b", ["a"], function (exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; function foo() { new a_1.default(); } - var a_1; exports_1("default", foo); + var a_1; return { setters: [ function (a_1_1) { diff --git a/tests/baselines/reference/outModuleConcatAmd.js.map b/tests/baselines/reference/outModuleConcatAmd.js.map index e987d5deb8a..9187aca0646 100644 --- a/tests/baselines/reference/outModuleConcatAmd.js.map +++ b/tests/baselines/reference/outModuleConcatAmd.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;IACA;QAAA;QAAiB,CAAC;QAAD,QAAC;IAAD,CAAC,AAAlB,IAAkB;IAAlB,cAAkB;;;;ICAlB;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAA5B,cAA4B"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;;;IACA;QAAA;QAAiB,CAAC;QAAD,QAAC;IAAD,CAAC,AAAlB,IAAkB;IAAL,cAAC;;;;ICAd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt index 1bfda049776..34ab74816ad 100644 --- a/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt +++ b/tests/baselines/reference/outModuleConcatAmd.sourcemap.txt @@ -64,9 +64,9 @@ sourceFile:tests/cases/compiler/ref/a.ts 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> -2 > export class A { } -1->Emitted(13, 5) Source(2, 1) + SourceIndex(0) -2 >Emitted(13, 19) Source(2, 19) + SourceIndex(0) +2 > A +1->Emitted(13, 5) Source(2, 14) + SourceIndex(0) +2 >Emitted(13, 19) Source(2, 15) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:all.js @@ -139,9 +139,9 @@ sourceFile:tests/cases/compiler/b.ts 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> -2 > export class B extends A { } -1->Emitted(24, 5) Source(2, 1) + SourceIndex(1) -2 >Emitted(24, 19) Source(2, 29) + SourceIndex(1) +2 > B +1->Emitted(24, 5) Source(2, 14) + SourceIndex(1) +2 >Emitted(24, 19) Source(2, 15) + SourceIndex(1) --- >>>}); >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.js.map b/tests/baselines/reference/outModuleTripleSlashRefs.js.map index 45d57990450..5ccc59aeabf 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.js.map +++ b/tests/baselines/reference/outModuleTripleSlashRefs.js.map @@ -1,2 +1,2 @@ //// [all.js.map] -{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/b.ts","tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;AAAA,iCAAiC;AACjC;IAAA;IAEA,CAAC;IAAD,UAAC;AAAD,CAAC,AAFD,IAEC;;;ICFD,+BAA+B;IAC/B;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IAFD,cAEC;;;;ICHD;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAA5B,cAA4B"} \ No newline at end of file +{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/b.ts","tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":[],"mappings":";;;;;AAAA,iCAAiC;AACjC;IAAA;IAEA,CAAC;IAAD,UAAC;AAAD,CAAC,AAFD,IAEC;;;ICFD,+BAA+B;IAC/B;QAAA;QAEA,CAAC;QAAD,QAAC;IAAD,CAAC,AAFD,IAEC;IAFY,cAAC;;;;ICDd;QAAuB,qBAAC;QAAxB;;QAA2B,CAAC;QAAD,QAAC;IAAD,CAAC,AAA5B,CAAuB,KAAC,GAAI;IAAf,cAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt index 482c898e0cb..ce41bae6de3 100644 --- a/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt +++ b/tests/baselines/reference/outModuleTripleSlashRefs.sourcemap.txt @@ -138,11 +138,9 @@ sourceFile:tests/cases/compiler/ref/a.ts 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> -2 > export class A { - > member: typeof GlobalFoo; - > } -1->Emitted(20, 5) Source(3, 1) + SourceIndex(1) -2 >Emitted(20, 19) Source(5, 2) + SourceIndex(1) +2 > A +1->Emitted(20, 5) Source(3, 14) + SourceIndex(1) +2 >Emitted(20, 19) Source(3, 15) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:all.js @@ -215,9 +213,9 @@ sourceFile:tests/cases/compiler/b.ts 1->^^^^ 2 > ^^^^^^^^^^^^^^ 1-> -2 > export class B extends A { } -1->Emitted(31, 5) Source(2, 1) + SourceIndex(2) -2 >Emitted(31, 19) Source(2, 29) + SourceIndex(2) +2 > B +1->Emitted(31, 5) Source(2, 14) + SourceIndex(2) +2 >Emitted(31, 19) Source(2, 15) + SourceIndex(2) --- >>>}); >>>//# sourceMappingURL=all.js.map \ No newline at end of file diff --git a/tests/baselines/reference/parserEnum1.js b/tests/baselines/reference/parserEnum1.js index e54fff50c73..d2c29d847cd 100644 --- a/tests/baselines/reference/parserEnum1.js +++ b/tests/baselines/reference/parserEnum1.js @@ -10,10 +10,10 @@ //// [parserEnum1.js] "use strict"; +var SignatureFlags; (function (SignatureFlags) { SignatureFlags[SignatureFlags["None"] = 0] = "None"; SignatureFlags[SignatureFlags["IsIndexer"] = 1] = "IsIndexer"; SignatureFlags[SignatureFlags["IsStringIndexer"] = 2] = "IsStringIndexer"; SignatureFlags[SignatureFlags["IsNumberIndexer"] = 4] = "IsNumberIndexer"; -})(exports.SignatureFlags || (exports.SignatureFlags = {})); -var SignatureFlags = exports.SignatureFlags; +})(SignatureFlags = exports.SignatureFlags || (exports.SignatureFlags = {})); diff --git a/tests/baselines/reference/parserEnum2.js b/tests/baselines/reference/parserEnum2.js index 8e7da5c73cd..f5888addf75 100644 --- a/tests/baselines/reference/parserEnum2.js +++ b/tests/baselines/reference/parserEnum2.js @@ -10,10 +10,10 @@ //// [parserEnum2.js] "use strict"; +var SignatureFlags; (function (SignatureFlags) { SignatureFlags[SignatureFlags["None"] = 0] = "None"; SignatureFlags[SignatureFlags["IsIndexer"] = 1] = "IsIndexer"; SignatureFlags[SignatureFlags["IsStringIndexer"] = 2] = "IsStringIndexer"; SignatureFlags[SignatureFlags["IsNumberIndexer"] = 4] = "IsNumberIndexer"; -})(exports.SignatureFlags || (exports.SignatureFlags = {})); -var SignatureFlags = exports.SignatureFlags; +})(SignatureFlags = exports.SignatureFlags || (exports.SignatureFlags = {})); diff --git a/tests/baselines/reference/parserEnum3.js b/tests/baselines/reference/parserEnum3.js index 1d0c445d3a0..602171e8d94 100644 --- a/tests/baselines/reference/parserEnum3.js +++ b/tests/baselines/reference/parserEnum3.js @@ -6,6 +6,6 @@ //// [parserEnum3.js] "use strict"; +var SignatureFlags; (function (SignatureFlags) { -})(exports.SignatureFlags || (exports.SignatureFlags = {})); -var SignatureFlags = exports.SignatureFlags; +})(SignatureFlags = exports.SignatureFlags || (exports.SignatureFlags = {})); diff --git a/tests/baselines/reference/parserEnum4.js b/tests/baselines/reference/parserEnum4.js index 1a207960714..6af07b0a1c7 100644 --- a/tests/baselines/reference/parserEnum4.js +++ b/tests/baselines/reference/parserEnum4.js @@ -7,6 +7,6 @@ //// [parserEnum4.js] "use strict"; +var SignatureFlags; (function (SignatureFlags) { -})(exports.SignatureFlags || (exports.SignatureFlags = {})); -var SignatureFlags = exports.SignatureFlags; +})(SignatureFlags = exports.SignatureFlags || (exports.SignatureFlags = {})); diff --git a/tests/baselines/reference/parserExportAssignment7.js b/tests/baselines/reference/parserExportAssignment7.js index f359ada1e91..dd6750bec32 100644 --- a/tests/baselines/reference/parserExportAssignment7.js +++ b/tests/baselines/reference/parserExportAssignment7.js @@ -11,5 +11,4 @@ var C = (function () { } return C; }()); -exports.C = C; module.exports = B; diff --git a/tests/baselines/reference/parserExportAssignment8.js b/tests/baselines/reference/parserExportAssignment8.js index 16a50a30b3c..07ff257fb61 100644 --- a/tests/baselines/reference/parserExportAssignment8.js +++ b/tests/baselines/reference/parserExportAssignment8.js @@ -11,5 +11,4 @@ var C = (function () { } return C; }()); -exports.C = C; module.exports = B; diff --git a/tests/baselines/reference/parserRealSource10.js b/tests/baselines/reference/parserRealSource10.js index 253f856a990..11cfbdfa1f2 100644 --- a/tests/baselines/reference/parserRealSource10.js +++ b/tests/baselines/reference/parserRealSource10.js @@ -466,6 +466,7 @@ var __extends = (this && this.__extends) || function (d, b) { /// var TypeScript; (function (TypeScript) { + var TokenID; (function (TokenID) { // Keywords TokenID[TokenID["Any"] = 0] = "Any"; @@ -584,8 +585,7 @@ var TypeScript; TokenID[TokenID["Lim"] = 112] = "Lim"; TokenID[TokenID["LimFixed"] = 105] = "LimFixed"; TokenID[TokenID["LimKeyword"] = 53] = "LimKeyword"; - })(TypeScript.TokenID || (TypeScript.TokenID = {})); - var TokenID = TypeScript.TokenID; + })(TokenID = TypeScript.TokenID || (TypeScript.TokenID = {})); TypeScript.tokenTable = new TokenInfo[]; TypeScript.nodeTypeTable = new string[]; TypeScript.nodeTypeToTokTable = new number[]; @@ -602,6 +602,7 @@ var TypeScript; TypeScript.noRegexTable[TokenID.CloseBrace] = true; TypeScript.noRegexTable[TokenID.True] = true; TypeScript.noRegexTable[TokenID.False] = true; + var OperatorPrecedence; (function (OperatorPrecedence) { OperatorPrecedence[OperatorPrecedence["None"] = 0] = "None"; OperatorPrecedence[OperatorPrecedence["Comma"] = 1] = "Comma"; @@ -619,8 +620,8 @@ var TypeScript; OperatorPrecedence[OperatorPrecedence["Multiplicative"] = 13] = "Multiplicative"; OperatorPrecedence[OperatorPrecedence["Unary"] = 14] = "Unary"; OperatorPrecedence[OperatorPrecedence["Lim"] = 15] = "Lim"; - })(TypeScript.OperatorPrecedence || (TypeScript.OperatorPrecedence = {})); - var OperatorPrecedence = TypeScript.OperatorPrecedence; + })(OperatorPrecedence = TypeScript.OperatorPrecedence || (TypeScript.OperatorPrecedence = {})); + var Reservation; (function (Reservation) { Reservation[Reservation["None"] = 0] = "None"; Reservation[Reservation["Javascript"] = 1] = "Javascript"; @@ -630,8 +631,7 @@ var TypeScript; Reservation[Reservation["TypeScriptAndJS"] = 5] = "TypeScriptAndJS"; Reservation[Reservation["TypeScriptAndJSFuture"] = 6] = "TypeScriptAndJSFuture"; Reservation[Reservation["TypeScriptAndJSFutureStrict"] = 12] = "TypeScriptAndJSFutureStrict"; - })(TypeScript.Reservation || (TypeScript.Reservation = {})); - var Reservation = TypeScript.Reservation; + })(Reservation = TypeScript.Reservation || (TypeScript.Reservation = {})); var TokenInfo = (function () { function TokenInfo(tokenId, reservation, binopPrecedence, binopNodeType, unopPrecedence, unopNodeType, text, ers) { this.tokenId = tokenId; @@ -773,6 +773,7 @@ var TypeScript; return TypeScript.tokenTable[tokenId]; } TypeScript.lookupToken = lookupToken; + var TokenClass; (function (TokenClass) { TokenClass[TokenClass["Punctuation"] = 0] = "Punctuation"; TokenClass[TokenClass["Keyword"] = 1] = "Keyword"; @@ -781,8 +782,7 @@ var TypeScript; TokenClass[TokenClass["Whitespace"] = 4] = "Whitespace"; TokenClass[TokenClass["Identifier"] = 5] = "Identifier"; TokenClass[TokenClass["Literal"] = 6] = "Literal"; - })(TypeScript.TokenClass || (TypeScript.TokenClass = {})); - var TokenClass = TypeScript.TokenClass; + })(TokenClass = TypeScript.TokenClass || (TypeScript.TokenClass = {})); var SavedToken = (function () { function SavedToken(tok, minChar, limChar) { this.tok = tok; diff --git a/tests/baselines/reference/parserRealSource14.js b/tests/baselines/reference/parserRealSource14.js index c31a9dd6c72..907efc6f26a 100644 --- a/tests/baselines/reference/parserRealSource14.js +++ b/tests/baselines/reference/parserRealSource14.js @@ -957,6 +957,7 @@ var TypeScript; return AstPathContext; }()); TypeScript.AstPathContext = AstPathContext; + var GetAstPathOptions; (function (GetAstPathOptions) { GetAstPathOptions[GetAstPathOptions["Default"] = 0] = "Default"; GetAstPathOptions[GetAstPathOptions["EdgeInclusive"] = 1] = "EdgeInclusive"; @@ -968,8 +969,7 @@ var TypeScript; // we don't find the "precomment" attached to the errorneous empty stmt. //TODO: It would be nice to be able to get rid of this. GetAstPathOptions[GetAstPathOptions["DontPruneSearchBasedOnPosition"] = 2] = "DontPruneSearchBasedOnPosition"; - })(TypeScript.GetAstPathOptions || (TypeScript.GetAstPathOptions = {})); - var GetAstPathOptions = TypeScript.GetAstPathOptions; + })(GetAstPathOptions = TypeScript.GetAstPathOptions || (TypeScript.GetAstPathOptions = {})); /// /// Return the stack of AST nodes containing "position" /// diff --git a/tests/baselines/reference/parserRealSource2.js b/tests/baselines/reference/parserRealSource2.js index c41f88bc9c2..2028cbd4efe 100644 --- a/tests/baselines/reference/parserRealSource2.js +++ b/tests/baselines/reference/parserRealSource2.js @@ -281,6 +281,7 @@ var TypeScript; return (val & flag) != 0; } TypeScript.hasFlag = hasFlag; + var ErrorRecoverySet; (function (ErrorRecoverySet) { ErrorRecoverySet[ErrorRecoverySet["None"] = 0] = "None"; ErrorRecoverySet[ErrorRecoverySet["Comma"] = 1] = "Comma"; @@ -320,8 +321,8 @@ var TypeScript; ErrorRecoverySet[ErrorRecoverySet["ExprStart"] = 520158210] = "ExprStart"; ErrorRecoverySet[ErrorRecoverySet["StmtStart"] = 1608580098] = "StmtStart"; ErrorRecoverySet[ErrorRecoverySet["Postfix"] = 49280] = "Postfix"; - })(TypeScript.ErrorRecoverySet || (TypeScript.ErrorRecoverySet = {})); - var ErrorRecoverySet = TypeScript.ErrorRecoverySet; + })(ErrorRecoverySet = TypeScript.ErrorRecoverySet || (TypeScript.ErrorRecoverySet = {})); + var AllowedElements; (function (AllowedElements) { AllowedElements[AllowedElements["None"] = 0] = "None"; AllowedElements[AllowedElements["ModuleDeclarations"] = 4] = "ModuleDeclarations"; @@ -331,8 +332,8 @@ var TypeScript; AllowedElements[AllowedElements["Properties"] = 2048] = "Properties"; AllowedElements[AllowedElements["Global"] = 1052] = "Global"; AllowedElements[AllowedElements["QuickParse"] = 3100] = "QuickParse"; - })(TypeScript.AllowedElements || (TypeScript.AllowedElements = {})); - var AllowedElements = TypeScript.AllowedElements; + })(AllowedElements = TypeScript.AllowedElements || (TypeScript.AllowedElements = {})); + var Modifiers; (function (Modifiers) { Modifiers[Modifiers["None"] = 0] = "None"; Modifiers[Modifiers["Private"] = 1] = "Private"; @@ -343,8 +344,8 @@ var TypeScript; Modifiers[Modifiers["Getter"] = 32] = "Getter"; Modifiers[Modifiers["Setter"] = 64] = "Setter"; Modifiers[Modifiers["Static"] = 128] = "Static"; - })(TypeScript.Modifiers || (TypeScript.Modifiers = {})); - var Modifiers = TypeScript.Modifiers; + })(Modifiers = TypeScript.Modifiers || (TypeScript.Modifiers = {})); + var ASTFlags; (function (ASTFlags) { ASTFlags[ASTFlags["None"] = 0] = "None"; ASTFlags[ASTFlags["ExplicitSemicolon"] = 1] = "ExplicitSemicolon"; @@ -362,8 +363,8 @@ var TypeScript; // The flag is used to communicate this piece of information to the calling parseTerm, which intern will remove it. // Once we have a better way to associate information with nodes, this flag should not be used. ASTFlags[ASTFlags["SkipNextRParen"] = 2048] = "SkipNextRParen"; - })(TypeScript.ASTFlags || (TypeScript.ASTFlags = {})); - var ASTFlags = TypeScript.ASTFlags; + })(ASTFlags = TypeScript.ASTFlags || (TypeScript.ASTFlags = {})); + var DeclFlags; (function (DeclFlags) { DeclFlags[DeclFlags["None"] = 0] = "None"; DeclFlags[DeclFlags["Exported"] = 1] = "Exported"; @@ -374,8 +375,8 @@ var TypeScript; DeclFlags[DeclFlags["LocalStatic"] = 32] = "LocalStatic"; DeclFlags[DeclFlags["GetAccessor"] = 64] = "GetAccessor"; DeclFlags[DeclFlags["SetAccessor"] = 128] = "SetAccessor"; - })(TypeScript.DeclFlags || (TypeScript.DeclFlags = {})); - var DeclFlags = TypeScript.DeclFlags; + })(DeclFlags = TypeScript.DeclFlags || (TypeScript.DeclFlags = {})); + var ModuleFlags; (function (ModuleFlags) { ModuleFlags[ModuleFlags["None"] = 0] = "None"; ModuleFlags[ModuleFlags["Exported"] = 1] = "Exported"; @@ -391,8 +392,8 @@ var TypeScript; ModuleFlags[ModuleFlags["IsWholeFile"] = 1024] = "IsWholeFile"; ModuleFlags[ModuleFlags["IsDynamic"] = 2048] = "IsDynamic"; ModuleFlags[ModuleFlags["MustCaptureThis"] = 4096] = "MustCaptureThis"; - })(TypeScript.ModuleFlags || (TypeScript.ModuleFlags = {})); - var ModuleFlags = TypeScript.ModuleFlags; + })(ModuleFlags = TypeScript.ModuleFlags || (TypeScript.ModuleFlags = {})); + var SymbolFlags; (function (SymbolFlags) { SymbolFlags[SymbolFlags["None"] = 0] = "None"; SymbolFlags[SymbolFlags["Exported"] = 1] = "Exported"; @@ -415,8 +416,8 @@ var TypeScript; SymbolFlags[SymbolFlags["RecursivelyReferenced"] = 131072] = "RecursivelyReferenced"; SymbolFlags[SymbolFlags["Bound"] = 262144] = "Bound"; SymbolFlags[SymbolFlags["CompilerGenerated"] = 524288] = "CompilerGenerated"; - })(TypeScript.SymbolFlags || (TypeScript.SymbolFlags = {})); - var SymbolFlags = TypeScript.SymbolFlags; + })(SymbolFlags = TypeScript.SymbolFlags || (TypeScript.SymbolFlags = {})); + var VarFlags; (function (VarFlags) { VarFlags[VarFlags["None"] = 0] = "None"; VarFlags[VarFlags["Exported"] = 1] = "Exported"; @@ -437,8 +438,8 @@ var TypeScript; VarFlags[VarFlags["ClassSuperMustBeFirstCallInConstructor"] = 32768] = "ClassSuperMustBeFirstCallInConstructor"; VarFlags[VarFlags["Constant"] = 65536] = "Constant"; VarFlags[VarFlags["MustCaptureThis"] = 131072] = "MustCaptureThis"; - })(TypeScript.VarFlags || (TypeScript.VarFlags = {})); - var VarFlags = TypeScript.VarFlags; + })(VarFlags = TypeScript.VarFlags || (TypeScript.VarFlags = {})); + var FncFlags; (function (FncFlags) { FncFlags[FncFlags["None"] = 0] = "None"; FncFlags[FncFlags["Exported"] = 1] = "Exported"; @@ -461,19 +462,19 @@ var TypeScript; FncFlags[FncFlags["IsFunctionExpression"] = 131072] = "IsFunctionExpression"; FncFlags[FncFlags["ClassMethod"] = 262144] = "ClassMethod"; FncFlags[FncFlags["ClassPropertyMethodExported"] = 524288] = "ClassPropertyMethodExported"; - })(TypeScript.FncFlags || (TypeScript.FncFlags = {})); - var FncFlags = TypeScript.FncFlags; + })(FncFlags = TypeScript.FncFlags || (TypeScript.FncFlags = {})); + var SignatureFlags; (function (SignatureFlags) { SignatureFlags[SignatureFlags["None"] = 0] = "None"; SignatureFlags[SignatureFlags["IsIndexer"] = 1] = "IsIndexer"; SignatureFlags[SignatureFlags["IsStringIndexer"] = 2] = "IsStringIndexer"; SignatureFlags[SignatureFlags["IsNumberIndexer"] = 4] = "IsNumberIndexer"; - })(TypeScript.SignatureFlags || (TypeScript.SignatureFlags = {})); - var SignatureFlags = TypeScript.SignatureFlags; + })(SignatureFlags = TypeScript.SignatureFlags || (TypeScript.SignatureFlags = {})); function ToDeclFlags(fncOrVarOrSymbolOrModuleFlags) { return fncOrVarOrSymbolOrModuleFlags; } TypeScript.ToDeclFlags = ToDeclFlags; + var TypeFlags; (function (TypeFlags) { TypeFlags[TypeFlags["None"] = 0] = "None"; TypeFlags[TypeFlags["HasImplementation"] = 1] = "HasImplementation"; @@ -484,8 +485,8 @@ var TypeScript; TypeFlags[TypeFlags["HasBaseType"] = 32] = "HasBaseType"; TypeFlags[TypeFlags["HasBaseTypeOfObject"] = 64] = "HasBaseTypeOfObject"; TypeFlags[TypeFlags["IsClass"] = 128] = "IsClass"; - })(TypeScript.TypeFlags || (TypeScript.TypeFlags = {})); - var TypeFlags = TypeScript.TypeFlags; + })(TypeFlags = TypeScript.TypeFlags || (TypeScript.TypeFlags = {})); + var TypeRelationshipFlags; (function (TypeRelationshipFlags) { TypeRelationshipFlags[TypeRelationshipFlags["SuccessfulComparison"] = 0] = "SuccessfulComparison"; TypeRelationshipFlags[TypeRelationshipFlags["SourceIsNullTargetIsVoidOrUndefined"] = 1] = "SourceIsNullTargetIsVoidOrUndefined"; @@ -495,19 +496,18 @@ var TypeScript; TypeRelationshipFlags[TypeRelationshipFlags["IncompatibleReturnTypes"] = 16] = "IncompatibleReturnTypes"; TypeRelationshipFlags[TypeRelationshipFlags["IncompatiblePropertyTypes"] = 32] = "IncompatiblePropertyTypes"; TypeRelationshipFlags[TypeRelationshipFlags["IncompatibleParameterTypes"] = 64] = "IncompatibleParameterTypes"; - })(TypeScript.TypeRelationshipFlags || (TypeScript.TypeRelationshipFlags = {})); - var TypeRelationshipFlags = TypeScript.TypeRelationshipFlags; + })(TypeRelationshipFlags = TypeScript.TypeRelationshipFlags || (TypeScript.TypeRelationshipFlags = {})); + var CodeGenTarget; (function (CodeGenTarget) { CodeGenTarget[CodeGenTarget["ES3"] = 0] = "ES3"; CodeGenTarget[CodeGenTarget["ES5"] = 1] = "ES5"; - })(TypeScript.CodeGenTarget || (TypeScript.CodeGenTarget = {})); - var CodeGenTarget = TypeScript.CodeGenTarget; + })(CodeGenTarget = TypeScript.CodeGenTarget || (TypeScript.CodeGenTarget = {})); + var ModuleGenTarget; (function (ModuleGenTarget) { ModuleGenTarget[ModuleGenTarget["Synchronous"] = 0] = "Synchronous"; ModuleGenTarget[ModuleGenTarget["Asynchronous"] = 1] = "Asynchronous"; ModuleGenTarget[ModuleGenTarget["Local"] = 2] = "Local"; - })(TypeScript.ModuleGenTarget || (TypeScript.ModuleGenTarget = {})); - var ModuleGenTarget = TypeScript.ModuleGenTarget; + })(ModuleGenTarget = TypeScript.ModuleGenTarget || (TypeScript.ModuleGenTarget = {})); // Compiler defaults to generating ES5-compliant code for // - getters and setters TypeScript.codeGenTarget = CodeGenTarget.ES3; diff --git a/tests/baselines/reference/parserRealSource3.js b/tests/baselines/reference/parserRealSource3.js index 38e9028297b..f0e22395cfe 100644 --- a/tests/baselines/reference/parserRealSource3.js +++ b/tests/baselines/reference/parserRealSource3.js @@ -126,6 +126,7 @@ module TypeScript { var TypeScript; (function (TypeScript) { // Note: Any addition to the NodeType should also be supported with addition to AstWalkerDetailCallback + var NodeType; (function (NodeType) { NodeType[NodeType["None"] = 0] = "None"; NodeType[NodeType["Empty"] = 1] = "Empty"; @@ -236,6 +237,5 @@ var TypeScript; NodeType[NodeType["Debugger"] = 106] = "Debugger"; NodeType[NodeType["GeneralNode"] = 71] = "GeneralNode"; NodeType[NodeType["LastAsg"] = 41] = "LastAsg"; - })(TypeScript.NodeType || (TypeScript.NodeType = {})); - var NodeType = TypeScript.NodeType; + })(NodeType = TypeScript.NodeType || (TypeScript.NodeType = {})); })(TypeScript || (TypeScript = {})); diff --git a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.errors.txt b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.errors.txt index a9fc9b68cf8..a6a45245929 100644 --- a/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.errors.txt +++ b/tests/baselines/reference/partiallyAnnotatedFunctionInferenceError.errors.txt @@ -1,6 +1,6 @@ -tests/cases/conformance/types/contextualTypes/partiallyAnnotatedFunction/partiallyAnnotatedFunctionInferenceError.ts(12,11): error TS2345: Argument of type '(t1: D, t2: D, t3: any) => void' is not assignable to parameter of type '(t: D, t1: D) => void'. -tests/cases/conformance/types/contextualTypes/partiallyAnnotatedFunction/partiallyAnnotatedFunctionInferenceError.ts(13,11): error TS2345: Argument of type '(t1: D, t2: D, t3: any) => void' is not assignable to parameter of type '(t: D, t1: D) => void'. -tests/cases/conformance/types/contextualTypes/partiallyAnnotatedFunction/partiallyAnnotatedFunctionInferenceError.ts(14,11): error TS2345: Argument of type '(t1: C, t2: C, t3: D) => void' is not assignable to parameter of type '(t: C, t1: C) => void'. +tests/cases/conformance/types/contextualTypes/partiallyAnnotatedFunction/partiallyAnnotatedFunctionInferenceError.ts(12,11): error TS2345: Argument of type '(t1: D, t2: any, t3: any) => void' is not assignable to parameter of type '(t: any, t1: any) => void'. +tests/cases/conformance/types/contextualTypes/partiallyAnnotatedFunction/partiallyAnnotatedFunctionInferenceError.ts(13,11): error TS2345: Argument of type '(t1: any, t2: D, t3: any) => void' is not assignable to parameter of type '(t: any, t1: any) => void'. +tests/cases/conformance/types/contextualTypes/partiallyAnnotatedFunction/partiallyAnnotatedFunctionInferenceError.ts(14,11): error TS2345: Argument of type '(t1: any, t2: any, t3: D) => void' is not assignable to parameter of type '(t: any, t1: any) => void'. ==== tests/cases/conformance/types/contextualTypes/partiallyAnnotatedFunction/partiallyAnnotatedFunctionInferenceError.ts (3 errors) ==== @@ -17,11 +17,11 @@ tests/cases/conformance/types/contextualTypes/partiallyAnnotatedFunction/partial // more args testError((t1: D, t2, t3) => {}) ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(t1: D, t2: D, t3: any) => void' is not assignable to parameter of type '(t: D, t1: D) => void'. +!!! error TS2345: Argument of type '(t1: D, t2: any, t3: any) => void' is not assignable to parameter of type '(t: any, t1: any) => void'. testError((t1, t2: D, t3) => {}) ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(t1: D, t2: D, t3: any) => void' is not assignable to parameter of type '(t: D, t1: D) => void'. +!!! error TS2345: Argument of type '(t1: any, t2: D, t3: any) => void' is not assignable to parameter of type '(t: any, t1: any) => void'. testError((t1, t2, t3: D) => {}) ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(t1: C, t2: C, t3: D) => void' is not assignable to parameter of type '(t: C, t1: C) => void'. +!!! error TS2345: Argument of type '(t1: any, t2: any, t3: D) => void' is not assignable to parameter of type '(t: any, t1: any) => void'. \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json index 8b003e05e8f..90b8620e36c 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json @@ -14,10 +14,13 @@ "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'", "Resolving module name 'file4' relative to base url 'c:/root' - 'c:/root/file4'.", "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", "File 'c:/root/folder2/file4.ts' does not exist.", + "File 'c:/root/folder2/file4.tsx' does not exist.", "File 'c:/root/folder2/file4.d.ts' does not exist.", "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", "File 'c:/file4.ts' exist - use it as a name resolution result.", "======== Module name 'file4' was successfully resolved to 'c:/file4.ts'. ========" diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json index 8b003e05e8f..90b8620e36c 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json @@ -14,10 +14,13 @@ "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'", "Resolving module name 'file4' relative to base url 'c:/root' - 'c:/root/file4'.", "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", "File 'c:/root/folder2/file4.ts' does not exist.", + "File 'c:/root/folder2/file4.tsx' does not exist.", "File 'c:/root/folder2/file4.d.ts' does not exist.", "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", "File 'c:/file4.ts' exist - use it as a name resolution result.", "======== Module name 'file4' was successfully resolved to 'c:/file4.ts'. ========" diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json index d1709c82dc6..6c899bf028e 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json @@ -14,6 +14,7 @@ "Module name 'folder3/file2', matched pattern '*'.", "Trying substitution '*', candidate module location: 'folder3/file2'.", "File 'c:/root/folder3/file2.ts' does not exist.", + "File 'c:/root/folder3/file2.tsx' does not exist.", "File 'c:/root/folder3/file2.d.ts' does not exist.", "Trying substitution 'generated/*', candidate module location: 'generated/folder3/file2'.", "File 'c:/root/generated/folder3/file2.ts' exist - use it as a name resolution result.", @@ -33,13 +34,17 @@ "Module name 'file4', matched pattern '*'.", "Trying substitution '*', candidate module location: 'file4'.", "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", "Trying substitution 'generated/*', candidate module location: 'generated/file4'.", "File 'c:/root/generated/file4.ts' does not exist.", + "File 'c:/root/generated/file4.tsx' does not exist.", "File 'c:/root/generated/file4.d.ts' does not exist.", "File 'c:/root/folder1/file4.ts' does not exist.", + "File 'c:/root/folder1/file4.tsx' does not exist.", "File 'c:/root/folder1/file4.d.ts' does not exist.", "File 'c:/root/file4.ts' does not exist.", + "File 'c:/root/file4.tsx' does not exist.", "File 'c:/root/file4.d.ts' does not exist.", "File 'c:/file4.ts' exist - use it as a name resolution result.", "======== Module name 'file4' was successfully resolved to 'c:/file4.ts'. ========" diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json index 20fc416ccd4..d50a6c78ed7 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json @@ -7,6 +7,7 @@ "Longest matching prefix for 'c:/root/src/project/file3' is 'c:/root/src/'", "Loading 'project/file3' from the root dir 'c:/root/src/', candidate location 'c:/root/src/project/file3'", "File 'c:/root/src/project/file3.ts' does not exist.", + "File 'c:/root/src/project/file3.tsx' does not exist.", "File 'c:/root/src/project/file3.d.ts' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'project/file3' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file3'", @@ -20,10 +21,12 @@ "Longest matching prefix for 'c:/root/generated/src/file2' is 'c:/root/generated/src/'", "Loading 'file2' from the root dir 'c:/root/generated/src/', candidate location 'c:/root/generated/src/file2'", "File 'c:/root/generated/src/file2.ts' does not exist.", + "File 'c:/root/generated/src/file2.tsx' does not exist.", "File 'c:/root/generated/src/file2.d.ts' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'file2' from the root dir 'c:/root/src', candidate location 'c:/root/src/file2'", "File 'c:/root/src/file2.ts' does not exist.", + "File 'c:/root/src/file2.tsx' does not exist.", "File 'c:/root/src/file2.d.ts' exist - use it as a name resolution result.", "======== Module name '../file2' was successfully resolved to 'c:/root/src/file2.d.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json index a8cadb8f067..85373855eb5 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json @@ -7,6 +7,7 @@ "Longest matching prefix for 'c:/root/src/project/file2' is 'c:/root/src/'", "Loading 'project/file2' from the root dir 'c:/root/src/', candidate location 'c:/root/src/project/file2'", "File 'c:/root/src/project/file2.ts' does not exist.", + "File 'c:/root/src/project/file2.tsx' does not exist.", "File 'c:/root/src/project/file2.d.ts' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'project/file2' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file2'", @@ -19,15 +20,20 @@ "Module name 'module3', matched pattern '*'.", "Trying substitution '*', candidate module location: 'module3'.", "File 'c:/root/module3.ts' does not exist.", + "File 'c:/root/module3.tsx' does not exist.", "File 'c:/root/module3.d.ts' does not exist.", "Trying substitution 'c:/shared/*', candidate module location: 'c:/shared/module3'.", "File 'c:/shared/module3.ts' does not exist.", + "File 'c:/shared/module3.tsx' does not exist.", "File 'c:/shared/module3.d.ts' does not exist.", "File 'c:/root/src/module3.ts' does not exist.", + "File 'c:/root/src/module3.tsx' does not exist.", "File 'c:/root/src/module3.d.ts' does not exist.", "File 'c:/root/module3.ts' does not exist.", + "File 'c:/root/module3.tsx' does not exist.", "File 'c:/root/module3.d.ts' does not exist.", "File 'c:/module3.ts' does not exist.", + "File 'c:/module3.tsx' does not exist.", "File 'c:/module3.d.ts' exist - use it as a name resolution result.", "======== Module name 'module3' was successfully resolved to 'c:/module3.d.ts'. ========", "======== Resolving module 'module1' from 'c:/root/generated/src/project/file2.ts'. ========", @@ -37,9 +43,11 @@ "Module name 'module1', matched pattern '*'.", "Trying substitution '*', candidate module location: 'module1'.", "File 'c:/root/module1.ts' does not exist.", + "File 'c:/root/module1.tsx' does not exist.", "File 'c:/root/module1.d.ts' does not exist.", "Trying substitution 'c:/shared/*', candidate module location: 'c:/shared/module1'.", "File 'c:/shared/module1.ts' does not exist.", + "File 'c:/shared/module1.tsx' does not exist.", "File 'c:/shared/module1.d.ts' exist - use it as a name resolution result.", "======== Module name 'module1' was successfully resolved to 'c:/shared/module1.d.ts'. ========", "======== Resolving module 'templates/module2' from 'c:/root/generated/src/project/file2.ts'. ========", @@ -58,10 +66,12 @@ "Longest matching prefix for 'c:/root/generated/src/file3' is 'c:/root/generated/src/'", "Loading 'file3' from the root dir 'c:/root/generated/src/', candidate location 'c:/root/generated/src/file3'", "File 'c:/root/generated/src/file3.ts' does not exist.", + "File 'c:/root/generated/src/file3.tsx' does not exist.", "File 'c:/root/generated/src/file3.d.ts' does not exist.", "Trying other entries in 'rootDirs'", "Loading 'file3' from the root dir 'c:/root/src', candidate location 'c:/root/src/file3'", "File 'c:/root/src/file3.ts' does not exist.", + "File 'c:/root/src/file3.tsx' does not exist.", "File 'c:/root/src/file3.d.ts' exist - use it as a name resolution result.", "======== Module name '../file3' was successfully resolved to 'c:/root/src/file3.d.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js b/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js index cebf700aa59..c139b6279fd 100644 --- a/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js +++ b/tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js @@ -161,11 +161,11 @@ var publicClassWithWithPrivatePropertyTypes = (function () { } return publicClassWithWithPrivatePropertyTypes; }()); -exports.publicClassWithWithPrivatePropertyTypes = publicClassWithWithPrivatePropertyTypes; publicClassWithWithPrivatePropertyTypes.myPublicStaticProperty = exporter.createExportedWidget1(); // Error publicClassWithWithPrivatePropertyTypes.myPrivateStaticProperty = exporter.createExportedWidget1(); publicClassWithWithPrivatePropertyTypes.myPublicStaticProperty1 = exporter.createExportedWidget3(); // Error publicClassWithWithPrivatePropertyTypes.myPrivateStaticProperty1 = exporter.createExportedWidget3(); +exports.publicClassWithWithPrivatePropertyTypes = publicClassWithWithPrivatePropertyTypes; var privateClassWithWithPrivatePropertyTypes = (function () { function privateClassWithWithPrivatePropertyTypes() { this.myPublicProperty = exporter.createExportedWidget1(); @@ -190,9 +190,9 @@ var publicClassWithPrivateModulePropertyTypes = (function () { } return publicClassWithPrivateModulePropertyTypes; }()); -exports.publicClassWithPrivateModulePropertyTypes = publicClassWithPrivateModulePropertyTypes; publicClassWithPrivateModulePropertyTypes.myPublicStaticProperty = exporter.createExportedWidget2(); // Error publicClassWithPrivateModulePropertyTypes.myPublicStaticProperty1 = exporter.createExportedWidget4(); // Error +exports.publicClassWithPrivateModulePropertyTypes = publicClassWithPrivateModulePropertyTypes; exports.publicVarWithPrivateModulePropertyTypes = exporter.createExportedWidget2(); // Error exports.publicVarWithPrivateModulePropertyTypes1 = exporter.createExportedWidget4(); // Error var privateClassWithPrivateModulePropertyTypes = (function () { diff --git a/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js b/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js index 0ab6d3e531e..b328e8b3036 100644 --- a/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js +++ b/tests/baselines/reference/privacyLocalInternalReferenceImportWithExport.js @@ -163,11 +163,11 @@ var m_private; return c_private; }()); m_private.c_private = c_private; + var e_private; (function (e_private) { e_private[e_private["Happy"] = 0] = "Happy"; e_private[e_private["Grumpy"] = 1] = "Grumpy"; - })(m_private.e_private || (m_private.e_private = {})); - var e_private = m_private.e_private; + })(e_private = m_private.e_private || (m_private.e_private = {})); function f_private() { return new c_private(); } @@ -192,11 +192,11 @@ var m_public; return c_public; }()); m_public.c_public = c_public; + var e_public; (function (e_public) { e_public[e_public["Happy"] = 0] = "Happy"; e_public[e_public["Grumpy"] = 1] = "Grumpy"; - })(m_public.e_public || (m_public.e_public = {})); - var e_public = m_public.e_public; + })(e_public = m_public.e_public || (m_public.e_public = {})); function f_public() { return new c_public(); } diff --git a/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js b/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js index 96f7b74b474..7d4a80a0d29 100644 --- a/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js +++ b/tests/baselines/reference/privacyLocalInternalReferenceImportWithoutExport.js @@ -164,11 +164,11 @@ define(["require", "exports"], function (require, exports) { return c_private; }()); m_private.c_private = c_private; + var e_private; (function (e_private) { e_private[e_private["Happy"] = 0] = "Happy"; e_private[e_private["Grumpy"] = 1] = "Grumpy"; - })(m_private.e_private || (m_private.e_private = {})); - var e_private = m_private.e_private; + })(e_private = m_private.e_private || (m_private.e_private = {})); function f_private() { return new c_private(); } @@ -193,11 +193,11 @@ define(["require", "exports"], function (require, exports) { return c_public; }()); m_public.c_public = c_public; + var e_public; (function (e_public) { e_public[e_public["Happy"] = 0] = "Happy"; e_public[e_public["Grumpy"] = 1] = "Grumpy"; - })(m_public.e_public || (m_public.e_public = {})); - var e_public = m_public.e_public; + })(e_public = m_public.e_public || (m_public.e_public = {})); function f_public() { return new c_public(); } diff --git a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js index 852ae4d3f19..a01f1ef611f 100644 --- a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js +++ b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithExport.js @@ -111,11 +111,11 @@ define(["require", "exports"], function (require, exports) { return c_private; }()); m_private.c_private = c_private; + var e_private; (function (e_private) { e_private[e_private["Happy"] = 0] = "Happy"; e_private[e_private["Grumpy"] = 1] = "Grumpy"; - })(m_private.e_private || (m_private.e_private = {})); - var e_private = m_private.e_private; + })(e_private = m_private.e_private || (m_private.e_private = {})); function f_private() { return new c_private(); } @@ -140,11 +140,11 @@ define(["require", "exports"], function (require, exports) { return c_public; }()); m_public.c_public = c_public; + var e_public; (function (e_public) { e_public[e_public["Happy"] = 0] = "Happy"; e_public[e_public["Grumpy"] = 1] = "Grumpy"; - })(m_public.e_public || (m_public.e_public = {})); - var e_public = m_public.e_public; + })(e_public = m_public.e_public || (m_public.e_public = {})); function f_public() { return new c_public(); } diff --git a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js index 1241165a8dc..2554085b94b 100644 --- a/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js +++ b/tests/baselines/reference/privacyTopLevelInternalReferenceImportWithoutExport.js @@ -112,11 +112,11 @@ define(["require", "exports"], function (require, exports) { return c_private; }()); m_private.c_private = c_private; + var e_private; (function (e_private) { e_private[e_private["Happy"] = 0] = "Happy"; e_private[e_private["Grumpy"] = 1] = "Grumpy"; - })(m_private.e_private || (m_private.e_private = {})); - var e_private = m_private.e_private; + })(e_private = m_private.e_private || (m_private.e_private = {})); function f_private() { return new c_private(); } @@ -141,11 +141,11 @@ define(["require", "exports"], function (require, exports) { return c_public; }()); m_public.c_public = c_public; + var e_public; (function (e_public) { e_public[e_public["Happy"] = 0] = "Happy"; e_public[e_public["Grumpy"] = 1] = "Grumpy"; - })(m_public.e_public || (m_public.e_public = {})); - var e_public = m_public.e_public; + })(e_public = m_public.e_public || (m_public.e_public = {})); function f_public() { return new c_public(); } diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map index c0e40d9e56c..891c03b13f2 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map index 5f6fc59aa0e..30f6e242bc8 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index c0e40d9e56c..891c03b13f2 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index 5f6fc59aa0e..30f6e242bc8 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 06567a4fddd..dce282ee37f 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index d3c0e8697cd..1316ec74659 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map index 048c2816811..5db5f8f1bfb 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map index 8e4c69b85ca..28136d8ffc3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map index adc497fc60f..dd409b9f2c3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map index 3c11f6387b3..78b4b9fcfe1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map index f102ba902d9..f5f5dfcd793 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map index c84a8f5c835..6ba04afda9e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 8e4c69b85ca..28136d8ffc3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index adc497fc60f..dd409b9f2c3 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 048c2816811..5db5f8f1bfb 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index f102ba902d9..f5f5dfcd793 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index c84a8f5c835..6ba04afda9e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 3c11f6387b3..78b4b9fcfe1 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index 51320616653..d9151baabe4 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_module_multifolder_ref/m2.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_module_multifolder_ref/m2.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map index cb20dafd0e6..43b1caa625e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map index 379e5b9d7b2..ba491a3c6fa 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map index 2a7d88eea53..02f7bbcbb67 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map index 99658249a09..766ff607b54 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index cb20dafd0e6..43b1caa625e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 379e5b9d7b2..ba491a3c6fa 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 2a7d88eea53..02f7bbcbb67 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index 99658249a09..766ff607b54 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index 105ebefb06e..a910ecda80e 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map index 9eb482b6438..a6d24f0f020 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map index 379e5b9d7b2..ba491a3c6fa 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map index 764cd7db3b4..a23c1871126 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map index 48a5bd9efa8..a758d2a1cd0 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 9eb482b6438..a6d24f0f020 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 379e5b9d7b2..ba491a3c6fa 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 764cd7db3b4..a23c1871126 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index 48a5bd9efa8..a758d2a1cd0 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index 12c15dd7143..a3532b9e4ce 100644 --- a/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map index 26b3342e168..0dab1514706 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map index 2137f48e86b..14104ec68b9 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index 26b3342e168..0dab1514706 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index 2137f48e86b..14104ec68b9 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 6e903b7c370..d8fff48f73e 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/ref/m1.ts","../outputdir_mixed_subfolder/ref/m2.ts","../outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/ref/m1.ts","../outputdir_mixed_subfolder/ref/m2.ts","../outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index 4767cb6f425..bb9e992d471 100644 --- a/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/ref/m1.ts","../outputdir_mixed_subfolder/ref/m2.ts","../outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../outputdir_mixed_subfolder/ref/m1.ts","../outputdir_mixed_subfolder/ref/m2.ts","../outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map index 60700ad9d17..4f51d470c82 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map index 1c3270c1034..ee8a26cafcf 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map index eb045bec338..e60e0fbfa7a 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map index 4b491bfe9bb..3c653ded700 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map index 70285d9fdb4..5f97087307d 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js.map index 3b815b52961..8c64bacf533 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 1c3270c1034..ee8a26cafcf 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index eb045bec338..e60e0fbfa7a 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 60700ad9d17..4f51d470c82 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 70285d9fdb4..5f97087307d 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index 3b815b52961..8c64bacf533 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 4b491bfe9bb..3c653ded700 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index e5f2d235179..ae1d6457599 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../projects/outputdir_module_multifolder/ref/m1.ts","../projects/outputdir_module_multifolder_ref/m2.ts","../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../projects/outputdir_module_multifolder/ref/m1.ts","../projects/outputdir_module_multifolder_ref/m2.ts","../projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map index a623d2caaa6..611b73c5c7d 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js.map index 579a6a187e3..a6d5cebe7f1 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js.map index 3a1b7b27c58..733fa0fc069 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js.map index a9589e1fed8..86cfbeb5b63 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index a623d2caaa6..611b73c5c7d 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 579a6a187e3..a6d5cebe7f1 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 3a1b7b27c58..733fa0fc069 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index a9589e1fed8..86cfbeb5b63 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index 5ac4a707e39..3542da2fe04 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts","../outputdir_module_simple/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_simple/m1.ts","../outputdir_module_simple/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map index 943ae3c5b8e..dbfe0b5d927 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map index 478bae202d6..a8d6293492c 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map index 9fea18a6b02..172c4d4804a 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js.map index e96624acd65..ef62267d957 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 943ae3c5b8e..dbfe0b5d927 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 478bae202d6..a8d6293492c 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 9fea18a6b02..172c4d4804a 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index e96624acd65..ef62267d957 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index 4c60ddd29d4..3096c610237 100644 --- a/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/mapRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/ref/m1.ts","../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../outputdir_module_subfolder/ref/m1.ts","../outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map index a1de0913da5..c657ed8edce 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map index 861972de209..56f12c22903 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index a1de0913da5..c657ed8edce 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index 861972de209..56f12c22903 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 64ad8eb1642..eececdeabfd 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index 63bc893832b..4bdde308824 100644 --- a/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/maprootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/ref/m2.ts","file:///tests/cases/projects/outputdir_mixed_subfolder/test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map index 7a409515607..3c1c9b64dc2 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map index 3343670eb84..9bdc7ad5504 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js.map index 57bb373e054..3a4d618044a 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map index 2da721ff1a0..4103e499cbd 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map index c1f7e172c9d..49f97b88a38 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js.map index 474dd107529..830a0ddd3e5 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 3343670eb84..9bdc7ad5504 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index 57bb373e054..3a4d618044a 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 7a409515607..3c1c9b64dc2 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index c1f7e172c9d..49f97b88a38 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index 474dd107529..830a0ddd3e5 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 2da721ff1a0..4103e499cbd 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index 155baf7912b..6b934e00e04 100644 --- a/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts","file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts","file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_multifolder/ref/m1.ts","file:///tests/cases/projects/outputdir_module_multifolder_ref/m2.ts","file:///tests/cases/projects/outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js.map index e9f1d54cc87..eceec7b450a 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js.map index 4c83678dafd..d68dbf6eb9e 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js.map index e96a1a904e7..b9de639cb1d 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js.map index e0513a8b07b..826729aba87 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index e9f1d54cc87..eceec7b450a 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 4c83678dafd..d68dbf6eb9e 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index e96a1a904e7..b9de639cb1d 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index e0513a8b07b..826729aba87 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index ecbd039578c..5396cab1d7c 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts","file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_simple/m1.ts","file:///tests/cases/projects/outputdir_module_simple/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map index 94b0fd005cb..755cc1d0aaf 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js.map index 76cc81a74f4..957a73c648a 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map index 637153a8c7a..f7e43883048 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js.map index 99312830f1c..8baefdad92b 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 94b0fd005cb..755cc1d0aaf 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 76cc81a74f4..957a73c648a 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 637153a8c7a..f7e43883048 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index 99312830f1c..8baefdad92b 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index d962fcf11cb..308dbbfaa67 100644 --- a/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["file:///tests/cases/projects/outputdir_module_subfolder/ref/m1.ts","file:///tests/cases/projects/outputdir_module_subfolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map index e68a248d5d7..a1c9985be48 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map index c6ff2cc27ce..9ccd44f3a01 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index e68a248d5d7..a1c9985be48 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index c6ff2cc27ce..9ccd44f3a01 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 35e555688e0..26353fdf396 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index 19bcc3ee32a..ec57587014d 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map index a8c35bc15c6..59ebd34cfe3 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map index f1623c531a6..9afdf343f77 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map index b199c0dc1ad..5000f3a49b9 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map index ef338fcc887..866e1007e24 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map index 10777c25bd4..0f5e28ddbf7 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js.map index dbab2cdf457..a39cd29ba77 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index f1623c531a6..9afdf343f77 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index b199c0dc1ad..5000f3a49b9 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index a8c35bc15c6..59ebd34cfe3 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 10777c25bd4..0f5e28ddbf7 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index dbab2cdf457..a39cd29ba77 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index ef338fcc887..866e1007e24 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index 5a120cbe800..c4facdba936 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map index 26e7b01ccdb..1706ba76817 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js.map index f92c491640f..07e9825a93a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js.map index 1b563cf259d..d134ab774af 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js.map index 46e8000caa0..d07c1aa0678 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 26e7b01ccdb..1706ba76817 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index f92c491640f..07e9825a93a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 1b563cf259d..d134ab774af 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index 46e8000caa0..d07c1aa0678 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index 28d5511a5ee..64c90d05e88 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map index 88ce97eeeff..7e2762b41a4 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map index f92c491640f..07e9825a93a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map index e28d378dfc0..eb883275568 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js.map index c956b034f6f..4f024886c03 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 88ce97eeeff..7e2762b41a4 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index f92c491640f..07e9825a93a 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index e28d378dfc0..eb883275568 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index c956b034f6f..4f024886c03 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index a46d68e9b05..6d26d850e19 100644 --- a/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/maprootUrlsourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map index fa8f5c4613e..e9a80c428b2 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map index 3d7c6263ee6..9f1206b5b14 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index fa8f5c4613e..e9a80c428b2 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index 3d7c6263ee6..9f1206b5b14 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 28783dfb983..650c9d1e5d5 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index 1361d34702b..6113c44d85d 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"/tests/cases/projects/outputdir_mixed_subfolder/src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map index 90860d39fe5..ab7082a2e8e 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map index b9400dc5624..6bebdd113b6 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map index c50aee154a2..21c996978fd 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map index 11747238b4e..06c30f32eaf 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map index 186a8fb3753..b757263c866 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map index 450cff64fa1..b123ccf13c8 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index b9400dc5624..6bebdd113b6 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index c50aee154a2..21c996978fd 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 90860d39fe5..ab7082a2e8e 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 186a8fb3753..b757263c866 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index 450cff64fa1..b123ccf13c8 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 11747238b4e..06c30f32eaf 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index c1afcd019cc..baeea1e93dc 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_multifolder/src/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map index 3539fcb8d17..ffc39be8044 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map index 6355e109114..6366b8c2d85 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map index 4347d2eb3ea..04bd4e10a3b 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map index 647c302260c..9dc457a0167 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 3539fcb8d17..ffc39be8044 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 6355e109114..6366b8c2d85 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 4347d2eb3ea..04bd4e10a3b 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index 647c302260c..9dc457a0167 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index 13c43235b2b..aa0c2ca28b2 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_simple/src/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map index d39589e4f3e..cd798e72d89 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map index 63351122f3e..6738a871942 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map index 4cd2a39d1c1..81d64320d78 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map index 993894958b0..b2ea9133dfc 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index d39589e4f3e..cd798e72d89 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index 63351122f3e..6738a871942 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index 4cd2a39d1c1..81d64320d78 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index 993894958b0..b2ea9133dfc 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index 8dca8ba1a6c..27b41a837a9 100644 --- a/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootAbsolutePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"/tests/cases/projects/outputdir_module_subfolder/src/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map index 5685e41f2bb..560075530f1 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map index ea96dcd448f..27abb47a45b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index 5685e41f2bb..560075530f1 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index ea96dcd448f..27abb47a45b 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index f9f1f0cd10e..9a9586bd20d 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index 19977a8159b..16e3437b61c 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"../src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"../src/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map index 0f5e1f6de5c..6b4ece94c15 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map index 453bd036286..8271bf25be1 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map index 019c9ca53da..8be239f3553 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map index d32dfbe0fa3..c7ae549832a 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map index a923e39f3eb..37adc61e54f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js.map index faf9a0a8d50..79b428ca3a1 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 453bd036286..8271bf25be1 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index 019c9ca53da..8be239f3553 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 0f5e1f6de5c..6b4ece94c15 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index a923e39f3eb..37adc61e54f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index faf9a0a8d50..79b428ca3a1 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index d32dfbe0fa3..c7ae549832a 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index bb8c756a0b9..4d37f7bfbf5 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map index 05d9f8cb3da..29c8533aded 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js.map index e446b64679d..d713f6b7f5e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js.map index cca0e50d762..8086d9c04da 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js.map index 46798ce7bb4..0d24a0e332a 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 05d9f8cb3da..29c8533aded 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index e446b64679d..d713f6b7f5e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index cca0e50d762..8086d9c04da 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index 46798ce7bb4..0d24a0e332a 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index d70e1816041..7e83d4cd269 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map index 43194290d9d..91793ab1002 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map index e446b64679d..d713f6b7f5e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map index cd7b5d10db4..00e388b171e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js.map index b77575bb8b5..07178ab519f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 43194290d9d..91793ab1002 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index e446b64679d..d713f6b7f5e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index cd7b5d10db4..00e388b171e 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"../src/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index b77575bb8b5..07178ab519f 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index 3c2cbaf1342..223d2cfdad3 100644 --- a/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourceRootRelativePathModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"../src/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js.map index b7c7a763318..c4bc3c32708 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js.map index 57aea3578c6..208dd329040 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index af5f11f8dd3..c0b56df8d90 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index 3d8629098dc..5e34d4494dd 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 06567a4fddd..dce282ee37f 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index d3c0e8697cd..1316ec74659 100644 --- a/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/sourcemapMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile0.js.map index b7c7a763318..c4bc3c32708 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js.map index 41a7fb93ee6..dcdf5faf897 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js.map index dc6ab342a51..096386e968d 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile0.js.map index 57aea3578c6..208dd329040 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js.map index 6af45080bd6..87fa414a454 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js.map index c51718c91d8..a9dba1be1dd 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index a77c789e625..2293c1a7c96 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index 5890568ea24..d21a585cc41 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 502b9145dc8..5d8cf325d52 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 1bc2118f2b7..49bb95f32d5 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index 48cc4f7aa98..a48d929a860 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index 476d3d93966..b9e5ddb335f 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../../outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index 51320616653..d9151baabe4 100644 --- a/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_module_multifolder_ref/m2.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_module_multifolder_ref/m2.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js.map index 41a7fb93ee6..dcdf5faf897 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js.map index 0deeb01864d..9a899efce64 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js.map index 6af45080bd6..87fa414a454 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js.map index 40fdb33821b..57b2f0a9935 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 761471d9d82..128c9957bf4 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index d3fedc589bf..50263c64897 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 2923aa0a014..40d0111893e 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index 8cd970cb557..cc2b2e9b918 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index 105ebefb06e..a910ecda80e 100644 --- a/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js.map index 41a7fb93ee6..dcdf5faf897 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js.map index 0deeb01864d..9a899efce64 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js.map index 6af45080bd6..87fa414a454 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js.map index 92ae347312c..6f71fb82f4c 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 8e4c69b85ca..28136d8ffc3 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index d3fedc589bf..50263c64897 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index f102ba902d9..f5f5dfcd793 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"","sources":["../../../ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index be65d1d02a5..9c9d3ffec92 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index 12c15dd7143..a3532b9e4ce 100644 --- a/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcemapModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map index e68a248d5d7..a1c9985be48 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/amd/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map index c6ff2cc27ce..9ccd44f3a01 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderNoOutdir/node/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map index e68a248d5d7..a1c9985be48 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map index c6ff2cc27ce..9ccd44f3a01 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map index 35e555688e0..26353fdf396 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map index 19bcc3ee32a..ec57587014d 100644 --- a/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map +++ b/tests/baselines/reference/project/sourcerootUrlMixedSubfolderSpecifyOutputFileAndOutputDirectory/amd/bin/outAndOutDirFile.js.map @@ -1 +1 @@ -{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file +{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","ref/m2.ts","test.ts"],"names":[],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACI,MAAM,CAAC,YAAY,CAAC;AACxB,CAAC;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACI,MAAM,CAAC,SAAS,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map index a8c35bc15c6..59ebd34cfe3 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map index f1623c531a6..9afdf343f77 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map index b199c0dc1ad..5000f3a49b9 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map index ef338fcc887..866e1007e24 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/diskFile0.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map index 10777c25bd4..0f5e28ddbf7 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js.map index dbab2cdf457..a39cd29ba77 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index f1623c531a6..9afdf343f77 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map index b199c0dc1ad..5000f3a49b9 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAEW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index a8c35bc15c6..59ebd34cfe3 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/amd/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map index 10777c25bd4..0f5e28ddbf7 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map index dbab2cdf457..a39cd29ba77 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AAC9B,2DAA8D;AACnD,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map index ef338fcc887..866e1007e24 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputDirectory/node/outdir/simple/outputdir_module_multifolder_ref/m2.js.map @@ -1 +1 @@ -{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m2.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder_ref/m2.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map index 5a120cbe800..c4facdba936 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleMultifolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["outputdir_module_multifolder/ref/m1.ts","outputdir_module_multifolder_ref/m2.ts","outputdir_module_multifolder/test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICRU,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICNU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map index 26e7b01ccdb..1706ba76817 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js.map index f92c491640f..07e9825a93a 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js.map index 1b563cf259d..d134ab774af 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js.map index 46e8000caa0..d07c1aa0678 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map index 26e7b01ccdb..1706ba76817 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map index f92c491640f..07e9825a93a 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map index 1b563cf259d..d134ab774af 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map index 46e8000caa0..d07c1aa0678 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,uBAA0B;AACf,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map index 28d5511a5ee..64c90d05e88 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSimpleSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map index 88ce97eeeff..7e2762b41a4 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map index f92c491640f..07e9825a93a 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/amd/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map index e28d378dfc0..eb883275568 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js.map index c956b034f6f..4f024886c03 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderNoOutdir/node/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map index 88ce97eeeff..7e2762b41a4 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map index f92c491640f..07e9825a93a 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/amd/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";;IACW,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map index e28d378dfc0..eb883275568 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/ref/m1.js.map @@ -1 +1 @@ -{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFD,sBAEC;AAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file +{"version":3,"file":"m1.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts"],"names":[],"mappings":";AAAW,QAAA,KAAK,GAAG,EAAE,CAAC;AACtB;IAAA;IAEA,CAAC;IAAD,YAAC;AAAD,CAAC,AAFD,IAEC;AAFY,sBAAK;AAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACI,MAAM,CAAC,oBAAY,CAAC;AACxB,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map index c956b034f6f..4f024886c03 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputDirectory/node/outdir/simple/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFD,gBAEC;AAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["test.ts"],"names":[],"mappings":";AAAA,2BAA8B;AACnB,QAAA,EAAE,GAAG,EAAE,CAAC;AACnB;IAAA;IAEA,CAAC;IAAD,SAAC;AAAD,CAAC,AAFD,IAEC;AAFY,gBAAE;AAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AAChC;IACI,MAAM,CAAC,iBAAS,CAAC;AACrB,CAAC;AAFD,gBAEC;AAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map index a46d68e9b05..6d26d850e19 100644 --- a/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map +++ b/tests/baselines/reference/project/sourcerootUrlModuleSubfolderSpecifyOutputFile/amd/bin/test.js.map @@ -1 +1 @@ -{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFD,sBAEC;IAEU,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFD,gBAEC;IAEU,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file +{"version":3,"file":"test.js","sourceRoot":"http://typescript.codeplex.com/","sources":["ref/m1.ts","test.ts"],"names":[],"mappings":";;IAAW,QAAA,KAAK,GAAG,EAAE,CAAC;IACtB;QAAA;QAEA,CAAC;QAAD,YAAC;IAAD,CAAC,AAFD,IAEC;IAFY,sBAAK;IAIP,QAAA,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACI,MAAM,CAAC,oBAAY,CAAC;IACxB,CAAC;IAFD,sBAEC;;;;ICPU,QAAA,EAAE,GAAG,EAAE,CAAC;IACnB;QAAA;QAEA,CAAC;QAAD,SAAC;IAAD,CAAC,AAFD,IAEC;IAFY,gBAAE;IAIJ,QAAA,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACI,MAAM,CAAC,iBAAS,CAAC;IACrB,CAAC;IAFD,gBAEC;IAEU,QAAA,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC"} \ No newline at end of file diff --git a/tests/baselines/reference/redeclareParameterInCatchBlock.errors.txt b/tests/baselines/reference/redeclareParameterInCatchBlock.errors.txt index bd307bb89ae..9fd4c63f02f 100644 --- a/tests/baselines/reference/redeclareParameterInCatchBlock.errors.txt +++ b/tests/baselines/reference/redeclareParameterInCatchBlock.errors.txt @@ -1,8 +1,11 @@ tests/cases/compiler/redeclareParameterInCatchBlock.ts(5,11): error TS2492: Cannot redeclare identifier 'e' in catch clause tests/cases/compiler/redeclareParameterInCatchBlock.ts(11,9): error TS2492: Cannot redeclare identifier 'e' in catch clause +tests/cases/compiler/redeclareParameterInCatchBlock.ts(17,15): error TS2492: Cannot redeclare identifier 'b' in catch clause +tests/cases/compiler/redeclareParameterInCatchBlock.ts(22,15): error TS2451: Cannot redeclare block-scoped variable 'x'. +tests/cases/compiler/redeclareParameterInCatchBlock.ts(22,21): error TS2451: Cannot redeclare block-scoped variable 'x'. -==== tests/cases/compiler/redeclareParameterInCatchBlock.ts (2 errors) ==== +==== tests/cases/compiler/redeclareParameterInCatchBlock.ts (5 errors) ==== try { @@ -22,10 +25,27 @@ tests/cases/compiler/redeclareParameterInCatchBlock.ts(11,9): error TS2492: Cann try { + } catch ([a, b]) { + const [c, b] = [0, 1]; + ~ +!!! error TS2492: Cannot redeclare identifier 'b' in catch clause + } + + try { + + } catch ({ a: x, b: x }) { + ~ +!!! error TS2451: Cannot redeclare block-scoped variable 'x'. + ~ +!!! error TS2451: Cannot redeclare block-scoped variable 'x'. + + } + + try { + } catch(e) { function test() { let e; } } - \ No newline at end of file diff --git a/tests/baselines/reference/redeclareParameterInCatchBlock.js b/tests/baselines/reference/redeclareParameterInCatchBlock.js index 704d56676bf..9fafe0b17be 100644 --- a/tests/baselines/reference/redeclareParameterInCatchBlock.js +++ b/tests/baselines/reference/redeclareParameterInCatchBlock.js @@ -14,12 +14,23 @@ try { try { +} catch ([a, b]) { + const [c, b] = [0, 1]; +} + +try { + +} catch ({ a: x, b: x }) { + +} + +try { + } catch(e) { function test() { let e; } } - //// [redeclareParameterInCatchBlock.js] @@ -35,6 +46,15 @@ catch (e) { } try { } +catch ([a, b]) { + const [c, b] = [0, 1]; +} +try { +} +catch ({ a: x, b: x }) { +} +try { +} catch (e) { function test() { let e; diff --git a/tests/baselines/reference/scannerEnum1.js b/tests/baselines/reference/scannerEnum1.js index e785a07ace2..5d8b506e62f 100644 --- a/tests/baselines/reference/scannerEnum1.js +++ b/tests/baselines/reference/scannerEnum1.js @@ -6,8 +6,8 @@ //// [scannerEnum1.js] "use strict"; +var CodeGenTarget; (function (CodeGenTarget) { CodeGenTarget[CodeGenTarget["ES3"] = 0] = "ES3"; CodeGenTarget[CodeGenTarget["ES5"] = 1] = "ES5"; -})(exports.CodeGenTarget || (exports.CodeGenTarget = {})); -var CodeGenTarget = exports.CodeGenTarget; +})(CodeGenTarget = exports.CodeGenTarget || (exports.CodeGenTarget = {})); diff --git a/tests/baselines/reference/sourceMapValidationDecorators.js.map b/tests/baselines/reference/sourceMapValidationDecorators.js.map index 535d6603d8c..ac635a518f1 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.js.map +++ b/tests/baselines/reference/sourceMapValidationDecorators.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDecorators.js.map] -{"version":3,"file":"sourceMapValidationDecorators.js","sourceRoot":"","sources":["sourceMapValidationDecorators.ts"],"names":[],"mappings":";;;;;;;;;AASA;IACI,iBAGS,QAAgB;QAIvB,WAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,0BAAc;;QAJP,aAAQ,GAAR,QAAQ,CAAQ;IAKzB,CAAC;IAID,uBAAK,GAAL;QACI,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5C,CAAC;IAUO,oBAAE,GAAV,UAGE,CAAS;QACP,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAID,sBAAI,8BAAS;aAAb;YACI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;aAED,UAGE,SAAiB;YACf,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC9B,CAAC;;;OAPA;IAQL,cAAC;AAAD,CAAC,AA5CD,IA4CC;AArBkB,UAAE,GAAW,EAAE,CAAC;AAV/B;IAFC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;oCAGtB;AAID;IAFC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;kCACL;AAMlB;IACG,WAAA,mBAAmB,CAAA;IACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;iCAGzB;AAID;IAFC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;IAMpB,WAAA,mBAAmB,CAAA;IACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;wCAJzB;AAbD;IAFC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;yBACQ;AAvBnC;IAFC,eAAe;IACf,eAAe,CAAC,EAAE,CAAC;IAGb,WAAA,mBAAmB,CAAA;IACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;IAGvB,WAAA,mBAAmB,CAAA;IACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;WAqC7B"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDecorators.js","sourceRoot":"","sources":["sourceMapValidationDecorators.ts"],"names":[],"mappings":";;;;;;;;;AASA,IAAM,OAAO;IACT,iBAGS,QAAgB;QAIvB,WAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,0BAAc;;QAJP,aAAQ,GAAR,QAAQ,CAAQ;IAKzB,CAAC;IAID,uBAAK,GAAL;QACI,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC5C,CAAC;IAUO,oBAAE,GAAV,UAGE,CAAS;QACP,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAID,sBAAI,8BAAS;aAAb;YACI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;QACzB,CAAC;aAED,UAGE,SAAiB;YACf,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC9B,CAAC;;;OAPA;IAQL,cAAC;AAAD,CAAC,AA5CD,IA4CC;AArBkB,UAAE,GAAW,EAAE,CAAC;AAV/B;IAFC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;oCAGtB;AAID;IAFC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;kCACL;AAMlB;IACG,WAAA,mBAAmB,CAAA;IACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;iCAGzB;AAID;IAFC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;IAMpB,WAAA,mBAAmB,CAAA;IACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;wCAJzB;AAbD;IAFC,kBAAkB;IAClB,kBAAkB,CAAC,EAAE,CAAC;yBACQ;AAvB7B,OAAO;IAFZ,eAAe;IACf,eAAe,CAAC,EAAE,CAAC;IAGb,WAAA,mBAAmB,CAAA;IACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;IAGvB,WAAA,mBAAmB,CAAA;IACnB,WAAA,mBAAmB,CAAC,EAAE,CAAC,CAAA;GAPxB,OAAO,CA4CZ"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt index 37f6a4bea08..d581fdef886 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt @@ -19,7 +19,9 @@ sourceFile:sourceMapValidationDecorators.ts >>>}; >>>var Greeter = (function () { 1 > -2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +2 >^^^^ +3 > ^^^^^^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^-> 1 >declare function ClassDecorator1(target: Function): void; >declare function ClassDecorator2(x: number): (target: Function) => void; >declare function PropertyDecorator1(target: Object, key: string | symbol, descriptor?: PropertyDescriptor): void; @@ -30,13 +32,17 @@ sourceFile:sourceMapValidationDecorators.ts >@ClassDecorator1 >@ClassDecorator2(10) > +2 >class +3 > Greeter 1 >Emitted(10, 1) Source(10, 1) + SourceIndex(0) +2 >Emitted(10, 5) Source(10, 7) + SourceIndex(0) +3 >Emitted(10, 12) Source(10, 14) + SourceIndex(0) --- >>> function Greeter(greeting) { 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^ -1->class Greeter { +1-> { > 2 > constructor( > @ParameterDecorator1 @@ -729,9 +735,12 @@ sourceFile:sourceMapValidationDecorators.ts --- >>>Greeter = __decorate([ 1 > -2 >^^^^^^^^^^^^^^^^^^^^^-> +2 >^^^^^^^ +3 > ^^^^^^^^^^^^^^-> 1 > -1 >Emitted(59, 1) Source(10, 1) + SourceIndex(0) +2 >Greeter +1 >Emitted(59, 1) Source(10, 7) + SourceIndex(0) +2 >Emitted(59, 8) Source(10, 14) + SourceIndex(0) --- >>> ClassDecorator1, 1->^^^^ @@ -846,46 +855,59 @@ sourceFile:sourceMapValidationDecorators.ts 7 >Emitted(65, 40) Source(17, 31) + SourceIndex(0) --- >>>], Greeter); -1 >^^^^^^^^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 > - > ...b: string[]) { - > } - > - > @PropertyDecorator1 - > @PropertyDecorator2(40) - > greet() { - > return "

" + this.greeting + "

"; - > } - > - > @PropertyDecorator1 - > @PropertyDecorator2(50) - > private x: string; - > - > @PropertyDecorator1 - > @PropertyDecorator2(60) - > private static x1: number = 10; - > - > private fn( - > @ParameterDecorator1 - > @ParameterDecorator2(70) - > x: number) { - > return this.greeting; - > } - > - > @PropertyDecorator1 - > @PropertyDecorator2(80) - > get greetings() { - > return this.greeting; - > } - > - > set greetings( - > @ParameterDecorator1 - > @ParameterDecorator2(90) - > greetings: string) { - > this.greeting = greetings; - > } - >} -1 >Emitted(66, 12) Source(54, 2) + SourceIndex(0) +1 >^^^ +2 > ^^^^^^^ +3 > ^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +2 > Greeter +3 > { + > constructor( + > @ParameterDecorator1 + > @ParameterDecorator2(20) + > public greeting: string, + > + > @ParameterDecorator1 + > @ParameterDecorator2(30) + > ...b: string[]) { + > } + > + > @PropertyDecorator1 + > @PropertyDecorator2(40) + > greet() { + > return "

" + this.greeting + "

"; + > } + > + > @PropertyDecorator1 + > @PropertyDecorator2(50) + > private x: string; + > + > @PropertyDecorator1 + > @PropertyDecorator2(60) + > private static x1: number = 10; + > + > private fn( + > @ParameterDecorator1 + > @ParameterDecorator2(70) + > x: number) { + > return this.greeting; + > } + > + > @PropertyDecorator1 + > @PropertyDecorator2(80) + > get greetings() { + > return this.greeting; + > } + > + > set greetings( + > @ParameterDecorator1 + > @ParameterDecorator2(90) + > greetings: string) { + > this.greeting = greetings; + > } + > } +1 >Emitted(66, 4) Source(10, 7) + SourceIndex(0) +2 >Emitted(66, 11) Source(10, 14) + SourceIndex(0) +3 >Emitted(66, 12) Source(54, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationDecorators.js.map \ No newline at end of file diff --git a/tests/baselines/reference/systemModule10.js b/tests/baselines/reference/systemModule10.js index 10afa784ebb..a54afee15d7 100644 --- a/tests/baselines/reference/systemModule10.js +++ b/tests/baselines/reference/systemModule10.js @@ -24,10 +24,10 @@ System.register(["file1", "file2"], function (exports_1, context_1) { } ], execute: function () { - exports_1("x", file1_1.x); - exports_1("y", file1_1.x); exports_1("n", file1_1["default"]); exports_1("n1", file1_1["default"]); + exports_1("x", file1_1.x); + exports_1("y", file1_1.x); exports_1("n2", n2); exports_1("n3", n2); } diff --git a/tests/baselines/reference/systemModule10_ES5.js b/tests/baselines/reference/systemModule10_ES5.js index 830c611bd38..bac2a6003a4 100644 --- a/tests/baselines/reference/systemModule10_ES5.js +++ b/tests/baselines/reference/systemModule10_ES5.js @@ -24,10 +24,10 @@ System.register(["file1", "file2"], function (exports_1, context_1) { } ], execute: function () { - exports_1("x", file1_1.x); - exports_1("y", file1_1.x); exports_1("n", file1_1.default); exports_1("n1", file1_1.default); + exports_1("x", file1_1.x); + exports_1("y", file1_1.x); exports_1("n2", n2); exports_1("n3", n2); } diff --git a/tests/baselines/reference/systemModule11.js b/tests/baselines/reference/systemModule11.js index 7f120cec40d..41574af1d9a 100644 --- a/tests/baselines/reference/systemModule11.js +++ b/tests/baselines/reference/systemModule11.js @@ -46,8 +46,8 @@ System.register(["bar"], function (exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; function foo() { } - var x; exports_1("foo", foo); + var x; var exportedNames_1 = { "x": true, "foo": true @@ -95,8 +95,6 @@ System.register(["bar"], function (exports_1, context_1) { } ], execute: function () { - exports_1("x", x); - exports_1("y1", y); } }; }); @@ -139,10 +137,10 @@ System.register(["a"], function (exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; function foo() { } - function default_1() { } - var x, z, z1; exports_1("foo", foo); + function default_1() { } exports_1("default", default_1); + var x, z, z1; return { setters: [ function (a_1_1) { @@ -153,8 +151,6 @@ System.register(["a"], function (exports_1, context_1) { } ], execute: function () { - exports_1("z", z); - exports_1("z2", z1); } }; }); diff --git a/tests/baselines/reference/systemModule13.js b/tests/baselines/reference/systemModule13.js index c527fd3e811..d3fee049e04 100644 --- a/tests/baselines/reference/systemModule13.js +++ b/tests/baselines/reference/systemModule13.js @@ -8,12 +8,12 @@ for ([x] of [[1]]) {} System.register([], function (exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; - var x, y, z, _a, z0, z1, _b; + var x, y, z, z0, z1, _a, _b; return { setters: [], execute: function () { - _a = [1, 2, 3], exports_1("x", x = _a[0]), exports_1("y", y = _a[1]), exports_1("z", z = _a[2]); - _b = { a: true, b: { c: "123" } }, exports_1("z0", z0 = _b.a), exports_1("z1", z1 = _b.b.c); + exports_1("x", x = (_a = [1, 2, 3], _a[0])), exports_1("y", y = _a[1]), exports_1("z", z = _a[2]); + exports_1("z0", z0 = (_b = { a: true, b: { c: "123" } }, _b.a)), exports_1("z1", z1 = _b.b.c); for (var _i = 0, _a = [[1]]; _i < _a.length; _i++) { exports_1("x", x = _a[_i][0]); } diff --git a/tests/baselines/reference/systemModule14.js b/tests/baselines/reference/systemModule14.js index bebe9244e07..ba4adc7aabc 100644 --- a/tests/baselines/reference/systemModule14.js +++ b/tests/baselines/reference/systemModule14.js @@ -17,6 +17,8 @@ System.register(["foo"], function (exports_1, context_1) { function foo() { return foo_1.a; } + exports_1("foo", foo); + exports_1("b", foo); var foo_1, x; return { setters: [ @@ -25,9 +27,7 @@ System.register(["foo"], function (exports_1, context_1) { } ], execute: function () { - exports_1("foo", foo); x = 1; - exports_1("b", foo); } }; }); diff --git a/tests/baselines/reference/systemModule17.js b/tests/baselines/reference/systemModule17.js index df3d722f3d2..bcdf6612356 100644 --- a/tests/baselines/reference/systemModule17.js +++ b/tests/baselines/reference/systemModule17.js @@ -71,18 +71,18 @@ System.register(["f1"], function (exports_1, context_1) { ], execute: function () { x = 1; + exports_1("x", x); + exports_1("x1", x); (function (N) { N.x = 1; })(N || (N = {})); IX = N.x; - exports_1("x", x); - exports_1("x1", x); + exports_1("IX", IX); + exports_1("IX1", IX); exports_1("A", f1_1.A); exports_1("A1", f1_1.A); exports_1("EA", f1_1.A); exports_1("EA1", f1_1.A); - exports_1("IX", IX); - exports_1("IX1", IX); } }; }); diff --git a/tests/baselines/reference/systemModule3.js b/tests/baselines/reference/systemModule3.js index a8f93941c89..109cbb7187c 100644 --- a/tests/baselines/reference/systemModule3.js +++ b/tests/baselines/reference/systemModule3.js @@ -67,9 +67,9 @@ System.register([], function (exports_1, context_1) { setters: [], execute: function () { default_1 = (function () { - function class_1() { + function default_1() { } - return class_1; + return default_1; }()); exports_1("default", default_1); } diff --git a/tests/baselines/reference/systemModule7.js b/tests/baselines/reference/systemModule7.js index bf34e3f786c..d25ca627e44 100644 --- a/tests/baselines/reference/systemModule7.js +++ b/tests/baselines/reference/systemModule7.js @@ -21,7 +21,7 @@ System.register([], function (exports_1, context_1) { // filename: instantiatedModule.ts (function (M) { var x = 1; - })(M = M || (M = {})); + })(M || (M = {})); exports_1("M", M); } }; diff --git a/tests/baselines/reference/systemModule8.js b/tests/baselines/reference/systemModule8.js index 467c52298fb..3065d4f35b3 100644 --- a/tests/baselines/reference/systemModule8.js +++ b/tests/baselines/reference/systemModule8.js @@ -62,7 +62,7 @@ System.register([], function (exports_1, context_1) { for (exports_1("x", x = 18);; exports_1("x", --x)) { } for (var x_1 = 50;;) { } exports_1("y", y = [1][0]); - _a = { a: true, b: { c: "123" } }, exports_1("z0", z0 = _a.a), exports_1("z1", z1 = _a.b.c); + exports_1("z0", z0 = (_a = { a: true, b: { c: "123" } }, _a.a)), exports_1("z1", z1 = _a.b.c); for (var _i = 0, _a = [[1]]; _i < _a.length; _i++) { exports_1("x", x = _a[_i][0]); } diff --git a/tests/baselines/reference/systemModule9.js b/tests/baselines/reference/systemModule9.js index e46b97a71a2..9e497140083 100644 --- a/tests/baselines/reference/systemModule9.js +++ b/tests/baselines/reference/systemModule9.js @@ -70,7 +70,6 @@ System.register(["file1", "file2", "file3", "file4", "file5", "file6", "file7"], ns2.f(); ns3.f(); y = true; - exports_1("x", x); exports_1("z", y); } }; diff --git a/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js b/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js index 0cd6f472bdb..132d27a4ea0 100644 --- a/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js +++ b/tests/baselines/reference/systemModuleConstEnumsSeparateCompilation.js @@ -20,8 +20,8 @@ System.register([], function (exports_1, context_1) { use(TopLevelConstEnum.X); use(M.NonTopLevelConstEnum.X); } - var TopLevelConstEnum, M; exports_1("foo", foo); + var TopLevelConstEnum, M; return { setters: [], execute: function () { @@ -29,10 +29,10 @@ System.register([], function (exports_1, context_1) { TopLevelConstEnum[TopLevelConstEnum["X"] = 0] = "X"; })(TopLevelConstEnum || (TopLevelConstEnum = {})); (function (M) { + var NonTopLevelConstEnum; (function (NonTopLevelConstEnum) { NonTopLevelConstEnum[NonTopLevelConstEnum["X"] = 0] = "X"; - })(M.NonTopLevelConstEnum || (M.NonTopLevelConstEnum = {})); - var NonTopLevelConstEnum = M.NonTopLevelConstEnum; + })(NonTopLevelConstEnum = M.NonTopLevelConstEnum || (M.NonTopLevelConstEnum = {})); })(M || (M = {})); } }; diff --git a/tests/baselines/reference/systemModuleDeclarationMerging.js b/tests/baselines/reference/systemModuleDeclarationMerging.js index 4dac69c2641..d60a315b0a6 100644 --- a/tests/baselines/reference/systemModuleDeclarationMerging.js +++ b/tests/baselines/reference/systemModuleDeclarationMerging.js @@ -14,14 +14,14 @@ System.register([], function (exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; function F() { } - var C, E; exports_1("F", F); + var C, E; return { setters: [], execute: function () { (function (F) { var x; - })(F = F || (F = {})); + })(F || (F = {})); exports_1("F", F); C = (function () { function C() { @@ -31,14 +31,14 @@ System.register([], function (exports_1, context_1) { exports_1("C", C); (function (C) { var x; - })(C = C || (C = {})); + })(C || (C = {})); exports_1("C", C); (function (E) { })(E || (E = {})); exports_1("E", E); (function (E) { var x; - })(E = E || (E = {})); + })(E || (E = {})); exports_1("E", E); } }; diff --git a/tests/baselines/reference/systemModuleExportDefault.js b/tests/baselines/reference/systemModuleExportDefault.js index 53f63ecb027..67341a04a0b 100644 --- a/tests/baselines/reference/systemModuleExportDefault.js +++ b/tests/baselines/reference/systemModuleExportDefault.js @@ -48,9 +48,9 @@ System.register([], function (exports_1, context_1) { setters: [], execute: function () { default_1 = (function () { - function class_1() { + function default_1() { } - return class_1; + return default_1; }()); exports_1("default", default_1); } diff --git a/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js b/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js index b0498b23f79..df68f32b3bd 100644 --- a/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js +++ b/tests/baselines/reference/systemModuleNonTopLevelModuleMembers.js @@ -17,8 +17,8 @@ System.register([], function (exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; function TopLevelFunction() { } - var TopLevelClass, TopLevelModule, TopLevelEnum, TopLevelModule2; exports_1("TopLevelFunction", TopLevelFunction); + var TopLevelClass, TopLevelModule, TopLevelEnum, TopLevelModule2; return { setters: [], execute: function () { @@ -30,7 +30,7 @@ System.register([], function (exports_1, context_1) { exports_1("TopLevelClass", TopLevelClass); (function (TopLevelModule) { var v; - })(TopLevelModule = TopLevelModule || (TopLevelModule = {})); + })(TopLevelModule || (TopLevelModule = {})); exports_1("TopLevelModule", TopLevelModule); (function (TopLevelEnum) { TopLevelEnum[TopLevelEnum["E"] = 0] = "E"; @@ -49,11 +49,11 @@ System.register([], function (exports_1, context_1) { })(NonTopLevelModule = TopLevelModule2.NonTopLevelModule || (TopLevelModule2.NonTopLevelModule = {})); function NonTopLevelFunction() { } TopLevelModule2.NonTopLevelFunction = NonTopLevelFunction; + var NonTopLevelEnum; (function (NonTopLevelEnum) { NonTopLevelEnum[NonTopLevelEnum["E"] = 0] = "E"; - })(TopLevelModule2.NonTopLevelEnum || (TopLevelModule2.NonTopLevelEnum = {})); - var NonTopLevelEnum = TopLevelModule2.NonTopLevelEnum; - })(TopLevelModule2 = TopLevelModule2 || (TopLevelModule2 = {})); + })(NonTopLevelEnum = TopLevelModule2.NonTopLevelEnum || (TopLevelModule2.NonTopLevelEnum = {})); + })(TopLevelModule2 || (TopLevelModule2 = {})); exports_1("TopLevelModule2", TopLevelModule2); } }; diff --git a/tests/baselines/reference/systemModuleTargetES6.js b/tests/baselines/reference/systemModuleTargetES6.js index a049ea78395..2fe48f4c57b 100644 --- a/tests/baselines/reference/systemModuleTargetES6.js +++ b/tests/baselines/reference/systemModuleTargetES6.js @@ -20,12 +20,12 @@ System.register([], function (exports_1, context_1) { function myFunction() { return new MyClass(); } + exports_1("myFunction", myFunction); function myFunction2() { return new MyClass2(); } - var MyClass, MyClass2; - exports_1("myFunction", myFunction); exports_1("myFunction2", myFunction2); + var MyClass, MyClass2; return { setters: [], execute: function () { @@ -35,8 +35,8 @@ System.register([], function (exports_1, context_1) { MyClass2 = class MyClass2 { static getInstance() { return MyClass2.value; } }; - exports_1("MyClass2", MyClass2); MyClass2.value = 42; + exports_1("MyClass2", MyClass2); } }; }); diff --git a/tests/baselines/reference/tsxDefaultImports.js b/tests/baselines/reference/tsxDefaultImports.js index e7e0a13860d..46a94dea92f 100644 --- a/tests/baselines/reference/tsxDefaultImports.js +++ b/tests/baselines/reference/tsxDefaultImports.js @@ -25,9 +25,9 @@ var SomeClass = (function () { } return SomeClass; }()); +SomeClass.E = SomeEnum; exports.__esModule = true; exports["default"] = SomeClass; -SomeClass.E = SomeEnum; //// [b.js] "use strict"; var a_1 = require("./a"); diff --git a/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.trace.json b/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.trace.json index c734e57cda2..eec78e40192 100644 --- a/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.trace.json +++ b/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.trace.json @@ -44,6 +44,37 @@ "File '/node_modules/@types/xyz/index.ts' does not exist.", "File '/node_modules/@types/xyz/index.tsx' does not exist.", "File '/node_modules/@types/xyz/index.d.ts' does not exist.", + "Loading module 'xyz' from 'node_modules' folder.", + "File '/foo/bar/node_modules/xyz.js' does not exist.", + "File '/foo/bar/node_modules/xyz.jsx' does not exist.", + "File '/foo/bar/node_modules/xyz/package.json' does not exist.", + "File '/foo/bar/node_modules/xyz/index.js' does not exist.", + "File '/foo/bar/node_modules/xyz/index.jsx' does not exist.", + "File '/foo/bar/node_modules/@types/xyz.js' does not exist.", + "File '/foo/bar/node_modules/@types/xyz.jsx' does not exist.", + "File '/foo/bar/node_modules/@types/xyz/package.json' does not exist.", + "File '/foo/bar/node_modules/@types/xyz/index.js' does not exist.", + "File '/foo/bar/node_modules/@types/xyz/index.jsx' does not exist.", + "File '/foo/node_modules/xyz.js' does not exist.", + "File '/foo/node_modules/xyz.jsx' does not exist.", + "File '/foo/node_modules/xyz/package.json' does not exist.", + "File '/foo/node_modules/xyz/index.js' does not exist.", + "File '/foo/node_modules/xyz/index.jsx' does not exist.", + "File '/foo/node_modules/@types/xyz.js' does not exist.", + "File '/foo/node_modules/@types/xyz.jsx' does not exist.", + "File '/foo/node_modules/@types/xyz/package.json' does not exist.", + "File '/foo/node_modules/@types/xyz/index.js' does not exist.", + "File '/foo/node_modules/@types/xyz/index.jsx' does not exist.", + "File '/node_modules/xyz.js' does not exist.", + "File '/node_modules/xyz.jsx' does not exist.", + "File '/node_modules/xyz/package.json' does not exist.", + "File '/node_modules/xyz/index.js' does not exist.", + "File '/node_modules/xyz/index.jsx' does not exist.", + "File '/node_modules/@types/xyz.js' does not exist.", + "File '/node_modules/@types/xyz.jsx' does not exist.", + "File '/node_modules/@types/xyz/package.json' does not exist.", + "File '/node_modules/@types/xyz/index.js' does not exist.", + "File '/node_modules/@types/xyz/index.jsx' does not exist.", "======== Module name 'xyz' was not resolved. ========", "======== Resolving module 'pdq' from '/foo/bar/a.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", @@ -90,6 +121,37 @@ "File '/node_modules/@types/pdq/index.ts' does not exist.", "File '/node_modules/@types/pdq/index.tsx' does not exist.", "File '/node_modules/@types/pdq/index.d.ts' does not exist.", + "Loading module 'pdq' from 'node_modules' folder.", + "File '/foo/bar/node_modules/pdq.js' does not exist.", + "File '/foo/bar/node_modules/pdq.jsx' does not exist.", + "File '/foo/bar/node_modules/pdq/package.json' does not exist.", + "File '/foo/bar/node_modules/pdq/index.js' does not exist.", + "File '/foo/bar/node_modules/pdq/index.jsx' does not exist.", + "File '/foo/bar/node_modules/@types/pdq.js' does not exist.", + "File '/foo/bar/node_modules/@types/pdq.jsx' does not exist.", + "File '/foo/bar/node_modules/@types/pdq/package.json' does not exist.", + "File '/foo/bar/node_modules/@types/pdq/index.js' does not exist.", + "File '/foo/bar/node_modules/@types/pdq/index.jsx' does not exist.", + "File '/foo/node_modules/pdq.js' does not exist.", + "File '/foo/node_modules/pdq.jsx' does not exist.", + "File '/foo/node_modules/pdq/package.json' does not exist.", + "File '/foo/node_modules/pdq/index.js' does not exist.", + "File '/foo/node_modules/pdq/index.jsx' does not exist.", + "File '/foo/node_modules/@types/pdq.js' does not exist.", + "File '/foo/node_modules/@types/pdq.jsx' does not exist.", + "File '/foo/node_modules/@types/pdq/package.json' does not exist.", + "File '/foo/node_modules/@types/pdq/index.js' does not exist.", + "File '/foo/node_modules/@types/pdq/index.jsx' does not exist.", + "File '/node_modules/pdq.js' does not exist.", + "File '/node_modules/pdq.jsx' does not exist.", + "File '/node_modules/pdq/package.json' does not exist.", + "File '/node_modules/pdq/index.js' does not exist.", + "File '/node_modules/pdq/index.jsx' does not exist.", + "File '/node_modules/@types/pdq.js' does not exist.", + "File '/node_modules/@types/pdq.jsx' does not exist.", + "File '/node_modules/@types/pdq/package.json' does not exist.", + "File '/node_modules/@types/pdq/index.js' does not exist.", + "File '/node_modules/@types/pdq/index.jsx' does not exist.", "======== Module name 'pdq' was not resolved. ========", "======== Resolving module 'abc' from '/foo/bar/a.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", @@ -136,6 +198,37 @@ "File '/node_modules/@types/abc/index.ts' does not exist.", "File '/node_modules/@types/abc/index.tsx' does not exist.", "File '/node_modules/@types/abc/index.d.ts' does not exist.", + "Loading module 'abc' from 'node_modules' folder.", + "File '/foo/bar/node_modules/abc.js' does not exist.", + "File '/foo/bar/node_modules/abc.jsx' does not exist.", + "File '/foo/bar/node_modules/abc/package.json' does not exist.", + "File '/foo/bar/node_modules/abc/index.js' does not exist.", + "File '/foo/bar/node_modules/abc/index.jsx' does not exist.", + "File '/foo/bar/node_modules/@types/abc.js' does not exist.", + "File '/foo/bar/node_modules/@types/abc.jsx' does not exist.", + "File '/foo/bar/node_modules/@types/abc/package.json' does not exist.", + "File '/foo/bar/node_modules/@types/abc/index.js' does not exist.", + "File '/foo/bar/node_modules/@types/abc/index.jsx' does not exist.", + "File '/foo/node_modules/abc.js' does not exist.", + "File '/foo/node_modules/abc.jsx' does not exist.", + "File '/foo/node_modules/abc/package.json' does not exist.", + "File '/foo/node_modules/abc/index.js' does not exist.", + "File '/foo/node_modules/abc/index.jsx' does not exist.", + "File '/foo/node_modules/@types/abc.js' does not exist.", + "File '/foo/node_modules/@types/abc.jsx' does not exist.", + "File '/foo/node_modules/@types/abc/package.json' does not exist.", + "File '/foo/node_modules/@types/abc/index.js' does not exist.", + "File '/foo/node_modules/@types/abc/index.jsx' does not exist.", + "File '/node_modules/abc.js' does not exist.", + "File '/node_modules/abc.jsx' does not exist.", + "File '/node_modules/abc/package.json' does not exist.", + "File '/node_modules/abc/index.js' does not exist.", + "File '/node_modules/abc/index.jsx' does not exist.", + "File '/node_modules/@types/abc.js' does not exist.", + "File '/node_modules/@types/abc.jsx' does not exist.", + "File '/node_modules/@types/abc/package.json' does not exist.", + "File '/node_modules/@types/abc/index.js' does not exist.", + "File '/node_modules/@types/abc/index.jsx' does not exist.", "======== Module name 'abc' was not resolved. ========", "======== Resolving type reference directive 'grumpy', containing file '/src/__inferred type names__.ts', root directory '/foo/node_modules/@types,/node_modules/@types'. ========", "Resolving with primary search path '/foo/node_modules/@types, /node_modules/@types'", diff --git a/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.trace.json b/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.trace.json index 7782ffc4ebf..4bb62bc255a 100644 --- a/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.trace.json +++ b/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.trace.json @@ -30,6 +30,27 @@ "File '/node_modules/@types/xyz/index.ts' does not exist.", "File '/node_modules/@types/xyz/index.tsx' does not exist.", "File '/node_modules/@types/xyz/index.d.ts' does not exist.", + "Loading module 'xyz' from 'node_modules' folder.", + "File '/src/node_modules/xyz.js' does not exist.", + "File '/src/node_modules/xyz.jsx' does not exist.", + "File '/src/node_modules/xyz/package.json' does not exist.", + "File '/src/node_modules/xyz/index.js' does not exist.", + "File '/src/node_modules/xyz/index.jsx' does not exist.", + "File '/src/node_modules/@types/xyz.js' does not exist.", + "File '/src/node_modules/@types/xyz.jsx' does not exist.", + "File '/src/node_modules/@types/xyz/package.json' does not exist.", + "File '/src/node_modules/@types/xyz/index.js' does not exist.", + "File '/src/node_modules/@types/xyz/index.jsx' does not exist.", + "File '/node_modules/xyz.js' does not exist.", + "File '/node_modules/xyz.jsx' does not exist.", + "File '/node_modules/xyz/package.json' does not exist.", + "File '/node_modules/xyz/index.js' does not exist.", + "File '/node_modules/xyz/index.jsx' does not exist.", + "File '/node_modules/@types/xyz.js' does not exist.", + "File '/node_modules/@types/xyz.jsx' does not exist.", + "File '/node_modules/@types/xyz/package.json' does not exist.", + "File '/node_modules/@types/xyz/index.js' does not exist.", + "File '/node_modules/@types/xyz/index.jsx' does not exist.", "======== Module name 'xyz' was not resolved. ========", "======== Resolving type reference directive 'foo', containing file '/src/__inferred type names__.ts', root directory '/node_modules/@types'. ========", "Resolving with primary search path '/node_modules/@types'", diff --git a/tests/baselines/reference/typeofAnExportedType.js b/tests/baselines/reference/typeofAnExportedType.js index 91b19d9bebd..69602d3e4c3 100644 --- a/tests/baselines/reference/typeofAnExportedType.js +++ b/tests/baselines/reference/typeofAnExportedType.js @@ -74,10 +74,10 @@ var M; M.C = C; })(M = exports.M || (exports.M = {})); exports.Z = M; +var E; (function (E) { E[E["A"] = 0] = "A"; -})(exports.E || (exports.E = {})); -var E = exports.E; +})(E = exports.E || (exports.E = {})); function foo() { } exports.foo = foo; (function (foo) { diff --git a/tests/baselines/reference/typingsLookup4.trace.json b/tests/baselines/reference/typingsLookup4.trace.json index 4bca8456f58..bb9d94f43b5 100644 --- a/tests/baselines/reference/typingsLookup4.trace.json +++ b/tests/baselines/reference/typingsLookup4.trace.json @@ -68,6 +68,8 @@ "Found 'package.json' at '/node_modules/@types/kquery/package.json'.", "'package.json' has 'typings' field 'kquery' that references '/node_modules/@types/kquery/kquery'.", "File '/node_modules/@types/kquery/kquery' does not exist.", + "File '/node_modules/@types/kquery/kquery.ts' does not exist.", + "File '/node_modules/@types/kquery/kquery.tsx' does not exist.", "File '/node_modules/@types/kquery/kquery.d.ts' exist - use it as a name resolution result.", "======== Type reference directive 'kquery' was successfully resolved to '/node_modules/@types/kquery/kquery.d.ts', primary: true. ========", "======== Resolving type reference directive 'lquery', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ========", @@ -75,19 +77,6 @@ "Found 'package.json' at '/node_modules/@types/lquery/package.json'.", "'package.json' has 'typings' field 'lquery' that references '/node_modules/@types/lquery/lquery'.", "File '/node_modules/@types/lquery/lquery' does not exist.", - "File '/node_modules/@types/lquery/lquery.d.ts' does not exist.", - "File '/node_modules/@types/lquery/index.d.ts' does not exist.", - "Looking up in 'node_modules' folder, initial location '/'", - "File '/node_modules/lquery.ts' does not exist.", - "File '/node_modules/lquery.d.ts' does not exist.", - "File '/node_modules/lquery/package.json' does not exist.", - "File '/node_modules/lquery/index.ts' does not exist.", - "File '/node_modules/lquery/index.d.ts' does not exist.", - "File '/node_modules/@types/lquery.ts' does not exist.", - "File '/node_modules/@types/lquery.d.ts' does not exist.", - "Found 'package.json' at '/node_modules/@types/lquery/package.json'.", - "'package.json' has 'typings' field 'lquery' that references '/node_modules/@types/lquery/lquery'.", - "File '/node_modules/@types/lquery/lquery' does not exist.", "File '/node_modules/@types/lquery/lquery.ts' exist - use it as a name resolution result.", - "======== Type reference directive 'lquery' was successfully resolved to '/node_modules/@types/lquery/lquery.ts', primary: false. ========" + "======== Type reference directive 'lquery' was successfully resolved to '/node_modules/@types/lquery/lquery.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typingsLookupAmd.trace.json b/tests/baselines/reference/typingsLookupAmd.trace.json index 5c83757454c..496166926a8 100644 --- a/tests/baselines/reference/typingsLookupAmd.trace.json +++ b/tests/baselines/reference/typingsLookupAmd.trace.json @@ -2,53 +2,73 @@ "======== Resolving module 'b' from '/x/y/foo.ts'. ========", "Module resolution kind is not specified, using 'Classic'.", "File '/x/y/b.ts' does not exist.", + "File '/x/y/b.tsx' does not exist.", "File '/x/y/b.d.ts' does not exist.", "File '/x/b.ts' does not exist.", + "File '/x/b.tsx' does not exist.", "File '/x/b.d.ts' does not exist.", "File '/b.ts' does not exist.", + "File '/b.tsx' does not exist.", "File '/b.d.ts' does not exist.", "File '/x/y/node_modules/@types/b.ts' does not exist.", + "File '/x/y/node_modules/@types/b.tsx' does not exist.", "File '/x/y/node_modules/@types/b.d.ts' does not exist.", "File '/x/y/node_modules/@types/b/package.json' does not exist.", "File '/x/y/node_modules/@types/b/index.ts' does not exist.", + "File '/x/y/node_modules/@types/b/index.tsx' does not exist.", "File '/x/y/node_modules/@types/b/index.d.ts' does not exist.", "File '/x/node_modules/@types/b.ts' does not exist.", + "File '/x/node_modules/@types/b.tsx' does not exist.", "File '/x/node_modules/@types/b.d.ts' does not exist.", "File '/x/node_modules/@types/b/package.json' does not exist.", "File '/x/node_modules/@types/b/index.ts' does not exist.", + "File '/x/node_modules/@types/b/index.tsx' does not exist.", "File '/x/node_modules/@types/b/index.d.ts' exist - use it as a name resolution result.", "======== Module name 'b' was successfully resolved to '/x/node_modules/@types/b/index.d.ts'. ========", "======== Resolving module 'a' from '/x/node_modules/@types/b/index.d.ts'. ========", "Module resolution kind is not specified, using 'Classic'.", "File '/x/node_modules/@types/b/a.ts' does not exist.", + "File '/x/node_modules/@types/b/a.tsx' does not exist.", "File '/x/node_modules/@types/b/a.d.ts' does not exist.", "File '/x/node_modules/@types/a.ts' does not exist.", + "File '/x/node_modules/@types/a.tsx' does not exist.", "File '/x/node_modules/@types/a.d.ts' does not exist.", "File '/x/node_modules/a.ts' does not exist.", + "File '/x/node_modules/a.tsx' does not exist.", "File '/x/node_modules/a.d.ts' does not exist.", "File '/x/a.ts' does not exist.", + "File '/x/a.tsx' does not exist.", "File '/x/a.d.ts' does not exist.", "File '/a.ts' does not exist.", + "File '/a.tsx' does not exist.", "File '/a.d.ts' does not exist.", "File '/x/node_modules/@types/b/node_modules/@types/a.ts' does not exist.", + "File '/x/node_modules/@types/b/node_modules/@types/a.tsx' does not exist.", "File '/x/node_modules/@types/b/node_modules/@types/a.d.ts' does not exist.", "File '/x/node_modules/@types/b/node_modules/@types/a/package.json' does not exist.", "File '/x/node_modules/@types/b/node_modules/@types/a/index.ts' does not exist.", + "File '/x/node_modules/@types/b/node_modules/@types/a/index.tsx' does not exist.", "File '/x/node_modules/@types/b/node_modules/@types/a/index.d.ts' does not exist.", "File '/x/node_modules/@types/node_modules/@types/a.ts' does not exist.", + "File '/x/node_modules/@types/node_modules/@types/a.tsx' does not exist.", "File '/x/node_modules/@types/node_modules/@types/a.d.ts' does not exist.", "File '/x/node_modules/@types/node_modules/@types/a/package.json' does not exist.", "File '/x/node_modules/@types/node_modules/@types/a/index.ts' does not exist.", + "File '/x/node_modules/@types/node_modules/@types/a/index.tsx' does not exist.", "File '/x/node_modules/@types/node_modules/@types/a/index.d.ts' does not exist.", "File '/x/node_modules/@types/a.ts' does not exist.", + "File '/x/node_modules/@types/a.tsx' does not exist.", "File '/x/node_modules/@types/a.d.ts' does not exist.", "File '/x/node_modules/@types/a/package.json' does not exist.", "File '/x/node_modules/@types/a/index.ts' does not exist.", + "File '/x/node_modules/@types/a/index.tsx' does not exist.", "File '/x/node_modules/@types/a/index.d.ts' does not exist.", "File '/node_modules/@types/a.ts' does not exist.", + "File '/node_modules/@types/a.tsx' does not exist.", "File '/node_modules/@types/a.d.ts' does not exist.", "File '/node_modules/@types/a/package.json' does not exist.", "File '/node_modules/@types/a/index.ts' does not exist.", + "File '/node_modules/@types/a/index.tsx' does not exist.", "File '/node_modules/@types/a/index.d.ts' exist - use it as a name resolution result.", "======== Module name 'a' was successfully resolved to '/node_modules/@types/a/index.d.ts'. ========", "======== Resolving type reference directive 'a', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ========", diff --git a/tests/baselines/reference/untypedModuleImport.js b/tests/baselines/reference/untypedModuleImport.js new file mode 100644 index 00000000000..e3548856411 --- /dev/null +++ b/tests/baselines/reference/untypedModuleImport.js @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/moduleResolution/untypedModuleImport.ts] //// + +//// [index.js] +// This tests that importing from a JS file globally works in an untyped way. +// (Assuming we don't have `--noImplicitAny` or `--allowJs`.) + +This file is not processed. + +//// [a.ts] +import * as foo from "foo"; +foo.bar(); + +//// [b.ts] +import foo = require("foo"); +foo(); + +//// [c.ts] +import foo, { bar } from "foo"; +import "./a"; +import "./b"; +foo(bar()); + + +//// [a.js] +"use strict"; +var foo = require("foo"); +foo.bar(); +//// [b.js] +"use strict"; +var foo = require("foo"); +foo(); +//// [c.js] +"use strict"; +var foo_1 = require("foo"); +require("./a"); +require("./b"); +foo_1["default"](foo_1.bar()); diff --git a/tests/baselines/reference/untypedModuleImport.symbols b/tests/baselines/reference/untypedModuleImport.symbols new file mode 100644 index 00000000000..2cc04ed6efa --- /dev/null +++ b/tests/baselines/reference/untypedModuleImport.symbols @@ -0,0 +1,25 @@ +=== /c.ts === +import foo, { bar } from "foo"; +>foo : Symbol(foo, Decl(c.ts, 0, 6)) +>bar : Symbol(bar, Decl(c.ts, 0, 13)) + +import "./a"; +import "./b"; +foo(bar()); +>foo : Symbol(foo, Decl(c.ts, 0, 6)) +>bar : Symbol(bar, Decl(c.ts, 0, 13)) + +=== /a.ts === +import * as foo from "foo"; +>foo : Symbol(foo, Decl(a.ts, 0, 6)) + +foo.bar(); +>foo : Symbol(foo, Decl(a.ts, 0, 6)) + +=== /b.ts === +import foo = require("foo"); +>foo : Symbol(foo, Decl(b.ts, 0, 0)) + +foo(); +>foo : Symbol(foo, Decl(b.ts, 0, 0)) + diff --git a/tests/baselines/reference/untypedModuleImport.types b/tests/baselines/reference/untypedModuleImport.types new file mode 100644 index 00000000000..8a0c7e97ede --- /dev/null +++ b/tests/baselines/reference/untypedModuleImport.types @@ -0,0 +1,31 @@ +=== /c.ts === +import foo, { bar } from "foo"; +>foo : any +>bar : any + +import "./a"; +import "./b"; +foo(bar()); +>foo(bar()) : any +>foo : any +>bar() : any +>bar : any + +=== /a.ts === +import * as foo from "foo"; +>foo : any + +foo.bar(); +>foo.bar() : any +>foo.bar : any +>foo : any +>bar : any + +=== /b.ts === +import foo = require("foo"); +>foo : any + +foo(); +>foo() : any +>foo : any + diff --git a/tests/baselines/reference/untypedModuleImport_allowJs.js b/tests/baselines/reference/untypedModuleImport_allowJs.js new file mode 100644 index 00000000000..8ca5115a386 --- /dev/null +++ b/tests/baselines/reference/untypedModuleImport_allowJs.js @@ -0,0 +1,16 @@ +//// [tests/cases/conformance/moduleResolution/untypedModuleImport_allowJs.ts] //// + +//// [index.js] +// Same as untypedModuleImport.ts but with --allowJs, so the package will actually be typed. + +exports.default = { bar() { return 0; } } + +//// [a.ts] +import foo from "foo"; +foo.bar(); + + +//// [a.js] +"use strict"; +var foo_1 = require("foo"); +foo_1["default"].bar(); diff --git a/tests/baselines/reference/untypedModuleImport_allowJs.symbols b/tests/baselines/reference/untypedModuleImport_allowJs.symbols new file mode 100644 index 00000000000..d660e811630 --- /dev/null +++ b/tests/baselines/reference/untypedModuleImport_allowJs.symbols @@ -0,0 +1,17 @@ +=== /a.ts === +import foo from "foo"; +>foo : Symbol(foo, Decl(a.ts, 0, 6)) + +foo.bar(); +>foo.bar : Symbol(bar, Decl(index.js, 2, 19)) +>foo : Symbol(foo, Decl(a.ts, 0, 6)) +>bar : Symbol(bar, Decl(index.js, 2, 19)) + +=== /node_modules/foo/index.js === +// Same as untypedModuleImport.ts but with --allowJs, so the package will actually be typed. + +exports.default = { bar() { return 0; } } +>exports : Symbol(default, Decl(index.js, 0, 0)) +>default : Symbol(default, Decl(index.js, 0, 0)) +>bar : Symbol(bar, Decl(index.js, 2, 19)) + diff --git a/tests/baselines/reference/untypedModuleImport_allowJs.types b/tests/baselines/reference/untypedModuleImport_allowJs.types new file mode 100644 index 00000000000..5a34fdcb646 --- /dev/null +++ b/tests/baselines/reference/untypedModuleImport_allowJs.types @@ -0,0 +1,22 @@ +=== /a.ts === +import foo from "foo"; +>foo : { bar(): number; } + +foo.bar(); +>foo.bar() : number +>foo.bar : () => number +>foo : { bar(): number; } +>bar : () => number + +=== /node_modules/foo/index.js === +// Same as untypedModuleImport.ts but with --allowJs, so the package will actually be typed. + +exports.default = { bar() { return 0; } } +>exports.default = { bar() { return 0; } } : { bar(): number; } +>exports.default : any +>exports : any +>default : any +>{ bar() { return 0; } } : { bar(): number; } +>bar : () => number +>0 : 0 + diff --git a/tests/baselines/reference/untypedModuleImport_noImplicitAny.errors.txt b/tests/baselines/reference/untypedModuleImport_noImplicitAny.errors.txt new file mode 100644 index 00000000000..349a944deeb --- /dev/null +++ b/tests/baselines/reference/untypedModuleImport_noImplicitAny.errors.txt @@ -0,0 +1,13 @@ +/a.ts(1,22): error TS7016: Could not find a declaration file for module 'foo'. '/node_modules/foo/index.js' implicitly has an 'any' type. + + +==== /a.ts (1 errors) ==== + import * as foo from "foo"; + ~~~~~ +!!! error TS7016: Could not find a declaration file for module 'foo'. '/node_modules/foo/index.js' implicitly has an 'any' type. + +==== /node_modules/foo/index.js (0 errors) ==== + // This tests that `--noImplicitAny` disables untyped modules. + + This file is not processed. + \ No newline at end of file diff --git a/tests/baselines/reference/untypedModuleImport_noImplicitAny.js b/tests/baselines/reference/untypedModuleImport_noImplicitAny.js new file mode 100644 index 00000000000..ab1e1940e36 --- /dev/null +++ b/tests/baselines/reference/untypedModuleImport_noImplicitAny.js @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/moduleResolution/untypedModuleImport_noImplicitAny.ts] //// + +//// [index.js] +// This tests that `--noImplicitAny` disables untyped modules. + +This file is not processed. + +//// [a.ts] +import * as foo from "foo"; + + +//// [a.js] +"use strict"; diff --git a/tests/baselines/reference/untypedModuleImport_noLocalImports.errors.txt b/tests/baselines/reference/untypedModuleImport_noLocalImports.errors.txt new file mode 100644 index 00000000000..0f376ea61ec --- /dev/null +++ b/tests/baselines/reference/untypedModuleImport_noLocalImports.errors.txt @@ -0,0 +1,13 @@ +/a.ts(1,22): error TS6143: Module './foo' was resolved to '/foo.js', but '--allowJs' is not set. + + +==== /a.ts (1 errors) ==== + import * as foo from "./foo"; + ~~~~~~~ +!!! error TS6143: Module './foo' was resolved to '/foo.js', but '--allowJs' is not set. + +==== /foo.js (0 errors) ==== + // This tests that untyped module imports don't happen with local imports. + + This file is not processed. + \ No newline at end of file diff --git a/tests/baselines/reference/untypedModuleImport_noLocalImports.js b/tests/baselines/reference/untypedModuleImport_noLocalImports.js new file mode 100644 index 00000000000..8fa67a0857f --- /dev/null +++ b/tests/baselines/reference/untypedModuleImport_noLocalImports.js @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/moduleResolution/untypedModuleImport_noLocalImports.ts] //// + +//// [foo.js] +// This tests that untyped module imports don't happen with local imports. + +This file is not processed. + +//// [a.ts] +import * as foo from "./foo"; + + +//// [a.js] +"use strict"; diff --git a/tests/baselines/reference/untypedModuleImport_vsAmbient.js b/tests/baselines/reference/untypedModuleImport_vsAmbient.js new file mode 100644 index 00000000000..080cd443375 --- /dev/null +++ b/tests/baselines/reference/untypedModuleImport_vsAmbient.js @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/moduleResolution/untypedModuleImport_vsAmbient.ts] //// + +//// [index.js] +// This tests that an ambient module declaration overrides an untyped import. + +This file is not processed. + +//// [declarations.d.ts] +declare module "foo" { + export const x: number; +} + +//// [a.ts] +/// +import { x } from "foo"; +x; + + +//// [a.js] +"use strict"; +/// +var foo_1 = require("foo"); +foo_1.x; diff --git a/tests/baselines/reference/untypedModuleImport_vsAmbient.symbols b/tests/baselines/reference/untypedModuleImport_vsAmbient.symbols new file mode 100644 index 00000000000..8def3c6a09b --- /dev/null +++ b/tests/baselines/reference/untypedModuleImport_vsAmbient.symbols @@ -0,0 +1,14 @@ +=== /a.ts === +/// +import { x } from "foo"; +>x : Symbol(x, Decl(a.ts, 1, 8)) + +x; +>x : Symbol(x, Decl(a.ts, 1, 8)) + +=== /declarations.d.ts === +declare module "foo" { + export const x: number; +>x : Symbol(x, Decl(declarations.d.ts, 1, 16)) +} + diff --git a/tests/baselines/reference/untypedModuleImport_vsAmbient.types b/tests/baselines/reference/untypedModuleImport_vsAmbient.types new file mode 100644 index 00000000000..58b0eabefdf --- /dev/null +++ b/tests/baselines/reference/untypedModuleImport_vsAmbient.types @@ -0,0 +1,14 @@ +=== /a.ts === +/// +import { x } from "foo"; +>x : number + +x; +>x : number + +=== /declarations.d.ts === +declare module "foo" { + export const x: number; +>x : number +} + diff --git a/tests/baselines/reference/untypedModuleImport_withAugmentation.errors.txt b/tests/baselines/reference/untypedModuleImport_withAugmentation.errors.txt new file mode 100644 index 00000000000..290cfbc6cbd --- /dev/null +++ b/tests/baselines/reference/untypedModuleImport_withAugmentation.errors.txt @@ -0,0 +1,17 @@ +/a.ts(1,16): error TS2665: Invalid module name in augmentation. Module 'foo' resolves to an untyped module at '/node_modules/foo/index.js', which cannot be augmented. + + +==== /a.ts (1 errors) ==== + declare module "foo" { + ~~~~~ +!!! error TS2665: Invalid module name in augmentation. Module 'foo' resolves to an untyped module at '/node_modules/foo/index.js', which cannot be augmented. + export const x: number; + } + import { x } from "foo"; + x; + +==== /node_modules/foo/index.js (0 errors) ==== + // This tests that augmenting an untyped module is forbidden. + + This file is not processed. + \ No newline at end of file diff --git a/tests/baselines/reference/untypedModuleImport_withAugmentation.js b/tests/baselines/reference/untypedModuleImport_withAugmentation.js new file mode 100644 index 00000000000..17eda95aa8a --- /dev/null +++ b/tests/baselines/reference/untypedModuleImport_withAugmentation.js @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/moduleResolution/untypedModuleImport_withAugmentation.ts] //// + +//// [index.js] +// This tests that augmenting an untyped module is forbidden. + +This file is not processed. + +//// [a.ts] +declare module "foo" { + export const x: number; +} +import { x } from "foo"; +x; + + +//// [a.js] +"use strict"; +var foo_1 = require("foo"); +foo_1.x; diff --git a/tests/baselines/reference/unusedDestructuringParameters.errors.txt b/tests/baselines/reference/unusedDestructuringParameters.errors.txt new file mode 100644 index 00000000000..b6814df6b7a --- /dev/null +++ b/tests/baselines/reference/unusedDestructuringParameters.errors.txt @@ -0,0 +1,15 @@ +tests/cases/compiler/unusedDestructuringParameters.ts(1,13): error TS6133: 'a' is declared but never used. +tests/cases/compiler/unusedDestructuringParameters.ts(3,14): error TS6133: 'a' is declared but never used. + + +==== tests/cases/compiler/unusedDestructuringParameters.ts (2 errors) ==== + const f = ([a]) => { }; + ~ +!!! error TS6133: 'a' is declared but never used. + f([1]); + const f2 = ({a}) => { }; + ~ +!!! error TS6133: 'a' is declared but never used. + f2({ a: 10 }); + const f3 = ([_]) => { }; + f3([10]); \ No newline at end of file diff --git a/tests/baselines/reference/unusedDestructuringParameters.js b/tests/baselines/reference/unusedDestructuringParameters.js new file mode 100644 index 00000000000..ca0ab80b86e --- /dev/null +++ b/tests/baselines/reference/unusedDestructuringParameters.js @@ -0,0 +1,21 @@ +//// [unusedDestructuringParameters.ts] +const f = ([a]) => { }; +f([1]); +const f2 = ({a}) => { }; +f2({ a: 10 }); +const f3 = ([_]) => { }; +f3([10]); + +//// [unusedDestructuringParameters.js] +var f = function (_a) { + var a = _a[0]; +}; +f([1]); +var f2 = function (_a) { + var a = _a.a; +}; +f2({ a: 10 }); +var f3 = function (_a) { + var _ = _a[0]; +}; +f3([10]); diff --git a/tests/baselines/reference/unusedParametersWithUnderscore.errors.txt b/tests/baselines/reference/unusedParametersWithUnderscore.errors.txt index adfe7bb9bc1..5e9ffa993b0 100644 --- a/tests/baselines/reference/unusedParametersWithUnderscore.errors.txt +++ b/tests/baselines/reference/unusedParametersWithUnderscore.errors.txt @@ -2,15 +2,11 @@ tests/cases/compiler/unusedParametersWithUnderscore.ts(2,12): error TS6133: 'a' tests/cases/compiler/unusedParametersWithUnderscore.ts(2,19): error TS6133: 'c' is declared but never used. tests/cases/compiler/unusedParametersWithUnderscore.ts(2,27): error TS6133: 'd' is declared but never used. tests/cases/compiler/unusedParametersWithUnderscore.ts(2,29): error TS6133: 'e___' is declared but never used. -tests/cases/compiler/unusedParametersWithUnderscore.ts(6,14): error TS6133: '_a' is declared but never used. -tests/cases/compiler/unusedParametersWithUnderscore.ts(6,18): error TS6133: '___b' is declared but never used. -tests/cases/compiler/unusedParametersWithUnderscore.ts(9,14): error TS6133: '_a' is declared but never used. -tests/cases/compiler/unusedParametersWithUnderscore.ts(9,19): error TS6133: '___b' is declared but never used. tests/cases/compiler/unusedParametersWithUnderscore.ts(12,16): error TS6133: 'arg' is declared but never used. tests/cases/compiler/unusedParametersWithUnderscore.ts(18,13): error TS6133: 'arg' is declared but never used. -==== tests/cases/compiler/unusedParametersWithUnderscore.ts (10 errors) ==== +==== tests/cases/compiler/unusedParametersWithUnderscore.ts (6 errors) ==== function f(a, _b, c, ___, d,e___, _f) { ~ @@ -25,17 +21,9 @@ tests/cases/compiler/unusedParametersWithUnderscore.ts(18,13): error TS6133: 'ar function f2({_a, __b}) { - ~~ -!!! error TS6133: '_a' is declared but never used. - ~~~ -!!! error TS6133: '___b' is declared but never used. } function f3([_a, ,__b]) { - ~~ -!!! error TS6133: '_a' is declared but never used. - ~~~ -!!! error TS6133: '___b' is declared but never used. } function f4(...arg) { diff --git a/tests/cases/compiler/ambientRequireFunction.ts b/tests/cases/compiler/ambientRequireFunction.ts new file mode 100644 index 00000000000..ce9019e00bc --- /dev/null +++ b/tests/cases/compiler/ambientRequireFunction.ts @@ -0,0 +1,17 @@ +// @module: commonjs +// @allowJs: true +// @outDir: ./out/ + +// @filename: node.d.ts + +declare function require(moduleName: string): any; + +declare module "fs" { + export function readFileSync(s: string): string; +} + +// @filename: app.js +/// + +const fs = require("fs"); +const text = fs.readFileSync("/a/b/c"); \ No newline at end of file diff --git a/tests/cases/compiler/asyncIIFE.ts b/tests/cases/compiler/asyncIIFE.ts new file mode 100644 index 00000000000..904476d855c --- /dev/null +++ b/tests/cases/compiler/asyncIIFE.ts @@ -0,0 +1,10 @@ +// @target: ES6 + +function f1() { + (async () => { + await 10 + throw new Error(); + })(); + + var x = 1; +} diff --git a/tests/cases/compiler/catchClauseWithBindingPattern1.ts b/tests/cases/compiler/catchClauseWithBindingPattern1.ts deleted file mode 100644 index dbd0f81c576..00000000000 --- a/tests/cases/compiler/catchClauseWithBindingPattern1.ts +++ /dev/null @@ -1,4 +0,0 @@ -try { -} -catch ({a}) { -} \ No newline at end of file diff --git a/tests/cases/compiler/constructorWithCapturedSuper.ts b/tests/cases/compiler/constructorWithCapturedSuper.ts new file mode 100644 index 00000000000..942803e771d --- /dev/null +++ b/tests/cases/compiler/constructorWithCapturedSuper.ts @@ -0,0 +1,52 @@ +let oneA: A; + +class A { + constructor() { + return oneA; + } +} + +class B extends A { + constructor(x: number) { + super(); + if (x === 1) { + return; + } + while (x < 2) { + return; + } + try { + return + } + catch (e) { + return; + } + finally { + return; + } + } +} + +class C extends A { + constructor(x: number) { + super(); + for (let i = 0; i < 10; ++i) { + () => i + x; + if (x === 1) { + return; + } + } + } +} + +class D extends A { + constructor(x: number) { + super(); + () => { + return; + } + function foo() { + return; + } + } +} \ No newline at end of file diff --git a/tests/cases/compiler/contextualTypingOfTooShortOverloads.ts b/tests/cases/compiler/contextualTypingOfTooShortOverloads.ts new file mode 100644 index 00000000000..6fa88a1e559 --- /dev/null +++ b/tests/cases/compiler/contextualTypingOfTooShortOverloads.ts @@ -0,0 +1,49 @@ +// small repro from #11875 +var use: Overload; +use((req, res) => {}); + +interface Overload { + (handler1: (req1: string) => void): void; + (handler2: (req2: number, res2: number) => void): void; +} +// larger repro from #11875 +let app: MyApp; +app.use((err: any, req, res, next) => { return; }); + + +interface MyApp { + use: IRouterHandler & IRouterMatcher; +} + +interface IRouterHandler { + (...handlers: RequestHandler[]): T; + (...handlers: RequestHandlerParams[]): T; +} + +interface IRouterMatcher { + (path: PathParams, ...handlers: RequestHandler[]): T; + (path: PathParams, ...handlers: RequestHandlerParams[]): T; +} + +type PathParams = string | RegExp | (string | RegExp)[]; +type RequestHandlerParams = RequestHandler | ErrorRequestHandler | (RequestHandler | ErrorRequestHandler)[]; + +interface RequestHandler { + (req: Request, res: Response, next: NextFunction): any; +} + +interface ErrorRequestHandler { + (err: any, req: Request, res: Response, next: NextFunction): any; +} + +interface Request { + method: string; +} + +interface Response { + statusCode: number; +} + +interface NextFunction { + (err?: any): void; +} diff --git a/tests/cases/compiler/declarationFilesWithTypeReferences1.ts b/tests/cases/compiler/declarationFilesWithTypeReferences1.ts new file mode 100644 index 00000000000..e499543057e --- /dev/null +++ b/tests/cases/compiler/declarationFilesWithTypeReferences1.ts @@ -0,0 +1,14 @@ +// @types: node +// @declaration: true +// @currentDirectory: / + +// @filename: /node_modules/@types/node/index.d.ts +interface Error { + stack2: string; +} + +// @filename: /app.ts + +function foo(): Error { + return undefined; +} \ No newline at end of file diff --git a/tests/cases/compiler/declarationFilesWithTypeReferences2.ts b/tests/cases/compiler/declarationFilesWithTypeReferences2.ts new file mode 100644 index 00000000000..05148955637 --- /dev/null +++ b/tests/cases/compiler/declarationFilesWithTypeReferences2.ts @@ -0,0 +1,14 @@ +// @types: node +// @declaration: true +// @currentDirectory: / + +// @filename: /node_modules/@types/node/index.d.ts +interface Error2 { + stack2: string; +} + +// @filename: /app.ts + +function foo(): Error2 { + return undefined; +} \ No newline at end of file diff --git a/tests/cases/compiler/declarationFilesWithTypeReferences3.ts b/tests/cases/compiler/declarationFilesWithTypeReferences3.ts new file mode 100644 index 00000000000..6653fb11f8b --- /dev/null +++ b/tests/cases/compiler/declarationFilesWithTypeReferences3.ts @@ -0,0 +1,12 @@ +// @declaration: true + +// @filename: /a/node_modules/@types/node/index.d.ts +interface Error2 { + stack2: string; +} + +// @filename: /a/app.ts +/// +function foo(): Error2 { + return undefined; +} \ No newline at end of file diff --git a/tests/cases/compiler/declarationFilesWithTypeReferences4.ts b/tests/cases/compiler/declarationFilesWithTypeReferences4.ts new file mode 100644 index 00000000000..4719feb5664 --- /dev/null +++ b/tests/cases/compiler/declarationFilesWithTypeReferences4.ts @@ -0,0 +1,12 @@ +// @declaration: true + +// @filename: /a/node_modules/@types/node/index.d.ts +interface Error { + stack2: string; +} + +// @filename: /a/app.ts +/// +function foo(): Error { + return undefined; +} \ No newline at end of file diff --git a/tests/cases/compiler/doWhileUnreachableCode.ts b/tests/cases/compiler/doWhileUnreachableCode.ts new file mode 100644 index 00000000000..e4b47fc1afb --- /dev/null +++ b/tests/cases/compiler/doWhileUnreachableCode.ts @@ -0,0 +1,12 @@ +function test() { + let foo = 0; + testLoop: do { + foo++; + continue testLoop; + } while (function() { + var x = 1; + return false; + }()); + + return foo; +} \ No newline at end of file diff --git a/tests/cases/compiler/exportAsNamespace.d.ts b/tests/cases/compiler/exportAsNamespace.d.ts new file mode 100644 index 00000000000..755d4fdb2a9 --- /dev/null +++ b/tests/cases/compiler/exportAsNamespace.d.ts @@ -0,0 +1,4 @@ +// issue: https://github.com/Microsoft/TypeScript/issues/11545 + +export var X; +export as namespace N \ No newline at end of file diff --git a/tests/cases/compiler/extendPrivateConstructorClass.ts b/tests/cases/compiler/extendPrivateConstructorClass.ts new file mode 100644 index 00000000000..90629657f76 --- /dev/null +++ b/tests/cases/compiler/extendPrivateConstructorClass.ts @@ -0,0 +1,8 @@ +declare namespace abc { + class XYZ { + private constructor(); + } +} + +class C extends abc.XYZ { +} diff --git a/tests/cases/compiler/jsxEmitWithAttributes.ts b/tests/cases/compiler/jsxEmitWithAttributes.ts new file mode 100644 index 00000000000..1fb7a9ccf8d --- /dev/null +++ b/tests/cases/compiler/jsxEmitWithAttributes.ts @@ -0,0 +1,53 @@ +//@jsx: react +//@target: es6 +//@module: commonjs +//@reactNamespace: Element + +// @filename: Element.ts +declare namespace JSX { + interface Element { + name: string; + isIntrinsic: boolean; + isCustomElement: boolean; + toString(renderId?: number): string; + bindDOM(renderId?: number): number; + resetComponent(): void; + instantiateComponents(renderId?: number): number; + props: any; + } +} +export namespace Element { + export function isElement(el: any): el is JSX.Element { + return el.markAsChildOfRootElement !== undefined; + } + + export function createElement(args: any[]) { + + return { + } + } +} + +export let createElement = Element.createElement; + +function toCamelCase(text: string): string { + return text[0].toLowerCase() + text.substring(1); +} + +// @filename: test.tsx +import { Element} from './Element'; + +let c: { + a?: { + b: string + } +}; + +class A { + view() { + return [ + , + + ]; + } +} \ No newline at end of file diff --git a/tests/cases/compiler/localRequireFunction.ts b/tests/cases/compiler/localRequireFunction.ts new file mode 100644 index 00000000000..c8f3c2452ff --- /dev/null +++ b/tests/cases/compiler/localRequireFunction.ts @@ -0,0 +1,11 @@ +// @module: commonjs +// @allowJs: true +// @outDir: ./out/ + +// @filename: app.js +function require(a) { + return a; +} + +const fs = require("fs"); +const text = fs.readFileSync("/a/b/c"); \ No newline at end of file diff --git a/tests/cases/compiler/moduleResolutionNoTs.ts b/tests/cases/compiler/moduleResolutionNoTs.ts index 2051bc259bf..fc92d729464 100644 --- a/tests/cases/compiler/moduleResolutionNoTs.ts +++ b/tests/cases/compiler/moduleResolutionNoTs.ts @@ -1,3 +1,4 @@ +// @jsx: Preserve // @filename: x.ts export default 0; diff --git a/tests/cases/compiler/moduleResolutionWithExtensions_notSupported.ts b/tests/cases/compiler/moduleResolutionWithExtensions_notSupported.ts new file mode 100644 index 00000000000..58b039ad8c2 --- /dev/null +++ b/tests/cases/compiler/moduleResolutionWithExtensions_notSupported.ts @@ -0,0 +1,13 @@ +// @noImplicitReferences: true +// @traceResolution: true + +// @Filename: /tsx.tsx + +// @Filename: /jsx.jsx + +// @Filename: /js.js + +// @Filename: /a.ts +import tsx from "./tsx"; +import jsx from "./jsx"; +import js from "./js"; diff --git a/tests/cases/compiler/moduleResolutionWithExtensions_notSupported2.ts b/tests/cases/compiler/moduleResolutionWithExtensions_notSupported2.ts new file mode 100644 index 00000000000..42741fabad6 --- /dev/null +++ b/tests/cases/compiler/moduleResolutionWithExtensions_notSupported2.ts @@ -0,0 +1,9 @@ +// @noImplicitReferences: true +// @allowJs: true +// @traceResolution: true +// Test the error message if we have `--allowJs` but not `--jsx`. + +// @Filename: /jsx.jsx + +// @Filename: /a.ts +import jsx from "./jsx"; diff --git a/tests/cases/compiler/moduleResolutionWithExtensions_notSupported3.ts b/tests/cases/compiler/moduleResolutionWithExtensions_notSupported3.ts new file mode 100644 index 00000000000..e06f603377c --- /dev/null +++ b/tests/cases/compiler/moduleResolutionWithExtensions_notSupported3.ts @@ -0,0 +1,9 @@ +// @noImplicitReferences: true +// @jsx: preserve +// @traceResolution: true +// Test the error message if we have `--jsx` but not `--allowJw`. + +// @Filename: /jsx.jsx + +// @Filename: /a.ts +import jsx from "./jsx"; diff --git a/tests/cases/compiler/moduleResolutionWithExtensions_preferTs.ts b/tests/cases/compiler/moduleResolutionWithExtensions_preferTs.ts new file mode 100644 index 00000000000..5688408b72b --- /dev/null +++ b/tests/cases/compiler/moduleResolutionWithExtensions_preferTs.ts @@ -0,0 +1,10 @@ +// @noImplicitReferences: true +// @traceResolution: true + +// @Filename: /b.js + +// @Filename: /b/index.ts +export default 0; + +// @Filename: /a.ts +import b from "./b"; diff --git a/tests/cases/compiler/moduleResolutionWithExtensions_withAmbientPresent.ts b/tests/cases/compiler/moduleResolutionWithExtensions_withAmbientPresent.ts new file mode 100644 index 00000000000..b41a7e52bd8 --- /dev/null +++ b/tests/cases/compiler/moduleResolutionWithExtensions_withAmbientPresent.ts @@ -0,0 +1,14 @@ +// @noImplicitReferences: true +// @traceResolution: true +// Allowjs is false, but this should *not* warn about the unused 'index.js' + +// @Filename: /node_modules/js/index.js + +// @Filename: /declarations.d.ts +declare module "js" { + export const x = 0; +} + +// @Filename: /a.ts +/// +import { x } from "js"; diff --git a/tests/cases/compiler/moduleResolutionWithSymlinks.ts b/tests/cases/compiler/moduleResolutionWithSymlinks.ts index 8f6f1ca1fbd..4819b68ffc6 100644 --- a/tests/cases/compiler/moduleResolutionWithSymlinks.ts +++ b/tests/cases/compiler/moduleResolutionWithSymlinks.ts @@ -4,7 +4,7 @@ // @filename: /src/library-a/index.ts // @symlink: /src/library-b/node_modules/library-a/index.ts -export class MyClass{} +export class MyClass { private x: number; } // @filename: /src/library-b/index.ts import {MyClass} from "library-a"; diff --git a/tests/cases/compiler/redeclareParameterInCatchBlock.ts b/tests/cases/compiler/redeclareParameterInCatchBlock.ts index 37ca5fc3a9e..7f98d68b29d 100644 --- a/tests/cases/compiler/redeclareParameterInCatchBlock.ts +++ b/tests/cases/compiler/redeclareParameterInCatchBlock.ts @@ -14,9 +14,20 @@ try { try { +} catch ([a, b]) { + const [c, b] = [0, 1]; +} + +try { + +} catch ({ a: x, b: x }) { + +} + +try { + } catch(e) { function test() { let e; } } - diff --git a/tests/cases/compiler/unusedDestructuringParameters.ts b/tests/cases/compiler/unusedDestructuringParameters.ts new file mode 100644 index 00000000000..7c042351049 --- /dev/null +++ b/tests/cases/compiler/unusedDestructuringParameters.ts @@ -0,0 +1,7 @@ +//@noUnusedParameters: true +const f = ([a]) => { }; +f([1]); +const f2 = ({a}) => { }; +f2({ a: 10 }); +const f3 = ([_]) => { }; +f3([10]); \ No newline at end of file diff --git a/tests/cases/conformance/es6/destructuring/destructuringCatch.ts b/tests/cases/conformance/es6/destructuring/destructuringCatch.ts new file mode 100644 index 00000000000..31afd672084 --- /dev/null +++ b/tests/cases/conformance/es6/destructuring/destructuringCatch.ts @@ -0,0 +1,29 @@ +// @noImplicitAny: true + +try { + throw [0, 1]; +} +catch ([a, b]) { + a + b; +} + +try { + throw { a: 0, b: 1 }; +} +catch ({a, b}) { + a + b; +} + +try { + throw [{ x: [0], z: 1 }]; +} +catch ([{x: [y], z}]) { + y + z; +} + +// Test of comment ranges. A fix to GH#11755 should update this. +try { +} +catch (/*Test comment ranges*/[/*a*/a]) { + +} diff --git a/tests/cases/conformance/moduleResolution/untypedModuleImport.ts b/tests/cases/conformance/moduleResolution/untypedModuleImport.ts new file mode 100644 index 00000000000..2ea07db3ee4 --- /dev/null +++ b/tests/cases/conformance/moduleResolution/untypedModuleImport.ts @@ -0,0 +1,21 @@ +// @noImplicitReferences: true +// @currentDirectory: / +// This tests that importing from a JS file globally works in an untyped way. +// (Assuming we don't have `--noImplicitAny` or `--allowJs`.) + +// @filename: /node_modules/foo/index.js +This file is not processed. + +// @filename: /a.ts +import * as foo from "foo"; +foo.bar(); + +// @filename: /b.ts +import foo = require("foo"); +foo(); + +// @filename: /c.ts +import foo, { bar } from "foo"; +import "./a"; +import "./b"; +foo(bar()); diff --git a/tests/cases/conformance/moduleResolution/untypedModuleImport_allowJs.ts b/tests/cases/conformance/moduleResolution/untypedModuleImport_allowJs.ts new file mode 100644 index 00000000000..fe509189d96 --- /dev/null +++ b/tests/cases/conformance/moduleResolution/untypedModuleImport_allowJs.ts @@ -0,0 +1,12 @@ +// @noImplicitReferences: true +// @currentDirectory: / +// @allowJs: true +// @maxNodeModuleJsDepth: 1 +// Same as untypedModuleImport.ts but with --allowJs, so the package will actually be typed. + +// @filename: /node_modules/foo/index.js +exports.default = { bar() { return 0; } } + +// @filename: /a.ts +import foo from "foo"; +foo.bar(); diff --git a/tests/cases/conformance/moduleResolution/untypedModuleImport_noImplicitAny.ts b/tests/cases/conformance/moduleResolution/untypedModuleImport_noImplicitAny.ts new file mode 100644 index 00000000000..1aee7c069de --- /dev/null +++ b/tests/cases/conformance/moduleResolution/untypedModuleImport_noImplicitAny.ts @@ -0,0 +1,10 @@ +// @noImplicitReferences: true +// @currentDirectory: / +// @noImplicitAny: true +// This tests that `--noImplicitAny` disables untyped modules. + +// @filename: /node_modules/foo/index.js +This file is not processed. + +// @filename: /a.ts +import * as foo from "foo"; diff --git a/tests/cases/conformance/moduleResolution/untypedModuleImport_noLocalImports.ts b/tests/cases/conformance/moduleResolution/untypedModuleImport_noLocalImports.ts new file mode 100644 index 00000000000..8313628e6d7 --- /dev/null +++ b/tests/cases/conformance/moduleResolution/untypedModuleImport_noLocalImports.ts @@ -0,0 +1,9 @@ +// @noImplicitReferences: true +// @currentDirectory: / +// This tests that untyped module imports don't happen with local imports. + +// @filename: /foo.js +This file is not processed. + +// @filename: /a.ts +import * as foo from "./foo"; diff --git a/tests/cases/conformance/moduleResolution/untypedModuleImport_vsAmbient.ts b/tests/cases/conformance/moduleResolution/untypedModuleImport_vsAmbient.ts new file mode 100644 index 00000000000..e157772a5ed --- /dev/null +++ b/tests/cases/conformance/moduleResolution/untypedModuleImport_vsAmbient.ts @@ -0,0 +1,16 @@ +// @noImplicitReferences: true +// @currentDirectory: / +// This tests that an ambient module declaration overrides an untyped import. + +// @filename: /node_modules/foo/index.js +This file is not processed. + +// @filename: /declarations.d.ts +declare module "foo" { + export const x: number; +} + +// @filename: /a.ts +/// +import { x } from "foo"; +x; diff --git a/tests/cases/conformance/moduleResolution/untypedModuleImport_withAugmentation.ts b/tests/cases/conformance/moduleResolution/untypedModuleImport_withAugmentation.ts new file mode 100644 index 00000000000..e27c1232d25 --- /dev/null +++ b/tests/cases/conformance/moduleResolution/untypedModuleImport_withAugmentation.ts @@ -0,0 +1,13 @@ +// @noImplicitReferences: true +// @currentDirectory: / +// This tests that augmenting an untyped module is forbidden. + +// @filename: /node_modules/foo/index.js +This file is not processed. + +// @filename: /a.ts +declare module "foo" { + export const x: number; +} +import { x } from "foo"; +x; diff --git a/tests/cases/conformance/references/library-reference-11.ts b/tests/cases/conformance/references/library-reference-11.ts index 6708ceb4ab3..ec1de6e0e9d 100644 --- a/tests/cases/conformance/references/library-reference-11.ts +++ b/tests/cases/conformance/references/library-reference-11.ts @@ -1,3 +1,4 @@ +// @allowJs: true // @noImplicitReferences: true // @traceResolution: true // @currentDirectory: / diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics1.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics1.ts similarity index 82% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics1.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics1.ts index a94318c84fd..8c151742b75 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics1.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics1.ts @@ -4,7 +4,7 @@ // @Filename: a.js //// import a = b; -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "'import ... =' can only be used in a .ts file.", "start": 0, diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics10.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics10.ts similarity index 83% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics10.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics10.ts index 957357fc2c1..206c1a6e2cf 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics10.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics10.ts @@ -4,7 +4,7 @@ // @Filename: a.js //// function F() { } -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "'type parameter declarations' can only be used in a .ts file.", "start": 11, diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics11.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics11.ts similarity index 82% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics11.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics11.ts index d9c16fca651..d9b1d35b5c6 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics11.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics11.ts @@ -4,7 +4,7 @@ // @Filename: a.js //// function F(): number { } -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "'types' can only be used in a .ts file.", "start": 14, diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics12.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics12.ts similarity index 82% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics12.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics12.ts index b4dcf076743..cf244f7cfa2 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics12.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics12.ts @@ -4,7 +4,7 @@ // @Filename: a.js //// declare var v; -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "'declare' can only be used in a .ts file.", "start": 0, diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics13.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics13.ts similarity index 82% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics13.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics13.ts index a20bccc0887..aaf3289fcfe 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics13.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics13.ts @@ -4,7 +4,7 @@ // @Filename: a.js //// var v: () => number; -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "'types' can only be used in a .ts file.", "start": 7, diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics14.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics14.ts similarity index 82% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics14.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics14.ts index 4f7673be384..a41d88dd675 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics14.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics14.ts @@ -4,7 +4,7 @@ // @Filename: a.js //// Foo(); -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "'type arguments' can only be used in a .ts file.", "start": 4, diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics15.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics15.ts similarity index 83% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics15.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics15.ts index f7cd4db3626..93430a9a004 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics15.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics15.ts @@ -4,7 +4,7 @@ // @Filename: a.js //// function F(public p) { } -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "'parameter modifiers' can only be used in a .ts file.", "start": 11, diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics16.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics16.ts similarity index 82% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics16.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics16.ts index cd19bd580cc..60e0684b106 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics16.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics16.ts @@ -4,7 +4,7 @@ // @Filename: a.js //// function F(p?) { } -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "'?' can only be used in a .ts file.", "start": 12, diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics17.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics17.ts similarity index 82% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics17.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics17.ts index 5a1ec6d92cf..3a57917b2ac 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics17.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics17.ts @@ -4,7 +4,7 @@ // @Filename: a.js //// function F(a: number) { } -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "'types' can only be used in a .ts file.", "start": 14, diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics18.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics18.ts similarity index 86% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics18.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics18.ts index 707d1537fc5..d253cb63611 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics18.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics18.ts @@ -9,7 +9,7 @@ ////} goTo.file("a.js"); -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "\'public\' can only be used in a .ts file.", "start": 93, @@ -25,7 +25,7 @@ verify.getSemanticDiagnostics(`[ ////} goTo.file("b.js"); -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "'types' can only be used in a .ts file.", "start": 17, diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics19.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics19.ts similarity index 82% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics19.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics19.ts index a7fbe3e0ecc..7729a6ea470 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics19.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics19.ts @@ -4,7 +4,7 @@ // @Filename: a.js //// enum E { } -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "'enum declarations' can only be used in a .ts file.", "start": 5, diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics2.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics2.ts similarity index 82% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics2.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics2.ts index 9ab29b41798..74e6a9ab089 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics2.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics2.ts @@ -4,7 +4,7 @@ // @Filename: a.js //// export = b; -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "'export=' can only be used in a .ts file.", "start": 0, diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics21.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics21.ts similarity index 100% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics21.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics21.ts diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics22.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics22.ts similarity index 100% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics22.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics22.ts diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics23.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics23.ts similarity index 100% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics23.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics23.ts diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics24.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics24.ts similarity index 100% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics24.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics24.ts diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics3.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics3.ts similarity index 83% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics3.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics3.ts index 3aff51d881b..3528f333329 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics3.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics3.ts @@ -4,7 +4,7 @@ // @Filename: a.js //// class C { } -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "'type parameter declarations' can only be used in a .ts file.", "start": 8, diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics4.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics4.ts similarity index 82% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics4.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics4.ts index 99319b047e6..3b849b08ae0 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics4.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics4.ts @@ -4,7 +4,7 @@ // @Filename: a.js //// public class C { } -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "'public' can only be used in a .ts file.", "start": 0, diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics5.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics5.ts similarity index 83% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics5.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics5.ts index 18df3500bd9..985e3284025 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics5.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics5.ts @@ -4,7 +4,7 @@ // @Filename: a.js //// class C implements D { } -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "'implements clauses' can only be used in a .ts file.", "start": 8, diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics6.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics6.ts similarity index 83% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics6.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics6.ts index e18f8f9be52..a0042a0529b 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics6.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics6.ts @@ -4,7 +4,7 @@ // @Filename: a.js //// interface I { } -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "'interface declarations' can only be used in a .ts file.", "start": 10, diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics7.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics7.ts similarity index 82% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics7.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics7.ts index 32cad0e5a07..64216d1e364 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics7.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics7.ts @@ -4,7 +4,7 @@ // @Filename: a.js //// module M { } -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "'module declarations' can only be used in a .ts file.", "start": 7, diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics8.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics8.ts similarity index 82% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics8.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics8.ts index 562f42124ae..296f4f7445e 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics8.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics8.ts @@ -4,7 +4,7 @@ // @Filename: a.js //// type a = b; -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "'type aliases' can only be used in a .ts file.", "start": 5, diff --git a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics9.ts b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics9.ts similarity index 82% rename from tests/cases/fourslash/getJavaScriptSemanticDiagnostics9.ts rename to tests/cases/fourslash/getJavaScriptSyntacticDiagnostics9.ts index 4c531b5255b..f2c20a52ee9 100644 --- a/tests/cases/fourslash/getJavaScriptSemanticDiagnostics9.ts +++ b/tests/cases/fourslash/getJavaScriptSyntacticDiagnostics9.ts @@ -4,7 +4,7 @@ // @Filename: a.js //// public function F() { } -verify.getSemanticDiagnostics(`[ +verify.getSyntacticDiagnostics(`[ { "message": "'public' can only be used in a .ts file.", "start": 0, diff --git a/tests/cases/fourslash/incorrectJsDocObjectLiteralType.ts b/tests/cases/fourslash/incorrectJsDocObjectLiteralType.ts new file mode 100644 index 00000000000..ddf65ec0e8a --- /dev/null +++ b/tests/cases/fourslash/incorrectJsDocObjectLiteralType.ts @@ -0,0 +1,8 @@ +/// + +//// /**/ + +goTo.marker(); +verify.navigationItemsListCount(0, "foo", "exact"); +edit.insert("/**\n * @typedef {Object} foo\n * @property {any} [obj]\n */\nexport default function foo() {\n}"); +verify.navigationItemsListContains("foo", "function", "foo", "exact"); diff --git a/tests/cases/fourslash/indentationWithBaseIndent.ts b/tests/cases/fourslash/indentationWithBaseIndent.ts index 53ee01c9a3c..112ce225d01 100644 --- a/tests/cases/fourslash/indentationWithBaseIndent.ts +++ b/tests/cases/fourslash/indentationWithBaseIndent.ts @@ -205,7 +205,6 @@ //// function unterminatedListIndentation(a, ////{| "indent": 14 , "baseIndentSize": 10 |} -debugger; test.markers().forEach(marker => { verify.indentationAtPositionIs(marker.fileName, marker.position, marker.data.indent, ts.IndentStyle.Smart, marker.data.baseIndentSize); }); diff --git a/tests/cases/fourslash/navigationBarItemsFunctionProperties.ts b/tests/cases/fourslash/navigationBarItemsFunctionProperties.ts new file mode 100644 index 00000000000..75c20736b41 --- /dev/null +++ b/tests/cases/fourslash/navigationBarItemsFunctionProperties.ts @@ -0,0 +1,33 @@ +/// + +//// (function(){ +//// var A; +//// A/*1*/ +//// .a = function() { }; +//// })(); + +function navExact(name: string, kind: string) { + return; +} + +verify.navigationTree( +{ + "text": "", + "kind": "script", + "childItems": [ + { + "text": "", + "kind": "function", + "childItems": [ + { + "text": "A", + "kind": "var" + }, + { + "text": "A.a", + "kind": "function" + } + ] + } + ] +}); \ No newline at end of file diff --git a/tests/cases/fourslash/server/completions03.ts b/tests/cases/fourslash/server/completions03.ts new file mode 100644 index 00000000000..ef5f1651951 --- /dev/null +++ b/tests/cases/fourslash/server/completions03.ts @@ -0,0 +1,20 @@ +/// + +// issue: https://github.com/Microsoft/TypeScript/issues/10108 + +//// interface Foo { +//// one: any; +//// two: any; +//// three: any; +//// } +//// +//// let x: Foo = { +//// get one() { return "" }, +//// set two(t) {}, +//// /**/ +//// } + +goTo.marker(""); +verify.completionListContains("three"); +verify.not.completionListContains("one"); +verify.not.completionListContains("two"); diff --git a/tests/cases/fourslash/server/getJavaScriptSyntacticDiagnostics02.ts b/tests/cases/fourslash/server/getJavaScriptSyntacticDiagnostics02.ts new file mode 100644 index 00000000000..dd9becad10b --- /dev/null +++ b/tests/cases/fourslash/server/getJavaScriptSyntacticDiagnostics02.ts @@ -0,0 +1,40 @@ +/// + +// @allowJs: true +// @Filename: b.js +//// var a = "a"; +//// var b: boolean = true; +//// function foo(): string { } +//// var var = "c"; + +verify.getSyntacticDiagnostics(`[ + { + "message": "\'types\' can only be used in a .ts file.", + "start": 20, + "length": 7, + "category": "error", + "code": 8010 + }, + { + "message": "Variable declaration expected.", + "start": 67, + "length": 3, + "category": "error", + "code": 1134 + }, + { + "message": "Variable declaration expected.", + "start": 71, + "length": 1, + "category": "error", + "code": 1134 + }, + { + "message": "Variable declaration expected.", + "start": 73, + "length": 3, + "category": "error", + "code": 1134 + } +]`); +verify.getSemanticDiagnostics(`[]`); \ No newline at end of file diff --git a/tests/cases/fourslash/server/jsdocTypedefTagNamespace.ts b/tests/cases/fourslash/server/jsdocTypedefTagNamespace.ts new file mode 100644 index 00000000000..1d7a0bf318a --- /dev/null +++ b/tests/cases/fourslash/server/jsdocTypedefTagNamespace.ts @@ -0,0 +1,27 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: jsdocCompletion_typedef.js + +//// /** +//// * @typedef {string | number} T.NumberLike +//// * @typedef {{age: number}} T.People +//// * @typedef {string | number} T.O.Q.NumberLike +//// * @type {T.NumberLike} +//// */ +//// var x; x./*1*/; +//// /** @type {T.O.Q.NumberLike} */ +//// var x1; x1./*2*/; +//// /** @type {T.People} */ +//// var x1; x1./*3*/; + +goTo.marker("1"); +verify.memberListContains('charAt'); +verify.memberListContains('toExponential'); + +goTo.marker("2"); +verify.memberListContains('age'); + +goTo.marker("3"); +verify.memberListContains('charAt'); +verify.memberListContains('toExponential'); \ No newline at end of file diff --git a/tests/cases/fourslash/untypedModuleImport.ts b/tests/cases/fourslash/untypedModuleImport.ts new file mode 100644 index 00000000000..d128ad24ea3 --- /dev/null +++ b/tests/cases/fourslash/untypedModuleImport.ts @@ -0,0 +1,22 @@ +/// + +// @Filename: node_modules/foo/index.js +////{} + +// @Filename: a.ts +////import /*foo*/[|foo|] from /*fooModule*/"foo"; +////[|foo|](); + +goTo.file("a.ts"); +debug.printErrorList(); +verify.numberOfErrorsInCurrentFile(0); + +goTo.marker("fooModule"); +verify.goToDefinitionIs([]); +verify.quickInfoIs(""); +verify.referencesAre([]) + +goTo.marker("foo"); +verify.goToDefinitionIs([]); +verify.quickInfoIs("import foo"); +verify.rangesReferenceEachOther();