merge with master

This commit is contained in:
Vladimir Matveev
2015-11-10 12:22:48 -08:00
1111 changed files with 16770 additions and 24561 deletions
+1
View File
@@ -1,6 +1,7 @@
language: node_js
node_js:
- 'stable'
- '4'
- '0.10'
+4 -1
View File
@@ -228,7 +228,7 @@ var builtLocalCompiler = path.join(builtLocalDirectory, compilerFilename);
function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile, generateDeclarations, outDir, preserveConstEnums, keepComments, noResolve, stripInternal, callback) {
file(outFile, prereqs, function() {
var compilerPath = useBuiltCompiler ? builtLocalCompiler : LKGCompiler;
var options = "--module commonjs --noImplicitAny --noEmitOnError --pretty";
var options = "--noImplicitAny --noEmitOnError --pretty";
// Keep comments when specifically requested
// or when in debug mode.
@@ -251,6 +251,9 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOu
if (!noOutFile) {
options += " --out " + outFile;
}
else {
options += " --module commonjs"
}
if(noResolve) {
options += " --noResolve";
+81 -25
View File
@@ -81,7 +81,7 @@ namespace ts {
symbolToString,
getAugmentedPropertiesOfType,
getRootSymbols,
getContextualType,
getContextualType: getApparentTypeOfContextualType,
getFullyQualifiedName,
getResolvedSignature,
getConstantValue,
@@ -1653,7 +1653,7 @@ namespace ts {
writeAnonymousType(<ObjectType>type, flags);
}
else if (type.flags & TypeFlags.StringLiteral) {
writer.writeStringLiteral((<StringLiteralType>type).text);
writer.writeStringLiteral(`"${escapeString((<StringLiteralType>type).text)}"`);
}
else {
// Should never get here
@@ -4411,12 +4411,13 @@ namespace ts {
}
function getStringLiteralType(node: StringLiteral): StringLiteralType {
if (hasProperty(stringLiteralTypes, node.text)) {
return stringLiteralTypes[node.text];
const text = node.text;
if (hasProperty(stringLiteralTypes, text)) {
return stringLiteralTypes[text];
}
const type = stringLiteralTypes[node.text] = <StringLiteralType>createType(TypeFlags.StringLiteral);
type.text = getTextOfNode(node);
const type = stringLiteralTypes[text] = <StringLiteralType>createType(TypeFlags.StringLiteral);
type.text = text;
return type;
}
@@ -5084,9 +5085,6 @@ namespace ts {
}
function typeParameterIdenticalTo(source: TypeParameter, target: TypeParameter): Ternary {
if (source.symbol.name !== target.symbol.name) {
return Ternary.False;
}
// covers case when both type parameters does not have constraint (both equal to noConstraintType)
if (source.constraint === target.constraint) {
return Ternary.True;
@@ -5747,6 +5745,10 @@ namespace ts {
return !!getPropertyOfType(type, "0");
}
function isStringLiteralType(type: Type) {
return type.flags & TypeFlags.StringLiteral;
}
/**
* Check if a Type was written as a tuple type literal.
* Prefer using isTupleLikeType() unless the use of `elementTypes` is required.
@@ -6979,7 +6981,7 @@ namespace ts {
else if (operator === SyntaxKind.BarBarToken) {
// When an || expression has a contextual type, the operands are contextually typed by that type. When an ||
// expression has no contextual type, the right operand is contextually typed by the type of the left operand.
let type = getContextualType(binaryExpression);
let type = getApparentTypeOfContextualType(binaryExpression);
if (!type && node === binaryExpression.right) {
type = checkExpression(binaryExpression.left);
}
@@ -7026,6 +7028,10 @@ namespace ts {
return applyToContextualType(type, t => getIndexTypeOfStructuredType(t, kind));
}
function contextualTypeIsStringLiteralType(type: Type): boolean {
return !!(type.flags & TypeFlags.Union ? forEach((<UnionType>type).types, isStringLiteralType) : isStringLiteralType(type));
}
// Return true if the given contextual type is a tuple-like type
function contextualTypeIsTupleLikeType(type: Type): boolean {
return !!(type.flags & TypeFlags.Union ? forEach((<UnionType>type).types, isTupleLikeType) : isTupleLikeType(type));
@@ -7051,7 +7057,7 @@ namespace ts {
function getContextualTypeForObjectLiteralElement(element: ObjectLiteralElement) {
const objectLiteral = <ObjectLiteralExpression>element.parent;
const type = getContextualType(objectLiteral);
const type = getApparentTypeOfContextualType(objectLiteral);
if (type) {
if (!hasDynamicName(element)) {
// For a (non-symbol) computed property, there is no reason to look up the name
@@ -7077,7 +7083,7 @@ namespace ts {
// type of T.
function getContextualTypeForElementExpression(node: Expression): Type {
const arrayLiteral = <ArrayLiteralExpression>node.parent;
const type = getContextualType(arrayLiteral);
const type = getApparentTypeOfContextualType(arrayLiteral);
if (type) {
const index = indexOf(arrayLiteral.elements, node);
return getTypeOfPropertyOfContextualType(type, "" + index)
@@ -7090,7 +7096,7 @@ namespace ts {
// In a contextually typed conditional expression, the true/false expressions are contextually typed by the same type.
function getContextualTypeForConditionalOperand(node: Expression): Type {
const conditional = <ConditionalExpression>node.parent;
return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional) : undefined;
return node === conditional.whenTrue || node === conditional.whenFalse ? getApparentTypeOfContextualType(conditional) : undefined;
}
function getContextualTypeForJsxExpression(expr: JsxExpression | JsxSpreadAttribute): Type {
@@ -7115,12 +7121,22 @@ namespace ts {
// Return the contextual type for a given expression node. During overload resolution, a contextual type may temporarily
// be "pushed" onto a node using the contextualType property.
function getContextualType(node: Expression): Type {
const type = getContextualTypeWorker(node);
function getApparentTypeOfContextualType(node: Expression): Type {
const type = getContextualType(node);
return type && getApparentType(type);
}
function getContextualTypeWorker(node: Expression): Type {
/**
* Woah! Do you really want to use this function?
*
* Unless you're trying to get the *non-apparent* type for a value-literal type,
* you probably meant to use 'getApparentTypeOfContextualType'.
* Otherwise this is slightly less useful.
*
* @param node the expression whose contextual type will be returned.
* @returns the contextual type of an expression.
*/
function getContextualType(node: Expression): Type {
if (isInsideWithStatementBody(node)) {
// We cannot answer semantic questions within a with block, do not proceed any further
return undefined;
@@ -7159,7 +7175,7 @@ namespace ts {
Debug.assert(parent.parent.kind === SyntaxKind.TemplateExpression);
return getContextualTypeForSubstitutionExpression(<TemplateExpression>parent.parent, node);
case SyntaxKind.ParenthesizedExpression:
return getContextualType(<ParenthesizedExpression>parent);
return getApparentTypeOfContextualType(<ParenthesizedExpression>parent);
case SyntaxKind.JsxExpression:
case SyntaxKind.JsxSpreadAttribute:
return getContextualTypeForJsxExpression(<JsxExpression>parent);
@@ -7199,7 +7215,7 @@ namespace ts {
Debug.assert(node.kind !== SyntaxKind.MethodDeclaration || isObjectLiteralMethod(node));
const type = isObjectLiteralMethod(node)
? getContextualTypeForObjectLiteralMethod(node)
: getContextualType(node);
: getApparentTypeOfContextualType(node);
if (!type) {
return undefined;
}
@@ -7329,7 +7345,7 @@ namespace ts {
type.pattern = node;
return type;
}
const contextualType = getContextualType(node);
const contextualType = getApparentTypeOfContextualType(node);
if (contextualType && contextualTypeIsTupleLikeType(contextualType)) {
const pattern = contextualType.pattern;
// If array literal is contextually typed by a binding pattern or an assignment pattern, pad the resulting
@@ -7421,7 +7437,7 @@ namespace ts {
const propertiesTable: SymbolTable = {};
const propertiesArray: Symbol[] = [];
const contextualType = getContextualType(node);
const contextualType = getApparentTypeOfContextualType(node);
const contextualTypeHasPattern = contextualType && contextualType.pattern &&
(contextualType.pattern.kind === SyntaxKind.ObjectBindingPattern || contextualType.pattern.kind === SyntaxKind.ObjectLiteralExpression);
let typeFlags: TypeFlags = 0;
@@ -9422,7 +9438,12 @@ namespace ts {
const targetType = getTypeFromTypeNode(node.type);
if (produceDiagnostics && targetType !== unknownType) {
const widenedType = getWidenedType(exprType);
if (!(isTypeAssignableTo(targetType, widenedType))) {
// Permit 'number[] | "foo"' to be asserted to 'string'.
const bothAreStringLike =
someConstituentTypeHasKind(targetType, TypeFlags.StringLike) &&
someConstituentTypeHasKind(widenedType, TypeFlags.StringLike);
if (!bothAreStringLike && !(isTypeAssignableTo(targetType, widenedType))) {
checkTypeAssignableTo(exprType, targetType, node, Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other);
}
}
@@ -10252,6 +10273,10 @@ namespace ts {
case SyntaxKind.ExclamationEqualsToken:
case SyntaxKind.EqualsEqualsEqualsToken:
case SyntaxKind.ExclamationEqualsEqualsToken:
// Permit 'number[] | "foo"' to be asserted to 'string'.
if (someConstituentTypeHasKind(leftType, TypeFlags.StringLike) && someConstituentTypeHasKind(rightType, TypeFlags.StringLike)) {
return booleanType;
}
if (!isTypeAssignableTo(leftType, rightType) && !isTypeAssignableTo(rightType, leftType)) {
reportOperatorError();
}
@@ -10390,6 +10415,15 @@ namespace ts {
return getUnionType([type1, type2]);
}
function checkStringLiteralExpression(node: StringLiteral): Type {
const contextualType = getContextualType(node);
if (contextualType && contextualTypeIsStringLiteralType(contextualType)) {
return getStringLiteralType(node);
}
return stringType;
}
function checkTemplateExpression(node: TemplateExpression): Type {
// We just want to check each expressions, but we are unconcerned with
// the type of each expression, as any value may be coerced into a string.
@@ -10449,7 +10483,7 @@ namespace ts {
if (isInferentialContext(contextualMapper)) {
const signature = getSingleCallSignature(type);
if (signature && signature.typeParameters) {
const contextualType = getContextualType(<Expression>node);
const contextualType = getApparentTypeOfContextualType(<Expression>node);
if (contextualType) {
const contextualSignature = getSingleCallSignature(contextualType);
if (contextualSignature && !contextualSignature.typeParameters) {
@@ -10520,6 +10554,7 @@ namespace ts {
case SyntaxKind.TemplateExpression:
return checkTemplateExpression(<TemplateExpression>node);
case SyntaxKind.StringLiteral:
return checkStringLiteralExpression(<StringLiteral>node);
case SyntaxKind.NoSubstitutionTemplateLiteral:
return stringType;
case SyntaxKind.RegularExpressionLiteral:
@@ -12714,6 +12749,7 @@ namespace ts {
let hasDuplicateDefaultClause = false;
const expressionType = checkExpression(node.expression);
const expressionTypeIsStringLike = someConstituentTypeHasKind(expressionType, TypeFlags.StringLike);
forEach(node.caseBlock.clauses, clause => {
// Grammar check for duplicate default clauses, skip if we already report duplicate default clause
if (clause.kind === SyntaxKind.DefaultClause && !hasDuplicateDefaultClause) {
@@ -12734,6 +12770,12 @@ namespace ts {
// TypeScript 1.0 spec (April 2014):5.9
// In a 'switch' statement, each 'case' expression must be of a type that is assignable to or from the type of the 'switch' expression.
const caseType = checkExpression(caseClause.expression);
// Permit 'number[] | "foo"' to be asserted to 'string'.
if (expressionTypeIsStringLike && someConstituentTypeHasKind(caseType, TypeFlags.StringLike)) {
return;
}
if (!isTypeAssignableTo(expressionType, caseType)) {
// check 'expressionType isAssignableTo caseType' failed, try the reversed check and report errors if it fails
checkTypeAssignableTo(caseType, expressionType, caseClause.expression, /*headMessage*/ undefined);
@@ -14089,8 +14131,12 @@ namespace ts {
if (!(links.flags & NodeCheckFlags.TypeChecked)) {
// Check whether the file has declared it is the default lib,
// and whether the user has specifically chosen to avoid checking it.
if (node.isDefaultLib && compilerOptions.skipDefaultLibCheck) {
return;
if (compilerOptions.skipDefaultLibCheck) {
// If the user specified '--noLib' and a file has a '/// <reference no-default-lib="true"/>',
// then we should treat that file as a default lib.
if (node.hasNoDefaultLib) {
return;
}
}
// Grammar checking
@@ -14959,10 +15005,20 @@ namespace ts {
getTypeReferenceSerializationKind,
isOptionalParameter,
moduleExportsSomeValue,
isArgumentsLocalBinding
isArgumentsLocalBinding,
getExternalModuleFileFromDeclaration
};
}
function getExternalModuleFileFromDeclaration(declaration: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration): SourceFile {
const specifier = getExternalModuleName(declaration);
const moduleSymbol = getSymbolAtLocation(specifier);
if (!moduleSymbol) {
return undefined;
}
return getDeclarationOfKind(moduleSymbol, SyntaxKind.SourceFile) as SourceFile;
}
function initializeTypeChecker() {
// Bind all source files and propagate errors
forEach(host.getSourceFiles(), file => {
+56 -7
View File
@@ -58,8 +58,9 @@ namespace ts {
let errorNameNode: DeclarationName;
const emitJsDocComments = compilerOptions.removeComments ? function (declaration: Node) { } : writeJsDocComments;
const emit = compilerOptions.stripInternal ? stripInternal : emitNode;
let noDeclare = !root;
const moduleElementDeclarationEmitInfo: ModuleElementDeclarationEmitInfo[] = [];
let moduleElementDeclarationEmitInfo: ModuleElementDeclarationEmitInfo[] = [];
let asynchronousSubModuleDeclarationEmitInfo: ModuleElementDeclarationEmitInfo[];
// Contains the reference paths that needs to go in the declaration file.
@@ -107,15 +108,16 @@ namespace ts {
else {
// Emit references corresponding to this file
const emittedReferencedFiles: SourceFile[] = [];
let prevModuleElementDeclarationEmitInfo: ModuleElementDeclarationEmitInfo[] = [];
forEach(host.getSourceFiles(), sourceFile => {
if (!isExternalModuleOrDeclarationFile(sourceFile)) {
if (!isDeclarationFile(sourceFile)) {
// Check what references need to be added
if (!compilerOptions.noResolve) {
forEach(sourceFile.referencedFiles, fileReference => {
const referencedFile = tryResolveScriptReference(host, sourceFile, fileReference);
// If the reference file is a declaration file or an external module, emit that reference
if (referencedFile && (isExternalModuleOrDeclarationFile(referencedFile) &&
// If the reference file is a declaration file, emit that reference
if (referencedFile && (isDeclarationFile(referencedFile) &&
!contains(emittedReferencedFiles, referencedFile))) { // If the file reference was not already emitted
writeReferencePath(referencedFile);
@@ -123,10 +125,43 @@ namespace ts {
}
});
}
}
if (!isExternalModuleOrDeclarationFile(sourceFile)) {
noDeclare = false;
emitSourceFile(sourceFile);
}
else if (isExternalModule(sourceFile)) {
noDeclare = true;
write(`declare module "${getResolvedExternalModuleName(host, sourceFile)}" {`);
writeLine();
increaseIndent();
emitSourceFile(sourceFile);
decreaseIndent();
write("}");
writeLine();
// create asynchronous output for the importDeclarations
if (moduleElementDeclarationEmitInfo.length) {
const oldWriter = writer;
forEach(moduleElementDeclarationEmitInfo, aliasEmitInfo => {
if (aliasEmitInfo.isVisible && !aliasEmitInfo.asynchronousOutput) {
Debug.assert(aliasEmitInfo.node.kind === SyntaxKind.ImportDeclaration);
createAndSetNewTextWriterWithSymbolWriter();
Debug.assert(aliasEmitInfo.indent === 1);
increaseIndent();
writeImportDeclaration(<ImportDeclaration>aliasEmitInfo.node);
aliasEmitInfo.asynchronousOutput = writer.getText();
decreaseIndent();
}
});
setWriter(oldWriter);
}
prevModuleElementDeclarationEmitInfo = prevModuleElementDeclarationEmitInfo.concat(moduleElementDeclarationEmitInfo);
moduleElementDeclarationEmitInfo = [];
}
});
moduleElementDeclarationEmitInfo = moduleElementDeclarationEmitInfo.concat(prevModuleElementDeclarationEmitInfo);
}
return {
@@ -607,7 +642,7 @@ namespace ts {
if (node.flags & NodeFlags.Default) {
write("default ");
}
else if (node.kind !== SyntaxKind.InterfaceDeclaration) {
else if (node.kind !== SyntaxKind.InterfaceDeclaration && !noDeclare) {
write("declare ");
}
}
@@ -702,11 +737,25 @@ namespace ts {
}
write(" from ");
}
writeTextOfNode(currentText, node.moduleSpecifier);
emitExternalModuleSpecifier(node.moduleSpecifier);
write(";");
writer.writeLine();
}
function emitExternalModuleSpecifier(moduleSpecifier: Expression) {
if (moduleSpecifier.kind === SyntaxKind.StringLiteral && (!root) && (compilerOptions.out || compilerOptions.outFile)) {
const moduleName = getExternalModuleNameFromDeclaration(host, resolver, moduleSpecifier.parent as (ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration));
if (moduleName) {
write("\"");
write(moduleName);
write("\"");
return;
}
}
writeTextOfNode(currentText, moduleSpecifier);
}
function emitImportOrExportSpecifier(node: ImportOrExportSpecifier) {
if (node.propertyName) {
writeTextOfNode(currentText, node.propertyName);
@@ -738,7 +787,7 @@ namespace ts {
}
if (node.moduleSpecifier) {
write(" from ");
writeTextOfNode(currentText, node.moduleSpecifier);
emitExternalModuleSpecifier(node.moduleSpecifier);
}
write(";");
writer.writeLine();
+4 -2
View File
@@ -2310,7 +2310,6 @@
"category": "Message",
"code": 6078
},
"Specify JSX code generation: 'preserve' or 'react'": {
"category": "Message",
"code": 6080
@@ -2319,7 +2318,10 @@
"category": "Message",
"code": 6081
},
"Only 'amd' and 'system' modules are supported alongside --{0}.": {
"category": "Error",
"code": 6082
},
"Variable '{0}' implicitly has an '{1}' type.": {
"category": "Error",
"code": 7005
+81 -31
View File
@@ -7,6 +7,18 @@ namespace ts {
return isExternalModule(sourceFile) || isDeclarationFile(sourceFile);
}
export function getResolvedExternalModuleName(host: EmitHost, file: SourceFile): string {
return file.moduleName || getExternalModuleNameFromPath(host, file.fileName);
}
export function getExternalModuleNameFromDeclaration(host: EmitHost, resolver: EmitResolver, declaration: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration): string {
const file = resolver.getExternalModuleFileFromDeclaration(declaration);
if (!file || isDeclarationFile(file)) {
return undefined;
}
return getResolvedExternalModuleName(host, file);
}
type DependencyGroup = Array<ImportDeclaration | ImportEqualsDeclaration | ExportDeclaration>;
const enum Jump {
@@ -332,19 +344,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
const newLine = host.getNewLine();
const jsxDesugaring = host.getCompilerOptions().jsx !== JsxEmit.Preserve;
const shouldEmitJsx = (s: SourceFile) => (s.languageVariant === LanguageVariant.JSX && !jsxDesugaring);
const outFile = compilerOptions.outFile || compilerOptions.out;
const emitJavaScript = createFileEmitter();
if (targetSourceFile === undefined) {
forEach(host.getSourceFiles(), sourceFile => {
if (shouldEmitToOwnFile(sourceFile, compilerOptions)) {
const jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, shouldEmitJsx(sourceFile) ? ".jsx" : ".js");
emitFile(jsFilePath, sourceFile);
}
});
if (compilerOptions.outFile || compilerOptions.out) {
emitFile(compilerOptions.outFile || compilerOptions.out);
if (outFile) {
emitFile(outFile);
}
else {
forEach(host.getSourceFiles(), sourceFile => {
if (shouldEmitToOwnFile(sourceFile, compilerOptions)) {
const jsFilePath = getOwnEmitOutputFilePath(sourceFile, host, shouldEmitJsx(sourceFile) ? ".jsx" : ".js");
emitFile(jsFilePath, sourceFile);
}
});
}
}
else {
@@ -353,8 +367,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
const jsFilePath = getOwnEmitOutputFilePath(targetSourceFile, host, shouldEmitJsx(targetSourceFile) ? ".jsx" : ".js");
emitFile(jsFilePath, targetSourceFile);
}
else if (!isDeclarationFile(targetSourceFile) && (compilerOptions.outFile || compilerOptions.out)) {
emitFile(compilerOptions.outFile || compilerOptions.out);
else if (!isDeclarationFile(targetSourceFile) && outFile) {
emitFile(outFile);
}
}
@@ -545,10 +559,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
/** Sourcemap data that will get encoded */
let sourceMapData: SourceMapData;
/** The root file passed to the emit function (if present) */
let root: SourceFile;
/** If removeComments is true, no leading-comments needed to be emitted **/
const emitLeadingCommentsOfPosition = compilerOptions.removeComments ? function (pos: number) { } : emitLeadingCommentsOfPositionWorker;
const moduleEmitDelegates: Map<(node: SourceFile) => void> = {
const moduleEmitDelegates: Map<(node: SourceFile, emitRelativePathAsModuleName?: boolean) => void> = {
[ModuleKind.ES6]: emitES6Module,
[ModuleKind.AMD]: emitAMDModule,
[ModuleKind.System]: emitSystemModule,
@@ -556,9 +573,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
[ModuleKind.CommonJS]: emitCommonJSModule,
};
const bundleEmitDelegates: Map<(node: SourceFile, emitRelativePathAsModuleName?: boolean) => void> = {
[ModuleKind.ES6]() {},
[ModuleKind.AMD]: emitAMDModule,
[ModuleKind.System]: emitSystemModule,
[ModuleKind.UMD]() {},
[ModuleKind.CommonJS]() {},
};
return doEmit;
function doEmit(jsFilePath: string, root?: SourceFile) {
function doEmit(jsFilePath: string, rootFile?: SourceFile) {
// reset the state
writer.reset();
currentSourceFile = undefined;
@@ -586,6 +611,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
isEs6Module = false;
renamedDependencies = undefined;
isCurrentFileExternalModule = false;
root = rootFile;
if (compilerOptions.sourceMap || compilerOptions.inlineSourceMap) {
initializeEmitterWithSourceMaps(jsFilePath, root);
@@ -596,8 +622,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
emitSourceFile(root);
}
else {
if (modulekind) {
forEach(host.getSourceFiles(), emitEmitHelpers);
}
forEach(host.getSourceFiles(), sourceFile => {
if (!isExternalModuleOrDeclarationFile(sourceFile)) {
if ((!isExternalModuleOrDeclarationFile(sourceFile)) || (modulekind && isExternalModule(sourceFile))) {
emitSourceFile(sourceFile);
}
});
@@ -2461,7 +2490,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
// let obj = { y };
// }
// Here we need to emit obj = { y : m.y } regardless of the output target.
if (languageVersion < ScriptTarget.ES6 || isNamespaceExportReference(node.name)) {
if (modulekind !== ModuleKind.ES6 || isNamespaceExportReference(node.name)) {
// Emit identifier as an identifier
write(": ");
emit(node.name);
@@ -7303,7 +7332,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
write("}"); // execute
}
function emitSystemModule(node: SourceFile): void {
function writeModuleName(node: SourceFile, emitRelativePathAsModuleName?: boolean): void {
let moduleName = node.moduleName;
if (moduleName || (emitRelativePathAsModuleName && (moduleName = getResolvedExternalModuleName(host, node)))) {
write(`"${moduleName}", `);
}
}
function emitSystemModule(node: SourceFile, emitRelativePathAsModuleName?: boolean): void {
collectExternalModuleInfo(node);
// System modules has the following shape
// System.register(['dep-1', ... 'dep-n'], function(exports) {/* module body function */})
@@ -7318,16 +7354,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
exportFunctionForFile = makeUniqueName("exports");
writeLine();
write("System.register(");
if (node.moduleName) {
write(`"${node.moduleName}", `);
}
writeModuleName(node, emitRelativePathAsModuleName);
write("[");
const groupIndices: Map<number> = {};
const dependencyGroups: DependencyGroup[] = [];
for (let i = 0; i < externalImports.length; ++i) {
const text = getExternalModuleNameText(externalImports[i]);
let text = getExternalModuleNameText(externalImports[i]);
if (hasProperty(groupIndices, text)) {
// deduplicate/group entries in dependency list by the dependency name
const groupIndex = groupIndices[text];
@@ -7343,6 +7377,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
write(", ");
}
if (emitRelativePathAsModuleName) {
const name = getExternalModuleNameFromDeclaration(host, resolver, externalImports[i]);
if (name) {
text = `"${name}"`;
}
}
write(text);
}
write(`], function(${exportFunctionForFile}) {`);
@@ -7363,7 +7403,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
importAliasNames: string[];
}
function getAMDDependencyNames(node: SourceFile, includeNonAmdDependencies: boolean): AMDDependencyNames {
function getAMDDependencyNames(node: SourceFile, includeNonAmdDependencies: boolean, emitRelativePathAsModuleName?: boolean): AMDDependencyNames {
// names of modules with corresponding parameter in the factory function
const aliasedModuleNames: string[] = [];
// names of modules with no corresponding parameters in factory function
@@ -7385,7 +7425,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
for (const importNode of externalImports) {
// Find the name of the external module
const externalModuleName = getExternalModuleNameText(importNode);
let externalModuleName = getExternalModuleNameText(importNode);
if (emitRelativePathAsModuleName) {
const name = getExternalModuleNameFromDeclaration(host, resolver, importNode);
if (name) {
externalModuleName = `"${name}"`;
}
}
// Find the name of the module alias, if there is one
const importAliasName = getLocalNameForExternalImport(importNode);
@@ -7401,7 +7448,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
return { aliasedModuleNames, unaliasedModuleNames, importAliasNames };
}
function emitAMDDependencies(node: SourceFile, includeNonAmdDependencies: boolean) {
function emitAMDDependencies(node: SourceFile, includeNonAmdDependencies: boolean, emitRelativePathAsModuleName?: boolean) {
// An AMD define function has the following shape:
// define(id?, dependencies?, factory);
//
@@ -7414,7 +7461,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
// `import "module"` or `<amd-dependency path= "a.css" />`
// we need to add modules without alias names to the end of the dependencies list
const dependencyNames = getAMDDependencyNames(node, includeNonAmdDependencies);
const dependencyNames = getAMDDependencyNames(node, includeNonAmdDependencies, emitRelativePathAsModuleName);
emitAMDDependencyList(dependencyNames);
write(", ");
emitAMDFactoryHeader(dependencyNames);
@@ -7442,16 +7489,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
write(") {");
}
function emitAMDModule(node: SourceFile) {
function emitAMDModule(node: SourceFile, emitRelativePathAsModuleName?: boolean) {
emitEmitHelpers(node);
collectExternalModuleInfo(node);
writeLine();
write("define(");
if (node.moduleName) {
write("\"" + node.moduleName + "\", ");
}
emitAMDDependencies(node, /*includeNonAmdDependencies*/ true);
writeModuleName(node, emitRelativePathAsModuleName);
emitAMDDependencies(node, /*includeNonAmdDependencies*/ true, emitRelativePathAsModuleName);
increaseIndent();
const startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ true);
emitExportStarHelper();
@@ -7700,8 +7745,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
emitDetachedCommentsAndUpdateCommentsInfo(node);
if (isExternalModule(node) || compilerOptions.isolatedModules) {
const emitModule = moduleEmitDelegates[modulekind] || moduleEmitDelegates[ModuleKind.CommonJS];
emitModule(node);
if (root || (!isExternalModule(node) && compilerOptions.isolatedModules)) {
const emitModule = moduleEmitDelegates[modulekind] || moduleEmitDelegates[ModuleKind.CommonJS];
emitModule(node);
}
else {
bundleEmitDelegates[modulekind](node, /*emitRelativePathAsModuleName*/true);
}
}
else {
// emit prologue directives prior to __extends
+5 -3
View File
@@ -1992,9 +1992,7 @@ namespace ts {
function parseParameterType(): TypeNode {
if (parseOptional(SyntaxKind.ColonToken)) {
return token === SyntaxKind.StringLiteral
? <StringLiteral>parseLiteralNode(/*internName*/ true)
: parseType();
return parseType();
}
return undefined;
@@ -2382,6 +2380,8 @@ namespace ts {
// If these are followed by a dot, then parse these out as a dotted type reference instead.
const node = tryParse(parseKeywordAndNoDot);
return node || parseTypeReferenceOrTypePredicate();
case SyntaxKind.StringLiteral:
return <StringLiteral>parseLiteralNode(/*internName*/ true);
case SyntaxKind.VoidKeyword:
case SyntaxKind.ThisKeyword:
return parseTokenNode<TypeNode>();
@@ -2412,6 +2412,7 @@ namespace ts {
case SyntaxKind.OpenBracketToken:
case SyntaxKind.LessThanToken:
case SyntaxKind.NewKeyword:
case SyntaxKind.StringLiteral:
return true;
case SyntaxKind.OpenParenToken:
// Only consider '(' the start of a type if followed by ')', '...', an identifier, a modifier,
@@ -5629,6 +5630,7 @@ namespace ts {
return parseTokenNode<JSDocType>();
}
// TODO (drosen): Parse string literal types in JSDoc as well.
return parseJSDocTypeReference();
}
+10 -3
View File
@@ -833,7 +833,6 @@ namespace ts {
processImportedModules(file, basePath);
if (isDefaultLib) {
file.isDefaultLib = true;
files.unshift(file);
}
else {
@@ -923,6 +922,10 @@ namespace ts {
}
});
if (!commonPathComponents) { // Can happen when all input files are .d.ts files
return currentDirectory;
}
return getNormalizedPathFromPathComponents(commonPathComponents);
}
@@ -1024,12 +1027,16 @@ namespace ts {
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Cannot_compile_modules_into_es2015_when_targeting_ES5_or_lower));
}
// Cannot specify module gen that isn't amd or system with --out
if (outFile && options.module && !(options.module === ModuleKind.AMD || options.module === ModuleKind.System)) {
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Only_amd_and_system_modules_are_supported_alongside_0, options.out ? "out" : "outFile"));
}
// there has to be common source directory if user specified --outdir || --sourceRoot
// if user specified --mapRoot, there needs to be common source directory if there would be multiple files being emitted
if (options.outDir || // there is --outDir specified
options.sourceRoot || // there is --sourceRoot specified
(options.mapRoot && // there is --mapRoot specified and there would be multiple js files generated
(!outFile || firstExternalModuleSourceFile !== undefined))) {
options.mapRoot) { // there is --mapRoot specified
if (options.rootDir && checkSourceFilesBelongToPath(files, options.rootDir)) {
// If a rootDir is specified and is valid use it as the commonSourceDirectory
+2 -2
View File
@@ -701,7 +701,7 @@ namespace ts {
}
// Note that a StringLiteral AST node is both an Expression and a TypeNode. The latter is
// because string literals can appear in the type annotation of a parameter node.
// because string literals can appear in type annotations as well.
export interface StringLiteral extends LiteralExpression, TypeNode {
_stringLiteralBrand: any;
}
@@ -1285,7 +1285,6 @@ namespace ts {
// The first node that causes this file to be an external module
/* @internal */ externalModuleIndicator: Node;
/* @internal */ isDefaultLib: boolean;
/* @internal */ identifiers: Map<string>;
/* @internal */ nodeCount: number;
/* @internal */ identifierCount: number;
@@ -1623,6 +1622,7 @@ namespace ts {
isOptionalParameter(node: ParameterDeclaration): boolean;
moduleExportsSomeValue(moduleReferenceExpression: Expression): boolean;
isArgumentsLocalBinding(node: Identifier): boolean;
getExternalModuleFileFromDeclaration(declaration: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration): SourceFile;
}
export const enum SymbolFlags {
+10
View File
@@ -1660,6 +1660,7 @@ namespace ts {
"\u0085": "\\u0085" // nextLine
};
/**
* Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2),
* but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine)
@@ -1800,6 +1801,15 @@ namespace ts {
};
}
/**
* Resolves a local path to a path which is absolute to the base of the emit
*/
export function getExternalModuleNameFromPath(host: EmitHost, fileName: string): string {
const dir = host.getCurrentDirectory();
const relativePath = getRelativePathToDirectoryOrUrl(dir, fileName, dir, f => host.getCanonicalFileName(f), /*isAbsolutePathAnUrl*/ false);
return removeFileExtension(relativePath);
}
export function getOwnEmitOutputFilePath(sourceFile: SourceFile, host: EmitHost, extension: string) {
const compilerOptions = host.getCompilerOptions();
let emitOutputFilePathWithoutExtension: string;
+1 -1
View File
@@ -1169,7 +1169,7 @@ namespace Harness {
}
else if (isTS(file.unitName)) {
const declFile = findResultCodeFile(file.unitName);
if (!findUnit(declFile.fileName, declInputFiles) && !findUnit(declFile.fileName, declOtherFiles)) {
if (declFile && !findUnit(declFile.fileName, declInputFiles) && !findUnit(declFile.fileName, declOtherFiles)) {
dtsFiles.push({ unitName: declFile.fileName, content: declFile.code });
}
}
+6 -3
View File
@@ -306,7 +306,10 @@ class ProjectRunner extends RunnerBase {
}
const outputDtsFileName = emitOutputFilePathWithoutExtension + ".d.ts";
allInputFiles.unshift(findOutpuDtsFile(outputDtsFileName));
const file = findOutpuDtsFile(outputDtsFileName);
if (file) {
allInputFiles.unshift(file);
}
}
else {
const outputDtsFileName = ts.removeFileExtension(compilerOptions.outFile || compilerOptions.out) + ".d.ts";
@@ -346,7 +349,7 @@ class ProjectRunner extends RunnerBase {
const inputFiles = ts.map(ts.filter(compilerResult.program.getSourceFiles(),
sourceFile => sourceFile.fileName !== "lib.d.ts"),
sourceFile => {
return { unitName: sourceFile.fileName, content: sourceFile.text };
return { unitName: RunnerBase.removeFullPaths(sourceFile.fileName), content: sourceFile.text };
});
return Harness.Compiler.getErrorBaseline(inputFiles, compilerResult.errors);
@@ -387,7 +390,7 @@ class ProjectRunner extends RunnerBase {
return resolutionInfo;
}
it(name + ": " + moduleNameToString(moduleKind) , () => {
it(name + ": " + moduleNameToString(moduleKind), () => {
// Compile using node
compilerResult = batchCompilerProjectTestCase(moduleKind);
});
@@ -1,33 +1,33 @@
=== tests/cases/compiler/callSignatureFunctionOverload.ts ===
var foo: {
>foo : { (name: string): string; (name: 'order'): string; (name: 'content'): string; (name: 'done'): string; }
>foo : { (name: string): string; (name: "order"): string; (name: "content"): string; (name: "done"): string; }
(name: string): string;
>name : string
(name: 'order'): string;
>name : 'order'
>name : "order"
(name: 'content'): string;
>name : 'content'
>name : "content"
(name: 'done'): string;
>name : 'done'
>name : "done"
}
var foo2: {
>foo2 : { (name: string): string; (name: 'order'): string; (name: 'order'): string; (name: 'done'): string; }
>foo2 : { (name: string): string; (name: "order"): string; (name: "order"): string; (name: "done"): string; }
(name: string): string;
>name : string
(name: 'order'): string;
>name : 'order'
>name : "order"
(name: 'order'): string;
>name : 'order'
>name : "order"
(name: 'done'): string;
>name : 'done'
>name : "done"
}
@@ -19,27 +19,27 @@ class Derived3 extends Base { biz() { } }
>biz : () => void
function foo(tagName: 'canvas'): Derived1;
>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; }
>tagName : 'canvas'
>foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; }
>tagName : "canvas"
>Derived1 : Derived1
function foo(tagName: 'div'): Derived2;
>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; }
>tagName : 'div'
>foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; }
>tagName : "div"
>Derived2 : Derived2
function foo(tagName: 'span'): Derived3;
>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; }
>tagName : 'span'
>foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; }
>tagName : "span"
>Derived3 : Derived3
function foo(tagName: string): Base;
>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; }
>foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; }
>tagName : string
>Base : Base
function foo(tagName: any): Base {
>foo : { (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; (tagName: string): Base; }
>foo : { (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; (tagName: string): Base; }
>tagName : any
>Base : Base
@@ -1,6 +1,6 @@
EmitSkipped: false
FileName : declSingleFile.js.map
{"version":3,"file":"declSingleFile.js","sourceRoot":"","sources":["../tests/cases/fourslash/inputFile.ts"],"names":["M","M.constructor"],"mappings":"AAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,IAAI,GAAG,GAAG,aAAa,CAAC;AACxB;IAAAA;IAGAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAHD,IAGC"}FileName : declSingleFile.js
{"version":3,"file":"declSingleFile.js","sourceRoot":"","sources":["../inputFile.ts"],"names":["M","M.constructor"],"mappings":"AAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,IAAI,GAAG,GAAG,aAAa,CAAC;AACxB;IAAAA;IAGAC,CAACA;IAADD,QAACA;AAADA,CAACA,AAHD,IAGC"}FileName : declSingleFile.js
var x = 109;
var foo = "hello world";
var M = (function () {
@@ -8,4 +8,4 @@ var M = (function () {
}
return M;
})();
//# sourceMappingURL=mapRootDir/declSingleFile.js.map
//# sourceMappingURL=tests/cases/fourslash/mapRootDir/declSingleFile.js.map
@@ -11,7 +11,7 @@ interface B extends A {
>A : A
(key:'foo'):string;
>key : 'foo'
>key : "foo"
}
var b:B;
@@ -24,7 +24,7 @@ b('foo').charAt(0);
>b('foo').charAt : (pos: number) => string
>b('foo') : string
>b : B
>'foo' : string
>'foo' : "foo"
>charAt : (pos: number) => string
>0 : number
@@ -32,7 +32,7 @@ interface A {
>A : A
(x: 'A1'): string;
>x : 'A1'
>x : "A1"
(x: string): void;
>x : string
@@ -43,21 +43,21 @@ interface B extends A {
>A : A
(x: 'B1'): number;
>x : 'B1'
>x : "B1"
}
interface A {
>A : A
(x: 'A2'): boolean;
>x : 'A2'
>x : "A2"
}
interface B {
>B : B
(x: 'B2'): string[];
>x : 'B2'
>x : "B2"
}
interface C1 extends B {
@@ -65,7 +65,7 @@ interface C1 extends B {
>B : B
(x: 'C1'): number[];
>x : 'C1'
>x : "C1"
}
interface C2 extends B {
@@ -73,7 +73,7 @@ interface C2 extends B {
>B : B
(x: 'C2'): boolean[];
>x : 'C2'
>x : "C2"
}
interface C extends C1, C2 {
@@ -82,7 +82,7 @@ interface C extends C1, C2 {
>C2 : C2
(x: 'C'): string;
>x : 'C'
>x : "C"
}
var c: C;
@@ -94,25 +94,25 @@ var x1: string[] = c('B2');
>x1 : string[]
>c('B2') : string[]
>c : C
>'B2' : string
>'B2' : "B2"
var x2: number = c('B1');
>x2 : number
>c('B1') : number
>c : C
>'B1' : string
>'B1' : "B1"
var x3: boolean = c('A2');
>x3 : boolean
>c('A2') : boolean
>c : C
>'A2' : string
>'A2' : "A2"
var x4: string = c('A1');
>x4 : string
>c('A1') : string
>c : C
>'A1' : string
>'A1' : "A1"
var x5: void = c('A0');
>x5 : void
@@ -124,19 +124,19 @@ var x6: number[] = c('C1');
>x6 : number[]
>c('C1') : number[]
>c : C
>'C1' : string
>'C1' : "C1"
var x7: boolean[] = c('C2');
>x7 : boolean[]
>c('C2') : boolean[]
>c : C
>'C2' : string
>'C2' : "C2"
var x8: string = c('C');
>x8 : string
>c('C') : string
>c : C
>'C' : string
>'C' : "C"
var x9: void = c('generic');
>x9 : void
@@ -3,13 +3,13 @@ interface Foo {
>Foo : Foo
(x: 'a'): number;
>x : 'a'
>x : "a"
(x: string): any;
>x : string
new (x: 'a'): any;
>x : 'a'
>x : "a"
new (x: string): Object;
>x : string
@@ -24,7 +24,7 @@ var r = f('a');
>r : number
>f('a') : number
>f : Foo
>'a' : string
>'a' : "a"
var r2 = f('A');
>r2 : any
@@ -36,7 +36,7 @@ var r3 = new f('a');
>r3 : any
>new f('a') : any
>f : Foo
>'a' : string
>'a' : "a"
var r4 = new f('A');
>r4 : Object
@@ -6,7 +6,5 @@ export var x;
//// [file2.ts]
var y;
//// [file1.js]
export var x;
//// [all.js]
var y;
@@ -17,20 +17,20 @@ class C {
>y : any
public bar(x: 'hi');
>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; }
>x : 'hi'
>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; }
>x : "hi"
public bar(x: string);
>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; }
>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; }
>x : string
public bar(x: number, y: string);
>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; }
>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; }
>x : number
>y : string
public bar(x: any, y?: any) { }
>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; }
>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; }
>x : any
>y : any
@@ -49,20 +49,20 @@ class C {
>y : any
public static bar(x: 'hi');
>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; }
>x : 'hi'
>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; }
>x : "hi"
public static bar(x: string);
>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; }
>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; }
>x : string
public static bar(x: number, y: string);
>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; }
>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; }
>x : number
>y : string
public static bar(x: any, y?: any) { }
>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; }
>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; }
>x : any
>y : any
}
@@ -88,22 +88,22 @@ class D<T> {
>y : any
public bar(x: 'hi');
>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; }
>x : 'hi'
>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; }
>x : "hi"
public bar(x: string);
>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; }
>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; }
>x : string
public bar(x: T, y: T);
>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; }
>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; }
>x : T
>T : T
>y : T
>T : T
public bar(x: any, y?: any) { }
>bar : { (x: 'hi'): any; (x: string): any; (x: T, y: T): any; }
>bar : { (x: "hi"): any; (x: string): any; (x: T, y: T): any; }
>x : any
>y : any
@@ -122,20 +122,20 @@ class D<T> {
>y : any
public static bar(x: 'hi');
>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; }
>x : 'hi'
>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; }
>x : "hi"
public static bar(x: string);
>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; }
>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; }
>x : string
public static bar(x: number, y: string);
>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; }
>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; }
>x : number
>y : string
public static bar(x: any, y?: any) { }
>bar : { (x: 'hi'): any; (x: string): any; (x: number, y: string): any; }
>bar : { (x: "hi"): any; (x: string): any; (x: number, y: string): any; }
>x : any
>y : any
@@ -0,0 +1,10 @@
error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile.
!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile.
==== tests/cases/compiler/a.ts (0 errors) ====
class A { }
==== tests/cases/compiler/b.ts (0 errors) ====
class B { }
@@ -1,9 +0,0 @@
=== tests/cases/compiler/a.ts ===
class A { }
>A : Symbol(A, Decl(a.ts, 0, 0))
=== tests/cases/compiler/b.ts ===
class B { }
>B : Symbol(B, Decl(b.ts, 0, 0))
@@ -1,9 +0,0 @@
=== tests/cases/compiler/a.ts ===
class A { }
>A : A
=== tests/cases/compiler/b.ts ===
class B { }
>B : B
@@ -1,7 +1,9 @@
error TS5053: Option 'out' cannot be specified with option 'outFile'.
error TS6082: Only 'amd' and 'system' modules are supported alongside --out.
!!! error TS5053: Option 'out' cannot be specified with option 'outFile'.
!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --out.
==== tests/cases/compiler/a.ts (0 errors) ====
// --out and --outFile error
@@ -0,0 +1,46 @@
//// [tests/cases/compiler/outModuleConcatAmd.ts] ////
//// [a.ts]
export class A { }
//// [b.ts]
import {A} from "./ref/a";
export class B extends A { }
//// [all.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 __());
};
define("tests/cases/compiler/ref/a", ["require", "exports"], function (require, exports) {
var A = (function () {
function A() {
}
return A;
})();
exports.A = A;
});
define("tests/cases/compiler/b", ["require", "exports", "tests/cases/compiler/ref/a"], function (require, exports, a_1) {
var B = (function (_super) {
__extends(B, _super);
function B() {
_super.apply(this, arguments);
}
return B;
})(a_1.A);
exports.B = B;
});
//# sourceMappingURL=all.js.map
//// [all.d.ts]
declare module "tests/cases/compiler/ref/a" {
export class A {
}
}
declare module "tests/cases/compiler/b" {
import { A } from "tests/cases/compiler/ref/a";
export class B extends A {
}
}
@@ -0,0 +1,2 @@
//// [all.js.map]
{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":["A","A.constructor","B","B.constructor"],"mappings":";;;;;;IACA;QAAAA;QAAiBC,CAACA;QAADD,QAACA;IAADA,CAACA,AAAlB,IAAkB;IAAL,SAAC,IAAI,CAAA;;;ICAlB;QAAuBE,qBAACA;QAAxBA;YAAuBC,8BAACA;QAAGA,CAACA;QAADD,QAACA;IAADA,CAACA,AAA5B,EAAuB,KAAC,EAAI;IAAf,SAAC,IAAc,CAAA"}
@@ -0,0 +1,164 @@
===================================================================
JsFile: all.js
mapUrl: all.js.map
sourceRoot:
sources: tests/cases/compiler/ref/a.ts,tests/cases/compiler/b.ts
===================================================================
-------------------------------------------------------------------
emittedFile:all.js
sourceFile:tests/cases/compiler/ref/a.ts
-------------------------------------------------------------------
>>>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 __());
>>>};
>>>define("tests/cases/compiler/ref/a", ["require", "exports"], function (require, exports) {
>>> var A = (function () {
1 >^^^^
2 > ^^^^^^^^^^^^^^^^^^^->
1 >
>
1 >Emitted(7, 5) Source(2, 1) + SourceIndex(0)
---
>>> function A() {
1->^^^^^^^^
2 > ^^->
1->
1->Emitted(8, 9) Source(2, 1) + SourceIndex(0) name (A)
---
>>> }
1->^^^^^^^^
2 > ^
3 > ^^^^^^^^^->
1->export class A {
2 > }
1->Emitted(9, 9) Source(2, 18) + SourceIndex(0) name (A.constructor)
2 >Emitted(9, 10) Source(2, 19) + SourceIndex(0) name (A.constructor)
---
>>> return A;
1->^^^^^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(10, 9) Source(2, 18) + SourceIndex(0) name (A)
2 >Emitted(10, 17) Source(2, 19) + SourceIndex(0) name (A)
---
>>> })();
1 >^^^^
2 > ^
3 >
4 > ^^^^
5 > ^^^^^^^^^^->
1 >
2 > }
3 >
4 > export class A { }
1 >Emitted(11, 5) Source(2, 18) + SourceIndex(0) name (A)
2 >Emitted(11, 6) Source(2, 19) + SourceIndex(0) name (A)
3 >Emitted(11, 6) Source(2, 1) + SourceIndex(0)
4 >Emitted(11, 10) Source(2, 19) + SourceIndex(0)
---
>>> exports.A = A;
1->^^^^
2 > ^^^^^^^^^
3 > ^^^^
4 > ^
1->
2 > A
3 > { }
4 >
1->Emitted(12, 5) Source(2, 14) + SourceIndex(0)
2 >Emitted(12, 14) Source(2, 15) + SourceIndex(0)
3 >Emitted(12, 18) Source(2, 19) + SourceIndex(0)
4 >Emitted(12, 19) Source(2, 19) + SourceIndex(0)
---
-------------------------------------------------------------------
emittedFile:all.js
sourceFile:tests/cases/compiler/b.ts
-------------------------------------------------------------------
>>>});
>>>define("tests/cases/compiler/b", ["require", "exports", "tests/cases/compiler/ref/a"], function (require, exports, a_1) {
>>> var B = (function (_super) {
1 >^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >import {A} from "./ref/a";
>
1 >Emitted(15, 5) Source(2, 1) + SourceIndex(1)
---
>>> __extends(B, _super);
1->^^^^^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^
1->export class B extends
2 > A
1->Emitted(16, 9) Source(2, 24) + SourceIndex(1) name (B)
2 >Emitted(16, 30) Source(2, 25) + SourceIndex(1) name (B)
---
>>> function B() {
1 >^^^^^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
1 >Emitted(17, 9) Source(2, 1) + SourceIndex(1) name (B)
---
>>> _super.apply(this, arguments);
1->^^^^^^^^^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1->export class B extends
2 > A
1->Emitted(18, 13) Source(2, 24) + SourceIndex(1) name (B.constructor)
2 >Emitted(18, 43) Source(2, 25) + SourceIndex(1) name (B.constructor)
---
>>> }
1 >^^^^^^^^
2 > ^
3 > ^^^^^^^^^->
1 > {
2 > }
1 >Emitted(19, 9) Source(2, 28) + SourceIndex(1) name (B.constructor)
2 >Emitted(19, 10) Source(2, 29) + SourceIndex(1) name (B.constructor)
---
>>> return B;
1->^^^^^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(20, 9) Source(2, 28) + SourceIndex(1) name (B)
2 >Emitted(20, 17) Source(2, 29) + SourceIndex(1) name (B)
---
>>> })(a_1.A);
1 >^^^^
2 > ^
3 >
4 > ^^
5 > ^^^^^
6 > ^^
7 > ^^^^^->
1 >
2 > }
3 >
4 > export class B extends
5 > A
6 > { }
1 >Emitted(21, 5) Source(2, 28) + SourceIndex(1) name (B)
2 >Emitted(21, 6) Source(2, 29) + SourceIndex(1) name (B)
3 >Emitted(21, 6) Source(2, 1) + SourceIndex(1)
4 >Emitted(21, 8) Source(2, 24) + SourceIndex(1)
5 >Emitted(21, 13) Source(2, 25) + SourceIndex(1)
6 >Emitted(21, 15) Source(2, 29) + SourceIndex(1)
---
>>> exports.B = B;
1->^^^^
2 > ^^^^^^^^^
3 > ^^^^
4 > ^
1->
2 > B
3 > extends A { }
4 >
1->Emitted(22, 5) Source(2, 14) + SourceIndex(1)
2 >Emitted(22, 14) Source(2, 15) + SourceIndex(1)
3 >Emitted(22, 18) Source(2, 29) + SourceIndex(1)
4 >Emitted(22, 19) Source(2, 29) + SourceIndex(1)
---
>>>});
>>>//# sourceMappingURL=all.js.map
@@ -0,0 +1,13 @@
=== tests/cases/compiler/ref/a.ts ===
export class A { }
>A : Symbol(A, Decl(a.ts, 0, 0))
=== tests/cases/compiler/b.ts ===
import {A} from "./ref/a";
>A : Symbol(A, Decl(b.ts, 0, 8))
export class B extends A { }
>B : Symbol(B, Decl(b.ts, 0, 26))
>A : Symbol(A, Decl(b.ts, 0, 8))
@@ -0,0 +1,13 @@
=== tests/cases/compiler/ref/a.ts ===
export class A { }
>A : A
=== tests/cases/compiler/b.ts ===
import {A} from "./ref/a";
>A : typeof A
export class B extends A { }
>B : B
>A : A
@@ -0,0 +1,13 @@
error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile.
!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile.
==== tests/cases/compiler/ref/a.ts (0 errors) ====
// This should be an error
export class A { }
==== tests/cases/compiler/b.ts (0 errors) ====
import {A} from "./ref/a";
export class B extends A { }
@@ -0,0 +1,31 @@
//// [tests/cases/compiler/outModuleConcatCommonjs.ts] ////
//// [a.ts]
// This should be an error
export class A { }
//// [b.ts]
import {A} from "./ref/a";
export class B extends A { }
//// [all.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 __());
};
// This should be an error
//# sourceMappingURL=all.js.map
//// [all.d.ts]
declare module "tests/cases/compiler/ref/a" {
export class A {
}
}
declare module "tests/cases/compiler/b" {
import { A } from "tests/cases/compiler/ref/a";
export class B extends A {
}
}
@@ -0,0 +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":";;;;;AACA,0BAA0B"}
@@ -0,0 +1,26 @@
===================================================================
JsFile: all.js
mapUrl: all.js.map
sourceRoot:
sources: tests/cases/compiler/ref/a.ts,tests/cases/compiler/b.ts
===================================================================
-------------------------------------------------------------------
emittedFile:all.js
sourceFile:tests/cases/compiler/ref/a.ts
-------------------------------------------------------------------
>>>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 __());
>>>};
>>>// This should be an error
1 >
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^
3 > ^^^^->
1 >
>
2 >// This should be an error
1 >Emitted(6, 1) Source(2, 1) + SourceIndex(0)
2 >Emitted(6, 27) Source(2, 27) + SourceIndex(0)
---
>>>//# sourceMappingURL=all.js.map
@@ -0,0 +1,13 @@
error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile.
!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile.
==== tests/cases/compiler/ref/a.ts (0 errors) ====
// This should be an error
export class A { }
==== tests/cases/compiler/b.ts (0 errors) ====
import {A} from "./ref/a";
export class B extends A { }
@@ -0,0 +1,26 @@
//// [tests/cases/compiler/outModuleConcatES6.ts] ////
//// [a.ts]
// This should be an error
export class A { }
//// [b.ts]
import {A} from "./ref/a";
export class B extends A { }
//// [all.js]
// This should be an error
//# sourceMappingURL=all.js.map
//// [all.d.ts]
declare module "tests/cases/compiler/ref/a" {
export class A {
}
}
declare module "tests/cases/compiler/b" {
import { A } from "tests/cases/compiler/ref/a";
export class B extends A {
}
}
@@ -0,0 +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":"AACA,0BAA0B"}
@@ -0,0 +1,21 @@
===================================================================
JsFile: all.js
mapUrl: all.js.map
sourceRoot:
sources: tests/cases/compiler/ref/a.ts,tests/cases/compiler/b.ts
===================================================================
-------------------------------------------------------------------
emittedFile:all.js
sourceFile:tests/cases/compiler/ref/a.ts
-------------------------------------------------------------------
>>>// This should be an error
1 >
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^
3 > ^^^^->
1 >
>
2 >// This should be an error
1 >Emitted(1, 1) Source(2, 1) + SourceIndex(0)
2 >Emitted(1, 27) Source(2, 27) + SourceIndex(0)
---
>>>//# sourceMappingURL=all.js.map
@@ -0,0 +1,62 @@
//// [tests/cases/compiler/outModuleConcatSystem.ts] ////
//// [a.ts]
export class A { }
//// [b.ts]
import {A} from "./ref/a";
export class B extends A { }
//// [all.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 __());
};
System.register("tests/cases/compiler/ref/a", [], function(exports_1) {
var A;
return {
setters:[],
execute: function() {
A = (function () {
function A() {
}
return A;
})();
exports_1("A", A);
}
}
});
System.register("tests/cases/compiler/b", ["tests/cases/compiler/ref/a"], function(exports_2) {
var a_1;
var B;
return {
setters:[
function (a_1_1) {
a_1 = a_1_1;
}],
execute: function() {
B = (function (_super) {
__extends(B, _super);
function B() {
_super.apply(this, arguments);
}
return B;
})(a_1.A);
exports_2("B", B);
}
}
});
//# sourceMappingURL=all.js.map
//// [all.d.ts]
declare module "tests/cases/compiler/ref/a" {
export class A {
}
}
declare module "tests/cases/compiler/b" {
import { A } from "tests/cases/compiler/ref/a";
export class B extends A {
}
}
@@ -0,0 +1,2 @@
//// [all.js.map]
{"version":3,"file":"all.js","sourceRoot":"","sources":["tests/cases/compiler/ref/a.ts","tests/cases/compiler/b.ts"],"names":["A","A.constructor","B","B.constructor"],"mappings":";;;;;;;;;;YACA;gBAAAA;gBAAiBC,CAACA;gBAADD,QAACA;YAADA,CAACA,AAAlB,IAAkB;YAAlB,iBAAkB,CAAA;;;;;;;;;;;;;YCAlB;gBAAuBE,qBAACA;gBAAxBA;oBAAuBC,8BAACA;gBAAGA,CAACA;gBAADD,QAACA;YAADA,CAACA,AAA5B,EAAuB,KAAC,EAAI;YAA5B,iBAA4B,CAAA"}
@@ -0,0 +1,174 @@
===================================================================
JsFile: all.js
mapUrl: all.js.map
sourceRoot:
sources: tests/cases/compiler/ref/a.ts,tests/cases/compiler/b.ts
===================================================================
-------------------------------------------------------------------
emittedFile:all.js
sourceFile:tests/cases/compiler/ref/a.ts
-------------------------------------------------------------------
>>>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 __());
>>>};
>>>System.register("tests/cases/compiler/ref/a", [], function(exports_1) {
>>> var A;
>>> return {
>>> setters:[],
>>> execute: function() {
>>> A = (function () {
1 >^^^^^^^^^^^^
2 > ^^^^^^^^^^^^^^^^^^^->
1 >
>
1 >Emitted(11, 13) Source(2, 1) + SourceIndex(0)
---
>>> function A() {
1->^^^^^^^^^^^^^^^^
2 > ^^->
1->
1->Emitted(12, 17) Source(2, 1) + SourceIndex(0) name (A)
---
>>> }
1->^^^^^^^^^^^^^^^^
2 > ^
3 > ^^^^^^^^^->
1->export class A {
2 > }
1->Emitted(13, 17) Source(2, 18) + SourceIndex(0) name (A.constructor)
2 >Emitted(13, 18) Source(2, 19) + SourceIndex(0) name (A.constructor)
---
>>> return A;
1->^^^^^^^^^^^^^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(14, 17) Source(2, 18) + SourceIndex(0) name (A)
2 >Emitted(14, 25) Source(2, 19) + SourceIndex(0) name (A)
---
>>> })();
1 >^^^^^^^^^^^^
2 > ^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^->
1 >
2 > }
3 >
4 > export class A { }
1 >Emitted(15, 13) Source(2, 18) + SourceIndex(0) name (A)
2 >Emitted(15, 14) Source(2, 19) + SourceIndex(0) name (A)
3 >Emitted(15, 14) Source(2, 1) + SourceIndex(0)
4 >Emitted(15, 18) Source(2, 19) + SourceIndex(0)
---
>>> exports_1("A", A);
1->^^^^^^^^^^^^
2 > ^^^^^^^^^^^^^^^^^
3 > ^
1->
2 > export class A { }
3 >
1->Emitted(16, 13) Source(2, 1) + SourceIndex(0)
2 >Emitted(16, 30) Source(2, 19) + SourceIndex(0)
3 >Emitted(16, 31) Source(2, 19) + SourceIndex(0)
---
-------------------------------------------------------------------
emittedFile:all.js
sourceFile:tests/cases/compiler/b.ts
-------------------------------------------------------------------
>>> }
>>> }
>>>});
>>>System.register("tests/cases/compiler/b", ["tests/cases/compiler/ref/a"], function(exports_2) {
>>> var a_1;
>>> var B;
>>> return {
>>> setters:[
>>> function (a_1_1) {
>>> a_1 = a_1_1;
>>> }],
>>> execute: function() {
>>> B = (function (_super) {
1 >^^^^^^^^^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >import {A} from "./ref/a";
>
1 >Emitted(29, 13) Source(2, 1) + SourceIndex(1)
---
>>> __extends(B, _super);
1->^^^^^^^^^^^^^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^
1->export class B extends
2 > A
1->Emitted(30, 17) Source(2, 24) + SourceIndex(1) name (B)
2 >Emitted(30, 38) Source(2, 25) + SourceIndex(1) name (B)
---
>>> function B() {
1 >^^^^^^^^^^^^^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
1 >Emitted(31, 17) Source(2, 1) + SourceIndex(1) name (B)
---
>>> _super.apply(this, arguments);
1->^^^^^^^^^^^^^^^^^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1->export class B extends
2 > A
1->Emitted(32, 21) Source(2, 24) + SourceIndex(1) name (B.constructor)
2 >Emitted(32, 51) Source(2, 25) + SourceIndex(1) name (B.constructor)
---
>>> }
1 >^^^^^^^^^^^^^^^^
2 > ^
3 > ^^^^^^^^^->
1 > {
2 > }
1 >Emitted(33, 17) Source(2, 28) + SourceIndex(1) name (B.constructor)
2 >Emitted(33, 18) Source(2, 29) + SourceIndex(1) name (B.constructor)
---
>>> return B;
1->^^^^^^^^^^^^^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(34, 17) Source(2, 28) + SourceIndex(1) name (B)
2 >Emitted(34, 25) Source(2, 29) + SourceIndex(1) name (B)
---
>>> })(a_1.A);
1 >^^^^^^^^^^^^
2 > ^
3 >
4 > ^^
5 > ^^^^^
6 > ^^
7 > ^^^^^^^^^->
1 >
2 > }
3 >
4 > export class B extends
5 > A
6 > { }
1 >Emitted(35, 13) Source(2, 28) + SourceIndex(1) name (B)
2 >Emitted(35, 14) Source(2, 29) + SourceIndex(1) name (B)
3 >Emitted(35, 14) Source(2, 1) + SourceIndex(1)
4 >Emitted(35, 16) Source(2, 24) + SourceIndex(1)
5 >Emitted(35, 21) Source(2, 25) + SourceIndex(1)
6 >Emitted(35, 23) Source(2, 29) + SourceIndex(1)
---
>>> exports_2("B", B);
1->^^^^^^^^^^^^
2 > ^^^^^^^^^^^^^^^^^
3 > ^
1->
2 > export class B extends A { }
3 >
1->Emitted(36, 13) Source(2, 1) + SourceIndex(1)
2 >Emitted(36, 30) Source(2, 29) + SourceIndex(1)
3 >Emitted(36, 31) Source(2, 29) + SourceIndex(1)
---
>>> }
>>> }
>>>});
>>>//# sourceMappingURL=all.js.map
@@ -0,0 +1,13 @@
=== tests/cases/compiler/ref/a.ts ===
export class A { }
>A : Symbol(A, Decl(a.ts, 0, 0))
=== tests/cases/compiler/b.ts ===
import {A} from "./ref/a";
>A : Symbol(A, Decl(b.ts, 0, 8))
export class B extends A { }
>B : Symbol(B, Decl(b.ts, 0, 26))
>A : Symbol(A, Decl(b.ts, 0, 8))
@@ -0,0 +1,13 @@
=== tests/cases/compiler/ref/a.ts ===
export class A { }
>A : A
=== tests/cases/compiler/b.ts ===
import {A} from "./ref/a";
>A : typeof A
export class B extends A { }
>B : B
>A : A
@@ -0,0 +1,13 @@
error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile.
!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile.
==== tests/cases/compiler/ref/a.ts (0 errors) ====
// This should error
export class A { }
==== tests/cases/compiler/b.ts (0 errors) ====
import {A} from "./ref/a";
export class B extends A { }
@@ -0,0 +1,31 @@
//// [tests/cases/compiler/outModuleConcatUmd.ts] ////
//// [a.ts]
// This should error
export class A { }
//// [b.ts]
import {A} from "./ref/a";
export class B extends A { }
//// [all.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 __());
};
// This should error
//# sourceMappingURL=all.js.map
//// [all.d.ts]
declare module "tests/cases/compiler/ref/a" {
export class A {
}
}
declare module "tests/cases/compiler/b" {
import { A } from "tests/cases/compiler/ref/a";
export class B extends A {
}
}
@@ -0,0 +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":";;;;;AACA,oBAAoB"}
@@ -0,0 +1,26 @@
===================================================================
JsFile: all.js
mapUrl: all.js.map
sourceRoot:
sources: tests/cases/compiler/ref/a.ts,tests/cases/compiler/b.ts
===================================================================
-------------------------------------------------------------------
emittedFile:all.js
sourceFile:tests/cases/compiler/ref/a.ts
-------------------------------------------------------------------
>>>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 __());
>>>};
>>>// This should error
1 >
2 >^^^^^^^^^^^^^^^^^^^^
3 > ^^^^^^^^^^->
1 >
>
2 >// This should error
1 >Emitted(6, 1) Source(2, 1) + SourceIndex(0)
2 >Emitted(6, 21) Source(2, 21) + SourceIndex(0)
---
>>>//# sourceMappingURL=all.js.map
@@ -0,0 +1,81 @@
//// [tests/cases/compiler/outModuleTripleSlashRefs.ts] ////
//// [a.ts]
/// <reference path="./b.ts" />
export class A {
member: typeof GlobalFoo;
}
//// [b.ts]
/// <reference path="./c.d.ts" />
class Foo {
member: Bar;
}
declare var GlobalFoo: Foo;
//// [c.d.ts]
/// <reference path="./d.d.ts" />
declare class Bar {
member: Baz;
}
//// [d.d.ts]
declare class Baz {
member: number;
}
//// [b.ts]
import {A} from "./ref/a";
export class B extends A { }
//// [all.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 __());
};
/// <reference path="./c.d.ts" />
var Foo = (function () {
function Foo() {
}
return Foo;
})();
define("tests/cases/compiler/ref/a", ["require", "exports"], function (require, exports) {
/// <reference path="./b.ts" />
var A = (function () {
function A() {
}
return A;
})();
exports.A = A;
});
define("tests/cases/compiler/b", ["require", "exports", "tests/cases/compiler/ref/a"], function (require, exports, a_1) {
var B = (function (_super) {
__extends(B, _super);
function B() {
_super.apply(this, arguments);
}
return B;
})(a_1.A);
exports.B = B;
});
//# sourceMappingURL=all.js.map
//// [all.d.ts]
/// <reference path="tests/cases/compiler/ref/c.d.ts" />
declare class Foo {
member: Bar;
}
declare var GlobalFoo: Foo;
declare module "tests/cases/compiler/ref/a" {
export class A {
member: typeof GlobalFoo;
}
}
declare module "tests/cases/compiler/b" {
import { A } from "tests/cases/compiler/ref/a";
export class B extends A {
}
}
@@ -0,0 +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":["Foo","Foo.constructor","A","A.constructor","B","B.constructor"],"mappings":";;;;;AAAA,iCAAiC;AACjC;IAAAA;IAEAC,CAACA;IAADD,UAACA;AAADA,CAACA,AAFD,IAEC;;ICFD,+BAA+B;IAC/B;QAAAE;QAEAC,CAACA;QAADD,QAACA;IAADA,CAACA,AAFD,IAEC;IAFY,SAAC,IAEb,CAAA;;;ICHD;QAAuBE,qBAACA;QAAxBA;YAAuBC,8BAACA;QAAGA,CAACA;QAADD,QAACA;IAADA,CAACA,AAA5B,EAAuB,KAAC,EAAI;IAAf,SAAC,IAAc,CAAA"}
@@ -0,0 +1,240 @@
===================================================================
JsFile: all.js
mapUrl: all.js.map
sourceRoot:
sources: tests/cases/compiler/ref/b.ts,tests/cases/compiler/ref/a.ts,tests/cases/compiler/b.ts
===================================================================
-------------------------------------------------------------------
emittedFile:all.js
sourceFile:tests/cases/compiler/ref/b.ts
-------------------------------------------------------------------
>>>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 __());
>>>};
>>>/// <reference path="./c.d.ts" />
1 >
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 >
2 >/// <reference path="./c.d.ts" />
1 >Emitted(6, 1) Source(1, 1) + SourceIndex(0)
2 >Emitted(6, 34) Source(1, 34) + SourceIndex(0)
---
>>>var Foo = (function () {
1 >
2 >^^^^^^^^^^^^^^^^^^^^^->
1 >
>
1 >Emitted(7, 1) Source(2, 1) + SourceIndex(0)
---
>>> function Foo() {
1->^^^^
2 > ^^->
1->
1->Emitted(8, 5) Source(2, 1) + SourceIndex(0) name (Foo)
---
>>> }
1->^^^^
2 > ^
3 > ^^^^^^^^^^^->
1->class Foo {
> member: Bar;
>
2 > }
1->Emitted(9, 5) Source(4, 1) + SourceIndex(0) name (Foo.constructor)
2 >Emitted(9, 6) Source(4, 2) + SourceIndex(0) name (Foo.constructor)
---
>>> return Foo;
1->^^^^
2 > ^^^^^^^^^^
1->
2 > }
1->Emitted(10, 5) Source(4, 1) + SourceIndex(0) name (Foo)
2 >Emitted(10, 15) Source(4, 2) + SourceIndex(0) name (Foo)
---
>>>})();
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
2 >}
3 >
4 > class Foo {
> member: Bar;
> }
1 >Emitted(11, 1) Source(4, 1) + SourceIndex(0) name (Foo)
2 >Emitted(11, 2) Source(4, 2) + SourceIndex(0) name (Foo)
3 >Emitted(11, 2) Source(2, 1) + SourceIndex(0)
4 >Emitted(11, 6) Source(4, 2) + SourceIndex(0)
---
-------------------------------------------------------------------
emittedFile:all.js
sourceFile:tests/cases/compiler/ref/a.ts
-------------------------------------------------------------------
>>>define("tests/cases/compiler/ref/a", ["require", "exports"], function (require, exports) {
>>> /// <reference path="./b.ts" />
1->^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1->
>
2 > /// <reference path="./b.ts" />
1->Emitted(13, 5) Source(2, 1) + SourceIndex(1)
2 >Emitted(13, 36) Source(2, 32) + SourceIndex(1)
---
>>> var A = (function () {
1 >^^^^
2 > ^^^^^^^^^^^^^^^^^^^->
1 >
>
1 >Emitted(14, 5) Source(3, 1) + SourceIndex(1)
---
>>> function A() {
1->^^^^^^^^
2 > ^^->
1->
1->Emitted(15, 9) Source(3, 1) + SourceIndex(1) name (A)
---
>>> }
1->^^^^^^^^
2 > ^
3 > ^^^^^^^^^->
1->export class A {
> member: typeof GlobalFoo;
>
2 > }
1->Emitted(16, 9) Source(5, 1) + SourceIndex(1) name (A.constructor)
2 >Emitted(16, 10) Source(5, 2) + SourceIndex(1) name (A.constructor)
---
>>> return A;
1->^^^^^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(17, 9) Source(5, 1) + SourceIndex(1) name (A)
2 >Emitted(17, 17) Source(5, 2) + SourceIndex(1) name (A)
---
>>> })();
1 >^^^^
2 > ^
3 >
4 > ^^^^
5 > ^^^^^^^^^^->
1 >
2 > }
3 >
4 > export class A {
> member: typeof GlobalFoo;
> }
1 >Emitted(18, 5) Source(5, 1) + SourceIndex(1) name (A)
2 >Emitted(18, 6) Source(5, 2) + SourceIndex(1) name (A)
3 >Emitted(18, 6) Source(3, 1) + SourceIndex(1)
4 >Emitted(18, 10) Source(5, 2) + SourceIndex(1)
---
>>> exports.A = A;
1->^^^^
2 > ^^^^^^^^^
3 > ^^^^
4 > ^
1->
2 > A
3 > {
> member: typeof GlobalFoo;
> }
4 >
1->Emitted(19, 5) Source(3, 14) + SourceIndex(1)
2 >Emitted(19, 14) Source(3, 15) + SourceIndex(1)
3 >Emitted(19, 18) Source(5, 2) + SourceIndex(1)
4 >Emitted(19, 19) Source(5, 2) + SourceIndex(1)
---
-------------------------------------------------------------------
emittedFile:all.js
sourceFile:tests/cases/compiler/b.ts
-------------------------------------------------------------------
>>>});
>>>define("tests/cases/compiler/b", ["require", "exports", "tests/cases/compiler/ref/a"], function (require, exports, a_1) {
>>> var B = (function (_super) {
1 >^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >import {A} from "./ref/a";
>
1 >Emitted(22, 5) Source(2, 1) + SourceIndex(2)
---
>>> __extends(B, _super);
1->^^^^^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^
1->export class B extends
2 > A
1->Emitted(23, 9) Source(2, 24) + SourceIndex(2) name (B)
2 >Emitted(23, 30) Source(2, 25) + SourceIndex(2) name (B)
---
>>> function B() {
1 >^^^^^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
1 >Emitted(24, 9) Source(2, 1) + SourceIndex(2) name (B)
---
>>> _super.apply(this, arguments);
1->^^^^^^^^^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1->export class B extends
2 > A
1->Emitted(25, 13) Source(2, 24) + SourceIndex(2) name (B.constructor)
2 >Emitted(25, 43) Source(2, 25) + SourceIndex(2) name (B.constructor)
---
>>> }
1 >^^^^^^^^
2 > ^
3 > ^^^^^^^^^->
1 > {
2 > }
1 >Emitted(26, 9) Source(2, 28) + SourceIndex(2) name (B.constructor)
2 >Emitted(26, 10) Source(2, 29) + SourceIndex(2) name (B.constructor)
---
>>> return B;
1->^^^^^^^^
2 > ^^^^^^^^
1->
2 > }
1->Emitted(27, 9) Source(2, 28) + SourceIndex(2) name (B)
2 >Emitted(27, 17) Source(2, 29) + SourceIndex(2) name (B)
---
>>> })(a_1.A);
1 >^^^^
2 > ^
3 >
4 > ^^
5 > ^^^^^
6 > ^^
7 > ^^^^^->
1 >
2 > }
3 >
4 > export class B extends
5 > A
6 > { }
1 >Emitted(28, 5) Source(2, 28) + SourceIndex(2) name (B)
2 >Emitted(28, 6) Source(2, 29) + SourceIndex(2) name (B)
3 >Emitted(28, 6) Source(2, 1) + SourceIndex(2)
4 >Emitted(28, 8) Source(2, 24) + SourceIndex(2)
5 >Emitted(28, 13) Source(2, 25) + SourceIndex(2)
6 >Emitted(28, 15) Source(2, 29) + SourceIndex(2)
---
>>> exports.B = B;
1->^^^^
2 > ^^^^^^^^^
3 > ^^^^
4 > ^
1->
2 > B
3 > extends A { }
4 >
1->Emitted(29, 5) Source(2, 14) + SourceIndex(2)
2 >Emitted(29, 14) Source(2, 15) + SourceIndex(2)
3 >Emitted(29, 18) Source(2, 29) + SourceIndex(2)
4 >Emitted(29, 19) Source(2, 29) + SourceIndex(2)
---
>>>});
>>>//# sourceMappingURL=all.js.map
@@ -0,0 +1,50 @@
=== tests/cases/compiler/ref/a.ts ===
/// <reference path="./b.ts" />
export class A {
>A : Symbol(A, Decl(a.ts, 0, 0))
member: typeof GlobalFoo;
>member : Symbol(member, Decl(a.ts, 2, 16))
>GlobalFoo : Symbol(GlobalFoo, Decl(b.ts, 4, 11))
}
=== tests/cases/compiler/ref/b.ts ===
/// <reference path="./c.d.ts" />
class Foo {
>Foo : Symbol(Foo, Decl(b.ts, 0, 0))
member: Bar;
>member : Symbol(member, Decl(b.ts, 1, 11))
>Bar : Symbol(Bar, Decl(c.d.ts, 0, 0))
}
declare var GlobalFoo: Foo;
>GlobalFoo : Symbol(GlobalFoo, Decl(b.ts, 4, 11))
>Foo : Symbol(Foo, Decl(b.ts, 0, 0))
=== tests/cases/compiler/ref/c.d.ts ===
/// <reference path="./d.d.ts" />
declare class Bar {
>Bar : Symbol(Bar, Decl(c.d.ts, 0, 0))
member: Baz;
>member : Symbol(member, Decl(c.d.ts, 1, 19))
>Baz : Symbol(Baz, Decl(d.d.ts, 0, 0))
}
=== tests/cases/compiler/ref/d.d.ts ===
declare class Baz {
>Baz : Symbol(Baz, Decl(d.d.ts, 0, 0))
member: number;
>member : Symbol(member, Decl(d.d.ts, 0, 19))
}
=== tests/cases/compiler/b.ts ===
import {A} from "./ref/a";
>A : Symbol(A, Decl(b.ts, 0, 8))
export class B extends A { }
>B : Symbol(B, Decl(b.ts, 0, 26))
>A : Symbol(A, Decl(b.ts, 0, 8))
@@ -0,0 +1,50 @@
=== tests/cases/compiler/ref/a.ts ===
/// <reference path="./b.ts" />
export class A {
>A : A
member: typeof GlobalFoo;
>member : Foo
>GlobalFoo : Foo
}
=== tests/cases/compiler/ref/b.ts ===
/// <reference path="./c.d.ts" />
class Foo {
>Foo : Foo
member: Bar;
>member : Bar
>Bar : Bar
}
declare var GlobalFoo: Foo;
>GlobalFoo : Foo
>Foo : Foo
=== tests/cases/compiler/ref/c.d.ts ===
/// <reference path="./d.d.ts" />
declare class Bar {
>Bar : Bar
member: Baz;
>member : Baz
>Baz : Baz
}
=== tests/cases/compiler/ref/d.d.ts ===
declare class Baz {
>Baz : Baz
member: number;
>member : number
}
=== tests/cases/compiler/b.ts ===
import {A} from "./ref/a";
>A : typeof A
export class B extends A { }
>B : B
>A : A
@@ -22,23 +22,23 @@ interface MyDoc { // Document
>MyDoc : MyDoc
createElement(tagName: string): Base;
>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; }
>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; }
>tagName : string
>Base : Base
createElement(tagName: 'canvas'): Derived1;
>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; }
>tagName : 'canvas'
>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; }
>tagName : "canvas"
>Derived1 : Derived1
createElement(tagName: 'div'): Derived2;
>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; }
>tagName : 'div'
>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; }
>tagName : "div"
>Derived2 : Derived2
createElement(tagName: 'span'): Derived3;
>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; }
>tagName : 'span'
>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; }
>tagName : "span"
>Derived3 : Derived3
// + 100 more
@@ -49,27 +49,27 @@ class D implements MyDoc {
>MyDoc : MyDoc
createElement(tagName:string): Base;
>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; }
>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; }
>tagName : string
>Base : Base
createElement(tagName: 'canvas'): Derived1;
>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; }
>tagName : 'canvas'
>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; }
>tagName : "canvas"
>Derived1 : Derived1
createElement(tagName: 'div'): Derived2;
>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; }
>tagName : 'div'
>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; }
>tagName : "div"
>Derived2 : Derived2
createElement(tagName: 'span'): Derived3;
>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; }
>tagName : 'span'
>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; }
>tagName : "span"
>Derived3 : Derived3
createElement(tagName:any): Base {
>createElement : { (tagName: string): Base; (tagName: 'canvas'): Derived1; (tagName: 'div'): Derived2; (tagName: 'span'): Derived3; }
>createElement : { (tagName: string): Base; (tagName: "canvas"): Derived1; (tagName: "div"): Derived2; (tagName: "span"): Derived3; }
>tagName : any
>Base : Base
@@ -14,22 +14,22 @@ class C extends A {
>foo : () => void
}
function foo(name: 'hi'): B;
>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; }
>name : 'hi'
>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; }
>name : "hi"
>B : B
function foo(name: 'bye'): C;
>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; }
>name : 'bye'
>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; }
>name : "bye"
>C : C
function foo(name: string): A;
>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; }
>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; }
>name : string
>A : A
function foo(name: any): A {
>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; }
>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; }
>name : any
>A : A
@@ -16,22 +16,22 @@ class C extends A {
>foo : () => void
}
function foo(name: 'hi'): B;
>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; }
>name : 'hi'
>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; }
>name : "hi"
>B : B
function foo(name: 'bye'): C;
>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; }
>name : 'bye'
>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; }
>name : "bye"
>C : C
function foo(name: string): A;
>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; }
>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; }
>name : string
>A : A
function foo(name: any): A {
>foo : { (name: 'hi'): B; (name: 'bye'): C; (name: string): A; }
>foo : { (name: "hi"): B; (name: "bye"): C; (name: string): A; }
>name : any
>A : A
@@ -3,23 +3,23 @@ interface Base {
>Base : Base
addEventListener(x: string): any;
>addEventListener : { (x: string): any; (x: 'foo'): string; }
>addEventListener : { (x: string): any; (x: "foo"): string; }
>x : string
addEventListener(x: 'foo'): string;
>addEventListener : { (x: string): any; (x: 'foo'): string; }
>x : 'foo'
>addEventListener : { (x: string): any; (x: "foo"): string; }
>x : "foo"
}
interface Deriver extends Base {
>Deriver : Deriver
>Base : Base
addEventListener(x: string): any;
>addEventListener : { (x: string): any; (x: 'bar'): string; }
>addEventListener : { (x: string): any; (x: "bar"): string; }
>x : string
addEventListener(x: 'bar'): string;
>addEventListener : { (x: string): any; (x: 'bar'): string; }
>x : 'bar'
>addEventListener : { (x: string): any; (x: "bar"): string; }
>x : "bar"
}
@@ -1,6 +1,6 @@
tests/cases/compiler/overloadOnConstInheritance2.ts(5,11): error TS2430: Interface 'Deriver' incorrectly extends interface 'Base'.
Types of property 'addEventListener' are incompatible.
Type '(x: 'bar') => string' is not assignable to type '{ (x: string): any; (x: 'foo'): string; }'.
Type '(x: "bar") => string' is not assignable to type '{ (x: string): any; (x: "foo"): string; }'.
tests/cases/compiler/overloadOnConstInheritance2.ts(6,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
@@ -13,7 +13,7 @@ tests/cases/compiler/overloadOnConstInheritance2.ts(6,5): error TS2382: Speciali
~~~~~~~
!!! error TS2430: Interface 'Deriver' incorrectly extends interface 'Base'.
!!! error TS2430: Types of property 'addEventListener' are incompatible.
!!! error TS2430: Type '(x: 'bar') => string' is not assignable to type '{ (x: string): any; (x: 'foo'): string; }'.
!!! error TS2430: Type '(x: "bar") => string' is not assignable to type '{ (x: string): any; (x: "foo"): string; }'.
addEventListener(x: 'bar'): string; // shouldn't need to redeclare the string overload
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
@@ -1,6 +1,6 @@
tests/cases/compiler/overloadOnConstInheritance3.ts(4,11): error TS2430: Interface 'Deriver' incorrectly extends interface 'Base'.
Types of property 'addEventListener' are incompatible.
Type '{ (x: 'bar'): string; (x: 'foo'): string; }' is not assignable to type '(x: string) => any'.
Type '{ (x: "bar"): string; (x: "foo"): string; }' is not assignable to type '(x: string) => any'.
tests/cases/compiler/overloadOnConstInheritance3.ts(6,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
tests/cases/compiler/overloadOnConstInheritance3.ts(7,5): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
@@ -13,7 +13,7 @@ tests/cases/compiler/overloadOnConstInheritance3.ts(7,5): error TS2382: Speciali
~~~~~~~
!!! error TS2430: Interface 'Deriver' incorrectly extends interface 'Base'.
!!! error TS2430: Types of property 'addEventListener' are incompatible.
!!! error TS2430: Type '{ (x: 'bar'): string; (x: 'foo'): string; }' is not assignable to type '(x: string) => any'.
!!! error TS2430: Type '{ (x: "bar"): string; (x: "foo"): string; }' is not assignable to type '(x: string) => any'.
// shouldn't need to redeclare the string overload
addEventListener(x: 'bar'): string;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1,6 +1,6 @@
tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(6,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(7,10): error TS2381: A signature with an implementation cannot use a string literal type.
tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(11,5): error TS2345: Argument of type 'string' is not assignable to parameter of type '"SPAN"'.
tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(11,5): error TS2345: Argument of type '"HI"' is not assignable to parameter of type '"SPAN"'.
==== tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts (3 errors) ====
@@ -20,4 +20,4 @@ tests/cases/compiler/overloadOnConstantsInvalidOverload1.ts(11,5): error TS2345:
foo("HI");
~~~~
!!! error TS2345: Argument of type 'string' is not assignable to parameter of type '"SPAN"'.
!!! error TS2345: Argument of type '"HI"' is not assignable to parameter of type '"SPAN"'.
@@ -1,6 +1,6 @@
tests/cases/compiler/overloadingOnConstants2.ts(8,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
tests/cases/compiler/overloadingOnConstants2.ts(9,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
tests/cases/compiler/overloadingOnConstants2.ts(15,13): error TS2345: Argument of type 'string' is not assignable to parameter of type '"bye"'.
tests/cases/compiler/overloadingOnConstants2.ts(15,13): error TS2345: Argument of type '"um"' is not assignable to parameter of type '"bye"'.
tests/cases/compiler/overloadingOnConstants2.ts(19,10): error TS2382: Specialized overload signature is not assignable to any non-specialized signature.
@@ -25,7 +25,7 @@ tests/cases/compiler/overloadingOnConstants2.ts(19,10): error TS2382: Specialize
var b: E = foo("bye", []); // E
var c = foo("um", []); // error
~~~~
!!! error TS2345: Argument of type 'string' is not assignable to parameter of type '"bye"'.
!!! error TS2345: Argument of type '"um"' is not assignable to parameter of type '"bye"'.
//function bar(x: "hi", items: string[]): D;
@@ -1,34 +0,0 @@
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable1.ts(12,21): error TS1110: Type expected.
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable1.ts (1 errors) ====
// Interface
interface IPoint {
getDist(): number;
}
// Module
module Shapes {
// Class
export class Point implements IPoint {
public con: "hello";
~~~~~~~
!!! error TS1110: Type expected.
// Constructor
constructor (public x: number, public y: number) { }
// Instance member
getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); }
// Static member
static origin = new Point(0, 0);
}
}
// Local variables
var p: IPoint = new Shapes.Point(3, 4);
var dist = p.getDist();
@@ -38,7 +38,6 @@ var Shapes;
function Point(x, y) {
this.x = x;
this.y = y;
this.con = "hello";
}
// Instance member
Point.prototype.getDist = function () { return Math.sqrt(this.x * this.x + this.y * this.y); };
@@ -0,0 +1,67 @@
=== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable1.ts ===
// Interface
interface IPoint {
>IPoint : Symbol(IPoint, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 0, 0))
getDist(): number;
>getDist : Symbol(getDist, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 1, 18))
}
// Module
module Shapes {
>Shapes : Symbol(Shapes, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 3, 1))
// Class
export class Point implements IPoint {
>Point : Symbol(Point, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 6, 15))
>IPoint : Symbol(IPoint, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 0, 0))
public con: "hello";
>con : Symbol(con, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 9, 42))
// Constructor
constructor (public x: number, public y: number) { }
>x : Symbol(x, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 21))
>y : Symbol(y, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 38))
// Instance member
getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); }
>getDist : Symbol(getDist, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 60))
>Math.sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, --, --))
>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
>sqrt : Symbol(Math.sqrt, Decl(lib.d.ts, --, --))
>this.x : Symbol(x, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 21))
>this : Symbol(Point, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 6, 15))
>x : Symbol(x, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 21))
>this.x : Symbol(x, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 21))
>this : Symbol(Point, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 6, 15))
>x : Symbol(x, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 21))
>this.y : Symbol(y, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 38))
>this : Symbol(Point, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 6, 15))
>y : Symbol(y, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 38))
>this.y : Symbol(y, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 38))
>this : Symbol(Point, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 6, 15))
>y : Symbol(y, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 13, 38))
// Static member
static origin = new Point(0, 0);
>origin : Symbol(Point.origin, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 16, 74))
>Point : Symbol(Point, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 6, 15))
}
}
// Local variables
var p: IPoint = new Shapes.Point(3, 4);
>p : Symbol(p, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 25, 3))
>IPoint : Symbol(IPoint, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 0, 0))
>Shapes.Point : Symbol(Shapes.Point, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 6, 15))
>Shapes : Symbol(Shapes, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 3, 1))
>Point : Symbol(Shapes.Point, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 6, 15))
var dist = p.getDist();
>dist : Symbol(dist, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 26, 3))
>p.getDist : Symbol(IPoint.getDist, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 1, 18))
>p : Symbol(p, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 25, 3))
>getDist : Symbol(IPoint.getDist, Decl(parserErrorRecovery_IncompleteMemberVariable1.ts, 1, 18))
@@ -0,0 +1,78 @@
=== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable1.ts ===
// Interface
interface IPoint {
>IPoint : IPoint
getDist(): number;
>getDist : () => number
}
// Module
module Shapes {
>Shapes : typeof Shapes
// Class
export class Point implements IPoint {
>Point : Point
>IPoint : IPoint
public con: "hello";
>con : "hello"
// Constructor
constructor (public x: number, public y: number) { }
>x : number
>y : number
// Instance member
getDist() { return Math.sqrt(this.x * this.x + this.y * this.y); }
>getDist : () => number
>Math.sqrt(this.x * this.x + this.y * this.y) : number
>Math.sqrt : (x: number) => number
>Math : Math
>sqrt : (x: number) => number
>this.x * this.x + this.y * this.y : number
>this.x * this.x : number
>this.x : number
>this : this
>x : number
>this.x : number
>this : this
>x : number
>this.y * this.y : number
>this.y : number
>this : this
>y : number
>this.y : number
>this : this
>y : number
// Static member
static origin = new Point(0, 0);
>origin : Point
>new Point(0, 0) : Point
>Point : typeof Point
>0 : number
>0 : number
}
}
// Local variables
var p: IPoint = new Shapes.Point(3, 4);
>p : IPoint
>IPoint : IPoint
>new Shapes.Point(3, 4) : Shapes.Point
>Shapes.Point : typeof Shapes.Point
>Shapes : typeof Shapes
>Point : typeof Shapes.Point
>3 : number
>4 : number
var dist = p.getDist();
>dist : number
>p.getDist() : number
>p.getDist : () => number
>p : IPoint
>getDist : () => number
@@ -50,19 +50,19 @@ function foo4(x: any) { }
>x : any
function foo5(x: 'a');
>foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; }
>x : 'a'
>foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; }
>x : "a"
function foo5(x: 'a');
>foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; }
>x : 'a'
>foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; }
>x : "a"
function foo5(x: string);
>foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; }
>foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; }
>x : string
function foo5(x: any) { }
>foo5 : { (x: 'a'): any; (x: 'a'): any; (x: string): any; }
>foo5 : { (x: "a"): any; (x: "a"): any; (x: string): any; }
>x : any
enum E { A }
@@ -1,10 +1,17 @@
/// <reference path="../ref/m2.d.ts" />
declare var m1_a1: number;
declare class m1_c1 {
m1_c1_p1: number;
}
declare var m1_instance1: m1_c1;
declare function m1_f1(): m1_c1;
declare module "ref/m2" {
export var m2_a1: number;
export class m2_c1 {
m2_c1_p1: number;
}
export var m2_instance1: m2_c1;
export function m2_f1(): m2_c1;
}
declare var a1: number;
declare class c1 {
p1: number;
@@ -8,6 +8,20 @@ var m1_instance1 = new m1_c1();
function m1_f1() {
return m1_instance1;
}
define("ref/m2", ["require", "exports"], function (require, exports) {
exports.m2_a1 = 10;
var m2_c1 = (function () {
function m2_c1() {
}
return m2_c1;
})();
exports.m2_c1 = m2_c1;
exports.m2_instance1 = new m2_c1();
function m2_f1() {
return exports.m2_instance1;
}
exports.m2_f1 = m2_f1;
});
/// <reference path='ref/m1.ts'/>
/// <reference path='ref/m2.ts'/>
var a1 = 10;
@@ -1 +1 @@
{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"}
{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"}
@@ -17,9 +17,6 @@
"test.ts"
],
"emittedFiles": [
"ref/m2.js.map",
"ref/m2.js",
"ref/m2.d.ts",
"bin/test.js.map",
"bin/test.js",
"bin/test.d.ts"
@@ -1,180 +1,8 @@
===================================================================
JsFile: m2.js
mapUrl: /tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map
sourceRoot:
sources: ../../ref/m2.ts
===================================================================
-------------------------------------------------------------------
emittedFile:ref/m2.js
sourceFile:../../ref/m2.ts
-------------------------------------------------------------------
>>>define(["require", "exports"], function (require, exports) {
>>> exports.m2_a1 = 10;
1 >^^^^
2 > ^^^^^^^^^^^^^
3 > ^^^
4 > ^^
5 > ^
6 > ^^^^^^^^->
1 >export var
2 > m2_a1
3 > =
4 > 10
5 > ;
1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0)
2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0)
3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0)
4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0)
5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0)
---
>>> var m2_c1 = (function () {
1->^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^->
1->
>
1->Emitted(3, 5) Source(2, 1) + SourceIndex(0)
---
>>> function m2_c1() {
1->^^^^^^^^
2 > ^^->
1->
1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1)
---
>>> }
1->^^^^^^^^
2 > ^
3 > ^^^^^^^^^^^^^->
1->export class m2_c1 {
> public m2_c1_p1: number;
>
2 > }
1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor)
2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor)
---
>>> return m2_c1;
1->^^^^^^^^
2 > ^^^^^^^^^^^^
1->
2 > }
1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1)
2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1)
---
>>> })();
1 >^^^^
2 > ^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^->
1 >
2 > }
3 >
4 > export class m2_c1 {
> public m2_c1_p1: number;
> }
1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1)
2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1)
3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0)
4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0)
---
>>> exports.m2_c1 = m2_c1;
1->^^^^
2 > ^^^^^^^^^^^^^
3 > ^^^^^^^^
4 > ^
5 > ^^^^^^^^^^^^^^->
1->
2 > m2_c1
3 > {
> public m2_c1_p1: number;
> }
4 >
1->Emitted(8, 5) Source(2, 14) + SourceIndex(0)
2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0)
3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0)
4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0)
---
>>> exports.m2_instance1 = new m2_c1();
1->^^^^
2 > ^^^^^^^^^^^^^^^^^^^^
3 > ^^^
4 > ^^^^
5 > ^^^^^
6 > ^^
7 > ^
1->
>
>export var
2 > m2_instance1
3 > =
4 > new
5 > m2_c1
6 > ()
7 > ;
1->Emitted(9, 5) Source(6, 12) + SourceIndex(0)
2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0)
3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0)
4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0)
5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0)
6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0)
7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0)
---
>>> function m2_f1() {
1 >^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0)
---
>>> return exports.m2_instance1;
1->^^^^^^^^
2 > ^^^^^^
3 > ^
4 > ^^^^^^^^^^^^^^^^^^^^
5 > ^
1->export function m2_f1() {
>
2 > return
3 >
4 > m2_instance1
5 > ;
1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1)
2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1)
3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1)
4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1)
5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1)
---
>>> }
1 >^^^^
2 > ^
3 > ^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
2 > }
1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1)
2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1)
---
>>> exports.m2_f1 = m2_f1;
1->^^^^
2 > ^^^^^^^^^^^^^
3 > ^^^^^^^^
4 > ^
1->
2 > m2_f1
3 > () {
> return m2_instance1;
> }
4 >
1->Emitted(13, 5) Source(7, 17) + SourceIndex(0)
2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0)
3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0)
4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0)
---
>>>});
>>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map===================================================================
JsFile: test.js
mapUrl: /tests/cases/projects/outputdir_mixed_subfolder/mapFiles/test.js.map
sourceRoot:
sources: ../ref/m1.ts,../test.ts
sources: ../ref/m1.ts,../ref/m2.ts,../test.ts
===================================================================
-------------------------------------------------------------------
emittedFile:bin/test.js
@@ -306,7 +134,7 @@ sourceFile:../ref/m1.ts
>>>}
1 >
2 >^
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
2 >}
@@ -315,16 +143,182 @@ sourceFile:../ref/m1.ts
---
-------------------------------------------------------------------
emittedFile:bin/test.js
sourceFile:../ref/m2.ts
-------------------------------------------------------------------
>>>define("ref/m2", ["require", "exports"], function (require, exports) {
>>> exports.m2_a1 = 10;
1->^^^^
2 > ^^^^^^^^^^^^^
3 > ^^^
4 > ^^
5 > ^
6 > ^^^^^^^^->
1->export var
2 > m2_a1
3 > =
4 > 10
5 > ;
1->Emitted(12, 5) Source(1, 12) + SourceIndex(1)
2 >Emitted(12, 18) Source(1, 17) + SourceIndex(1)
3 >Emitted(12, 21) Source(1, 20) + SourceIndex(1)
4 >Emitted(12, 23) Source(1, 22) + SourceIndex(1)
5 >Emitted(12, 24) Source(1, 23) + SourceIndex(1)
---
>>> var m2_c1 = (function () {
1->^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^->
1->
>
1->Emitted(13, 5) Source(2, 1) + SourceIndex(1)
---
>>> function m2_c1() {
1->^^^^^^^^
2 > ^^->
1->
1->Emitted(14, 9) Source(2, 1) + SourceIndex(1) name (m2_c1)
---
>>> }
1->^^^^^^^^
2 > ^
3 > ^^^^^^^^^^^^^->
1->export class m2_c1 {
> public m2_c1_p1: number;
>
2 > }
1->Emitted(15, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor)
2 >Emitted(15, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor)
---
>>> return m2_c1;
1->^^^^^^^^
2 > ^^^^^^^^^^^^
1->
2 > }
1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) name (m2_c1)
2 >Emitted(16, 21) Source(4, 2) + SourceIndex(1) name (m2_c1)
---
>>> })();
1 >^^^^
2 > ^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^->
1 >
2 > }
3 >
4 > export class m2_c1 {
> public m2_c1_p1: number;
> }
1 >Emitted(17, 5) Source(4, 1) + SourceIndex(1) name (m2_c1)
2 >Emitted(17, 6) Source(4, 2) + SourceIndex(1) name (m2_c1)
3 >Emitted(17, 6) Source(2, 1) + SourceIndex(1)
4 >Emitted(17, 10) Source(4, 2) + SourceIndex(1)
---
>>> exports.m2_c1 = m2_c1;
1->^^^^
2 > ^^^^^^^^^^^^^
3 > ^^^^^^^^
4 > ^
5 > ^^^^^^^^^^^^^^->
1->
2 > m2_c1
3 > {
> public m2_c1_p1: number;
> }
4 >
1->Emitted(18, 5) Source(2, 14) + SourceIndex(1)
2 >Emitted(18, 18) Source(2, 19) + SourceIndex(1)
3 >Emitted(18, 26) Source(4, 2) + SourceIndex(1)
4 >Emitted(18, 27) Source(4, 2) + SourceIndex(1)
---
>>> exports.m2_instance1 = new m2_c1();
1->^^^^
2 > ^^^^^^^^^^^^^^^^^^^^
3 > ^^^
4 > ^^^^
5 > ^^^^^
6 > ^^
7 > ^
1->
>
>export var
2 > m2_instance1
3 > =
4 > new
5 > m2_c1
6 > ()
7 > ;
1->Emitted(19, 5) Source(6, 12) + SourceIndex(1)
2 >Emitted(19, 25) Source(6, 24) + SourceIndex(1)
3 >Emitted(19, 28) Source(6, 27) + SourceIndex(1)
4 >Emitted(19, 32) Source(6, 31) + SourceIndex(1)
5 >Emitted(19, 37) Source(6, 36) + SourceIndex(1)
6 >Emitted(19, 39) Source(6, 38) + SourceIndex(1)
7 >Emitted(19, 40) Source(6, 39) + SourceIndex(1)
---
>>> function m2_f1() {
1 >^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
1 >Emitted(20, 5) Source(7, 1) + SourceIndex(1)
---
>>> return exports.m2_instance1;
1->^^^^^^^^
2 > ^^^^^^
3 > ^
4 > ^^^^^^^^^^^^^^^^^^^^
5 > ^
1->export function m2_f1() {
>
2 > return
3 >
4 > m2_instance1
5 > ;
1->Emitted(21, 9) Source(8, 5) + SourceIndex(1) name (m2_f1)
2 >Emitted(21, 15) Source(8, 11) + SourceIndex(1) name (m2_f1)
3 >Emitted(21, 16) Source(8, 12) + SourceIndex(1) name (m2_f1)
4 >Emitted(21, 36) Source(8, 24) + SourceIndex(1) name (m2_f1)
5 >Emitted(21, 37) Source(8, 25) + SourceIndex(1) name (m2_f1)
---
>>> }
1 >^^^^
2 > ^
3 > ^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
2 > }
1 >Emitted(22, 5) Source(9, 1) + SourceIndex(1) name (m2_f1)
2 >Emitted(22, 6) Source(9, 2) + SourceIndex(1) name (m2_f1)
---
>>> exports.m2_f1 = m2_f1;
1->^^^^
2 > ^^^^^^^^^^^^^
3 > ^^^^^^^^
4 > ^
1->
2 > m2_f1
3 > () {
> return m2_instance1;
> }
4 >
1->Emitted(23, 5) Source(7, 17) + SourceIndex(1)
2 >Emitted(23, 18) Source(7, 22) + SourceIndex(1)
3 >Emitted(23, 26) Source(9, 2) + SourceIndex(1)
4 >Emitted(23, 27) Source(9, 2) + SourceIndex(1)
---
-------------------------------------------------------------------
emittedFile:bin/test.js
sourceFile:../test.ts
-------------------------------------------------------------------
>>>});
>>>/// <reference path='ref/m1.ts'/>
1->
1 >
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 > ^->
1->
1 >
2 >/// <reference path='ref/m1.ts'/>
1->Emitted(11, 1) Source(1, 1) + SourceIndex(1)
2 >Emitted(11, 34) Source(1, 34) + SourceIndex(1)
1 >Emitted(25, 1) Source(1, 1) + SourceIndex(2)
2 >Emitted(25, 34) Source(1, 34) + SourceIndex(2)
---
>>>/// <reference path='ref/m2.ts'/>
1->
@@ -332,8 +326,8 @@ sourceFile:../test.ts
1->
>
2 >/// <reference path='ref/m2.ts'/>
1->Emitted(12, 1) Source(2, 1) + SourceIndex(1)
2 >Emitted(12, 34) Source(2, 34) + SourceIndex(1)
1->Emitted(26, 1) Source(2, 1) + SourceIndex(2)
2 >Emitted(26, 34) Source(2, 34) + SourceIndex(2)
---
>>>var a1 = 10;
1 >
@@ -350,25 +344,25 @@ sourceFile:../test.ts
4 > =
5 > 10
6 > ;
1 >Emitted(13, 1) Source(3, 1) + SourceIndex(1)
2 >Emitted(13, 5) Source(3, 5) + SourceIndex(1)
3 >Emitted(13, 7) Source(3, 7) + SourceIndex(1)
4 >Emitted(13, 10) Source(3, 10) + SourceIndex(1)
5 >Emitted(13, 12) Source(3, 12) + SourceIndex(1)
6 >Emitted(13, 13) Source(3, 13) + SourceIndex(1)
1 >Emitted(27, 1) Source(3, 1) + SourceIndex(2)
2 >Emitted(27, 5) Source(3, 5) + SourceIndex(2)
3 >Emitted(27, 7) Source(3, 7) + SourceIndex(2)
4 >Emitted(27, 10) Source(3, 10) + SourceIndex(2)
5 >Emitted(27, 12) Source(3, 12) + SourceIndex(2)
6 >Emitted(27, 13) Source(3, 13) + SourceIndex(2)
---
>>>var c1 = (function () {
1->
2 >^^^^^^^^^^^^^^^^^^^^->
1->
>
1->Emitted(14, 1) Source(4, 1) + SourceIndex(1)
1->Emitted(28, 1) Source(4, 1) + SourceIndex(2)
---
>>> function c1() {
1->^^^^
2 > ^^->
1->
1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1)
1->Emitted(29, 5) Source(4, 1) + SourceIndex(2) name (c1)
---
>>> }
1->^^^^
@@ -378,16 +372,16 @@ sourceFile:../test.ts
> public p1: number;
>
2 > }
1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor)
2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor)
1->Emitted(30, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor)
2 >Emitted(30, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor)
---
>>> return c1;
1->^^^^
2 > ^^^^^^^^^
1->
2 > }
1->Emitted(17, 5) Source(6, 1) + SourceIndex(1) name (c1)
2 >Emitted(17, 14) Source(6, 2) + SourceIndex(1) name (c1)
1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) name (c1)
2 >Emitted(31, 14) Source(6, 2) + SourceIndex(2) name (c1)
---
>>>})();
1 >
@@ -401,10 +395,10 @@ sourceFile:../test.ts
4 > class c1 {
> public p1: number;
> }
1 >Emitted(18, 1) Source(6, 1) + SourceIndex(1) name (c1)
2 >Emitted(18, 2) Source(6, 2) + SourceIndex(1) name (c1)
3 >Emitted(18, 2) Source(4, 1) + SourceIndex(1)
4 >Emitted(18, 6) Source(6, 2) + SourceIndex(1)
1 >Emitted(32, 1) Source(6, 1) + SourceIndex(2) name (c1)
2 >Emitted(32, 2) Source(6, 2) + SourceIndex(2) name (c1)
3 >Emitted(32, 2) Source(4, 1) + SourceIndex(2)
4 >Emitted(32, 6) Source(6, 2) + SourceIndex(2)
---
>>>var instance1 = new c1();
1->
@@ -425,21 +419,21 @@ sourceFile:../test.ts
6 > c1
7 > ()
8 > ;
1->Emitted(19, 1) Source(8, 1) + SourceIndex(1)
2 >Emitted(19, 5) Source(8, 5) + SourceIndex(1)
3 >Emitted(19, 14) Source(8, 14) + SourceIndex(1)
4 >Emitted(19, 17) Source(8, 17) + SourceIndex(1)
5 >Emitted(19, 21) Source(8, 21) + SourceIndex(1)
6 >Emitted(19, 23) Source(8, 23) + SourceIndex(1)
7 >Emitted(19, 25) Source(8, 25) + SourceIndex(1)
8 >Emitted(19, 26) Source(8, 26) + SourceIndex(1)
1->Emitted(33, 1) Source(8, 1) + SourceIndex(2)
2 >Emitted(33, 5) Source(8, 5) + SourceIndex(2)
3 >Emitted(33, 14) Source(8, 14) + SourceIndex(2)
4 >Emitted(33, 17) Source(8, 17) + SourceIndex(2)
5 >Emitted(33, 21) Source(8, 21) + SourceIndex(2)
6 >Emitted(33, 23) Source(8, 23) + SourceIndex(2)
7 >Emitted(33, 25) Source(8, 25) + SourceIndex(2)
8 >Emitted(33, 26) Source(8, 26) + SourceIndex(2)
---
>>>function f1() {
1 >
2 >^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1)
1 >Emitted(34, 1) Source(9, 1) + SourceIndex(2)
---
>>> return instance1;
1->^^^^
@@ -453,11 +447,11 @@ sourceFile:../test.ts
3 >
4 > instance1
5 > ;
1->Emitted(21, 5) Source(10, 5) + SourceIndex(1) name (f1)
2 >Emitted(21, 11) Source(10, 11) + SourceIndex(1) name (f1)
3 >Emitted(21, 12) Source(10, 12) + SourceIndex(1) name (f1)
4 >Emitted(21, 21) Source(10, 21) + SourceIndex(1) name (f1)
5 >Emitted(21, 22) Source(10, 22) + SourceIndex(1) name (f1)
1->Emitted(35, 5) Source(10, 5) + SourceIndex(2) name (f1)
2 >Emitted(35, 11) Source(10, 11) + SourceIndex(2) name (f1)
3 >Emitted(35, 12) Source(10, 12) + SourceIndex(2) name (f1)
4 >Emitted(35, 21) Source(10, 21) + SourceIndex(2) name (f1)
5 >Emitted(35, 22) Source(10, 22) + SourceIndex(2) name (f1)
---
>>>}
1 >
@@ -466,7 +460,7 @@ sourceFile:../test.ts
1 >
>
2 >}
1 >Emitted(22, 1) Source(11, 1) + SourceIndex(1) name (f1)
2 >Emitted(22, 2) Source(11, 2) + SourceIndex(1) name (f1)
1 >Emitted(36, 1) Source(11, 1) + SourceIndex(2) name (f1)
2 >Emitted(36, 2) Source(11, 2) + SourceIndex(2) name (f1)
---
>>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/test.js.map
@@ -1,6 +0,0 @@
export declare var m2_a1: number;
export declare class m2_c1 {
m2_c1_p1: number;
}
export declare var m2_instance1: m2_c1;
export declare function m2_f1(): m2_c1;
@@ -1,15 +0,0 @@
define(["require", "exports"], function (require, exports) {
exports.m2_a1 = 10;
var m2_c1 = (function () {
function m2_c1() {
}
return m2_c1;
})();
exports.m2_c1 = m2_c1;
exports.m2_instance1 = new m2_c1();
function m2_f1() {
return exports.m2_instance1;
}
exports.m2_f1 = m2_f1;
});
//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map
@@ -1 +0,0 @@
{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"}
@@ -1,10 +1,17 @@
/// <reference path="../ref/m2.d.ts" />
declare var m1_a1: number;
declare class m1_c1 {
m1_c1_p1: number;
}
declare var m1_instance1: m1_c1;
declare function m1_f1(): m1_c1;
declare module "ref/m2" {
export var m2_a1: number;
export class m2_c1 {
m2_c1_p1: number;
}
export var m2_instance1: m2_c1;
export function m2_f1(): m2_c1;
}
declare var a1: number;
declare class c1 {
p1: number;
@@ -1 +1 @@
{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"}
{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"}
@@ -0,0 +1,36 @@
error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile.
!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile.
==== m1.ts (0 errors) ====
var m1_a1 = 10;
class m1_c1 {
public m1_c1_p1: number;
}
var m1_instance1 = new m1_c1();
function m1_f1() {
return m1_instance1;
}
==== m2.ts (0 errors) ====
export var m2_a1 = 10;
export class m2_c1 {
public m2_c1_p1: number;
}
export var m2_instance1 = new m2_c1();
export function m2_f1() {
return m2_instance1;
}
==== test.ts (0 errors) ====
/// <reference path='ref/m1.ts'/>
/// <reference path='ref/m2.ts'/>
var a1 = 10;
class c1 {
public p1: number;
}
var instance1 = new c1();
function f1() {
return instance1;
}
@@ -17,9 +17,6 @@
"test.ts"
],
"emittedFiles": [
"ref/m2.js.map",
"ref/m2.js",
"ref/m2.d.ts",
"bin/test.js.map",
"bin/test.js",
"bin/test.d.ts"
@@ -1,179 +1,8 @@
===================================================================
JsFile: m2.js
mapUrl: /tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map
sourceRoot:
sources: ../../ref/m2.ts
===================================================================
-------------------------------------------------------------------
emittedFile:ref/m2.js
sourceFile:../../ref/m2.ts
-------------------------------------------------------------------
>>>exports.m2_a1 = 10;
1 >
2 >^^^^^^^^^^^^^
3 > ^^^
4 > ^^
5 > ^
6 > ^^^^^^^^->
1 >export var
2 >m2_a1
3 > =
4 > 10
5 > ;
1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0)
2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0)
3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0)
4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0)
5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0)
---
>>>var m2_c1 = (function () {
1->
2 >^^^^^^^^^^^^^^^^^^^^^^^->
1->
>
1->Emitted(2, 1) Source(2, 1) + SourceIndex(0)
---
>>> function m2_c1() {
1->^^^^
2 > ^^->
1->
1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1)
---
>>> }
1->^^^^
2 > ^
3 > ^^^^^^^^^^^^^->
1->export class m2_c1 {
> public m2_c1_p1: number;
>
2 > }
1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor)
2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor)
---
>>> return m2_c1;
1->^^^^
2 > ^^^^^^^^^^^^
1->
2 > }
1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1)
2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1)
---
>>>})();
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^->
1 >
2 >}
3 >
4 > export class m2_c1 {
> public m2_c1_p1: number;
> }
1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1)
2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1)
3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0)
4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0)
---
>>>exports.m2_c1 = m2_c1;
1->
2 >^^^^^^^^^^^^^
3 > ^^^^^^^^
4 > ^
5 > ^^^^^^^^^^^^^^->
1->
2 >m2_c1
3 > {
> public m2_c1_p1: number;
> }
4 >
1->Emitted(7, 1) Source(2, 14) + SourceIndex(0)
2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0)
3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0)
4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0)
---
>>>exports.m2_instance1 = new m2_c1();
1->
2 >^^^^^^^^^^^^^^^^^^^^
3 > ^^^
4 > ^^^^
5 > ^^^^^
6 > ^^
7 > ^
1->
>
>export var
2 >m2_instance1
3 > =
4 > new
5 > m2_c1
6 > ()
7 > ;
1->Emitted(8, 1) Source(6, 12) + SourceIndex(0)
2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0)
3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0)
4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0)
5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0)
6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0)
7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0)
---
>>>function m2_f1() {
1 >
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0)
---
>>> return exports.m2_instance1;
1->^^^^
2 > ^^^^^^
3 > ^
4 > ^^^^^^^^^^^^^^^^^^^^
5 > ^
1->export function m2_f1() {
>
2 > return
3 >
4 > m2_instance1
5 > ;
1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1)
2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1)
3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1)
4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1)
5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1)
---
>>>}
1 >
2 >^
3 > ^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
2 >}
1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1)
2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1)
---
>>>exports.m2_f1 = m2_f1;
1->
2 >^^^^^^^^^^^^^
3 > ^^^^^^^^
4 > ^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1->
2 >m2_f1
3 > () {
> return m2_instance1;
> }
4 >
1->Emitted(12, 1) Source(7, 17) + SourceIndex(0)
2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0)
3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0)
4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0)
---
>>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map===================================================================
JsFile: test.js
mapUrl: /tests/cases/projects/outputdir_mixed_subfolder/mapFiles/test.js.map
sourceRoot:
sources: ../ref/m1.ts,../test.ts
sources: ../ref/m1.ts,../ref/m2.ts,../test.ts
===================================================================
-------------------------------------------------------------------
emittedFile:bin/test.js
@@ -322,8 +151,8 @@ sourceFile:../test.ts
3 > ^->
1->
2 >/// <reference path='ref/m1.ts'/>
1->Emitted(11, 1) Source(1, 1) + SourceIndex(1)
2 >Emitted(11, 34) Source(1, 34) + SourceIndex(1)
1->Emitted(11, 1) Source(1, 1) + SourceIndex(2)
2 >Emitted(11, 34) Source(1, 34) + SourceIndex(2)
---
>>>/// <reference path='ref/m2.ts'/>
1->
@@ -331,8 +160,8 @@ sourceFile:../test.ts
1->
>
2 >/// <reference path='ref/m2.ts'/>
1->Emitted(12, 1) Source(2, 1) + SourceIndex(1)
2 >Emitted(12, 34) Source(2, 34) + SourceIndex(1)
1->Emitted(12, 1) Source(2, 1) + SourceIndex(2)
2 >Emitted(12, 34) Source(2, 34) + SourceIndex(2)
---
>>>var a1 = 10;
1 >
@@ -349,25 +178,25 @@ sourceFile:../test.ts
4 > =
5 > 10
6 > ;
1 >Emitted(13, 1) Source(3, 1) + SourceIndex(1)
2 >Emitted(13, 5) Source(3, 5) + SourceIndex(1)
3 >Emitted(13, 7) Source(3, 7) + SourceIndex(1)
4 >Emitted(13, 10) Source(3, 10) + SourceIndex(1)
5 >Emitted(13, 12) Source(3, 12) + SourceIndex(1)
6 >Emitted(13, 13) Source(3, 13) + SourceIndex(1)
1 >Emitted(13, 1) Source(3, 1) + SourceIndex(2)
2 >Emitted(13, 5) Source(3, 5) + SourceIndex(2)
3 >Emitted(13, 7) Source(3, 7) + SourceIndex(2)
4 >Emitted(13, 10) Source(3, 10) + SourceIndex(2)
5 >Emitted(13, 12) Source(3, 12) + SourceIndex(2)
6 >Emitted(13, 13) Source(3, 13) + SourceIndex(2)
---
>>>var c1 = (function () {
1->
2 >^^^^^^^^^^^^^^^^^^^^->
1->
>
1->Emitted(14, 1) Source(4, 1) + SourceIndex(1)
1->Emitted(14, 1) Source(4, 1) + SourceIndex(2)
---
>>> function c1() {
1->^^^^
2 > ^^->
1->
1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1)
1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) name (c1)
---
>>> }
1->^^^^
@@ -377,16 +206,16 @@ sourceFile:../test.ts
> public p1: number;
>
2 > }
1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor)
2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor)
1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor)
2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor)
---
>>> return c1;
1->^^^^
2 > ^^^^^^^^^
1->
2 > }
1->Emitted(17, 5) Source(6, 1) + SourceIndex(1) name (c1)
2 >Emitted(17, 14) Source(6, 2) + SourceIndex(1) name (c1)
1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) name (c1)
2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) name (c1)
---
>>>})();
1 >
@@ -400,10 +229,10 @@ sourceFile:../test.ts
4 > class c1 {
> public p1: number;
> }
1 >Emitted(18, 1) Source(6, 1) + SourceIndex(1) name (c1)
2 >Emitted(18, 2) Source(6, 2) + SourceIndex(1) name (c1)
3 >Emitted(18, 2) Source(4, 1) + SourceIndex(1)
4 >Emitted(18, 6) Source(6, 2) + SourceIndex(1)
1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) name (c1)
2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) name (c1)
3 >Emitted(18, 2) Source(4, 1) + SourceIndex(2)
4 >Emitted(18, 6) Source(6, 2) + SourceIndex(2)
---
>>>var instance1 = new c1();
1->
@@ -424,21 +253,21 @@ sourceFile:../test.ts
6 > c1
7 > ()
8 > ;
1->Emitted(19, 1) Source(8, 1) + SourceIndex(1)
2 >Emitted(19, 5) Source(8, 5) + SourceIndex(1)
3 >Emitted(19, 14) Source(8, 14) + SourceIndex(1)
4 >Emitted(19, 17) Source(8, 17) + SourceIndex(1)
5 >Emitted(19, 21) Source(8, 21) + SourceIndex(1)
6 >Emitted(19, 23) Source(8, 23) + SourceIndex(1)
7 >Emitted(19, 25) Source(8, 25) + SourceIndex(1)
8 >Emitted(19, 26) Source(8, 26) + SourceIndex(1)
1->Emitted(19, 1) Source(8, 1) + SourceIndex(2)
2 >Emitted(19, 5) Source(8, 5) + SourceIndex(2)
3 >Emitted(19, 14) Source(8, 14) + SourceIndex(2)
4 >Emitted(19, 17) Source(8, 17) + SourceIndex(2)
5 >Emitted(19, 21) Source(8, 21) + SourceIndex(2)
6 >Emitted(19, 23) Source(8, 23) + SourceIndex(2)
7 >Emitted(19, 25) Source(8, 25) + SourceIndex(2)
8 >Emitted(19, 26) Source(8, 26) + SourceIndex(2)
---
>>>function f1() {
1 >
2 >^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1)
1 >Emitted(20, 1) Source(9, 1) + SourceIndex(2)
---
>>> return instance1;
1->^^^^
@@ -452,11 +281,11 @@ sourceFile:../test.ts
3 >
4 > instance1
5 > ;
1->Emitted(21, 5) Source(10, 5) + SourceIndex(1) name (f1)
2 >Emitted(21, 11) Source(10, 11) + SourceIndex(1) name (f1)
3 >Emitted(21, 12) Source(10, 12) + SourceIndex(1) name (f1)
4 >Emitted(21, 21) Source(10, 21) + SourceIndex(1) name (f1)
5 >Emitted(21, 22) Source(10, 22) + SourceIndex(1) name (f1)
1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) name (f1)
2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) name (f1)
3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) name (f1)
4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) name (f1)
5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) name (f1)
---
>>>}
1 >
@@ -465,7 +294,7 @@ sourceFile:../test.ts
1 >
>
2 >}
1 >Emitted(22, 1) Source(11, 1) + SourceIndex(1) name (f1)
2 >Emitted(22, 2) Source(11, 2) + SourceIndex(1) name (f1)
1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) name (f1)
2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) name (f1)
---
>>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/test.js.map
@@ -1,6 +0,0 @@
export declare var m2_a1: number;
export declare class m2_c1 {
m2_c1_p1: number;
}
export declare var m2_instance1: m2_c1;
export declare function m2_f1(): m2_c1;
@@ -1,13 +0,0 @@
exports.m2_a1 = 10;
var m2_c1 = (function () {
function m2_c1() {
}
return m2_c1;
})();
exports.m2_c1 = m2_c1;
exports.m2_instance1 = new m2_c1();
function m2_f1() {
return exports.m2_instance1;
}
exports.m2_f1 = m2_f1;
//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map
@@ -1 +0,0 @@
{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"}
@@ -1,10 +1,17 @@
/// <reference path="../outdir/outAndOutDirFolder/ref/m2.d.ts" />
declare var m1_a1: number;
declare class m1_c1 {
m1_c1_p1: number;
}
declare var m1_instance1: m1_c1;
declare function m1_f1(): m1_c1;
declare module "ref/m2" {
export var m2_a1: number;
export class m2_c1 {
m2_c1_p1: number;
}
export var m2_instance1: m2_c1;
export function m2_f1(): m2_c1;
}
declare var a1: number;
declare class c1 {
p1: number;
@@ -8,6 +8,20 @@ var m1_instance1 = new m1_c1();
function m1_f1() {
return m1_instance1;
}
define("ref/m2", ["require", "exports"], function (require, exports) {
exports.m2_a1 = 10;
var m2_c1 = (function () {
function m2_c1() {
}
return m2_c1;
})();
exports.m2_c1 = m2_c1;
exports.m2_instance1 = new m2_c1();
function m2_f1() {
return exports.m2_instance1;
}
exports.m2_f1 = m2_f1;
});
/// <reference path='ref/m1.ts'/>
/// <reference path='ref/m2.ts'/>
var a1 = 10;
@@ -1 +1 @@
{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"}
{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"}
@@ -18,9 +18,6 @@
"test.ts"
],
"emittedFiles": [
"outdir/outAndOutDirFolder/ref/m2.js.map",
"outdir/outAndOutDirFolder/ref/m2.js",
"outdir/outAndOutDirFolder/ref/m2.d.ts",
"bin/outAndOutDirFile.js.map",
"bin/outAndOutDirFile.js",
"bin/outAndOutDirFile.d.ts"
@@ -1,180 +1,8 @@
===================================================================
JsFile: m2.js
mapUrl: /tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map
sourceRoot:
sources: ../../ref/m2.ts
===================================================================
-------------------------------------------------------------------
emittedFile:outdir/outAndOutDirFolder/ref/m2.js
sourceFile:../../ref/m2.ts
-------------------------------------------------------------------
>>>define(["require", "exports"], function (require, exports) {
>>> exports.m2_a1 = 10;
1 >^^^^
2 > ^^^^^^^^^^^^^
3 > ^^^
4 > ^^
5 > ^
6 > ^^^^^^^^->
1 >export var
2 > m2_a1
3 > =
4 > 10
5 > ;
1 >Emitted(2, 5) Source(1, 12) + SourceIndex(0)
2 >Emitted(2, 18) Source(1, 17) + SourceIndex(0)
3 >Emitted(2, 21) Source(1, 20) + SourceIndex(0)
4 >Emitted(2, 23) Source(1, 22) + SourceIndex(0)
5 >Emitted(2, 24) Source(1, 23) + SourceIndex(0)
---
>>> var m2_c1 = (function () {
1->^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^->
1->
>
1->Emitted(3, 5) Source(2, 1) + SourceIndex(0)
---
>>> function m2_c1() {
1->^^^^^^^^
2 > ^^->
1->
1->Emitted(4, 9) Source(2, 1) + SourceIndex(0) name (m2_c1)
---
>>> }
1->^^^^^^^^
2 > ^
3 > ^^^^^^^^^^^^^->
1->export class m2_c1 {
> public m2_c1_p1: number;
>
2 > }
1->Emitted(5, 9) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor)
2 >Emitted(5, 10) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor)
---
>>> return m2_c1;
1->^^^^^^^^
2 > ^^^^^^^^^^^^
1->
2 > }
1->Emitted(6, 9) Source(4, 1) + SourceIndex(0) name (m2_c1)
2 >Emitted(6, 21) Source(4, 2) + SourceIndex(0) name (m2_c1)
---
>>> })();
1 >^^^^
2 > ^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^->
1 >
2 > }
3 >
4 > export class m2_c1 {
> public m2_c1_p1: number;
> }
1 >Emitted(7, 5) Source(4, 1) + SourceIndex(0) name (m2_c1)
2 >Emitted(7, 6) Source(4, 2) + SourceIndex(0) name (m2_c1)
3 >Emitted(7, 6) Source(2, 1) + SourceIndex(0)
4 >Emitted(7, 10) Source(4, 2) + SourceIndex(0)
---
>>> exports.m2_c1 = m2_c1;
1->^^^^
2 > ^^^^^^^^^^^^^
3 > ^^^^^^^^
4 > ^
5 > ^^^^^^^^^^^^^^->
1->
2 > m2_c1
3 > {
> public m2_c1_p1: number;
> }
4 >
1->Emitted(8, 5) Source(2, 14) + SourceIndex(0)
2 >Emitted(8, 18) Source(2, 19) + SourceIndex(0)
3 >Emitted(8, 26) Source(4, 2) + SourceIndex(0)
4 >Emitted(8, 27) Source(4, 2) + SourceIndex(0)
---
>>> exports.m2_instance1 = new m2_c1();
1->^^^^
2 > ^^^^^^^^^^^^^^^^^^^^
3 > ^^^
4 > ^^^^
5 > ^^^^^
6 > ^^
7 > ^
1->
>
>export var
2 > m2_instance1
3 > =
4 > new
5 > m2_c1
6 > ()
7 > ;
1->Emitted(9, 5) Source(6, 12) + SourceIndex(0)
2 >Emitted(9, 25) Source(6, 24) + SourceIndex(0)
3 >Emitted(9, 28) Source(6, 27) + SourceIndex(0)
4 >Emitted(9, 32) Source(6, 31) + SourceIndex(0)
5 >Emitted(9, 37) Source(6, 36) + SourceIndex(0)
6 >Emitted(9, 39) Source(6, 38) + SourceIndex(0)
7 >Emitted(9, 40) Source(6, 39) + SourceIndex(0)
---
>>> function m2_f1() {
1 >^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
1 >Emitted(10, 5) Source(7, 1) + SourceIndex(0)
---
>>> return exports.m2_instance1;
1->^^^^^^^^
2 > ^^^^^^
3 > ^
4 > ^^^^^^^^^^^^^^^^^^^^
5 > ^
1->export function m2_f1() {
>
2 > return
3 >
4 > m2_instance1
5 > ;
1->Emitted(11, 9) Source(8, 5) + SourceIndex(0) name (m2_f1)
2 >Emitted(11, 15) Source(8, 11) + SourceIndex(0) name (m2_f1)
3 >Emitted(11, 16) Source(8, 12) + SourceIndex(0) name (m2_f1)
4 >Emitted(11, 36) Source(8, 24) + SourceIndex(0) name (m2_f1)
5 >Emitted(11, 37) Source(8, 25) + SourceIndex(0) name (m2_f1)
---
>>> }
1 >^^^^
2 > ^
3 > ^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
2 > }
1 >Emitted(12, 5) Source(9, 1) + SourceIndex(0) name (m2_f1)
2 >Emitted(12, 6) Source(9, 2) + SourceIndex(0) name (m2_f1)
---
>>> exports.m2_f1 = m2_f1;
1->^^^^
2 > ^^^^^^^^^^^^^
3 > ^^^^^^^^
4 > ^
1->
2 > m2_f1
3 > () {
> return m2_instance1;
> }
4 >
1->Emitted(13, 5) Source(7, 17) + SourceIndex(0)
2 >Emitted(13, 18) Source(7, 22) + SourceIndex(0)
3 >Emitted(13, 26) Source(9, 2) + SourceIndex(0)
4 >Emitted(13, 27) Source(9, 2) + SourceIndex(0)
---
>>>});
>>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map===================================================================
JsFile: outAndOutDirFile.js
mapUrl: /tests/cases/projects/outputdir_mixed_subfolder/mapFiles/outAndOutDirFile.js.map
sourceRoot:
sources: ../ref/m1.ts,../test.ts
sources: ../ref/m1.ts,../ref/m2.ts,../test.ts
===================================================================
-------------------------------------------------------------------
emittedFile:bin/outAndOutDirFile.js
@@ -306,7 +134,7 @@ sourceFile:../ref/m1.ts
>>>}
1 >
2 >^
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
2 >}
@@ -315,16 +143,182 @@ sourceFile:../ref/m1.ts
---
-------------------------------------------------------------------
emittedFile:bin/outAndOutDirFile.js
sourceFile:../ref/m2.ts
-------------------------------------------------------------------
>>>define("ref/m2", ["require", "exports"], function (require, exports) {
>>> exports.m2_a1 = 10;
1->^^^^
2 > ^^^^^^^^^^^^^
3 > ^^^
4 > ^^
5 > ^
6 > ^^^^^^^^->
1->export var
2 > m2_a1
3 > =
4 > 10
5 > ;
1->Emitted(12, 5) Source(1, 12) + SourceIndex(1)
2 >Emitted(12, 18) Source(1, 17) + SourceIndex(1)
3 >Emitted(12, 21) Source(1, 20) + SourceIndex(1)
4 >Emitted(12, 23) Source(1, 22) + SourceIndex(1)
5 >Emitted(12, 24) Source(1, 23) + SourceIndex(1)
---
>>> var m2_c1 = (function () {
1->^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^->
1->
>
1->Emitted(13, 5) Source(2, 1) + SourceIndex(1)
---
>>> function m2_c1() {
1->^^^^^^^^
2 > ^^->
1->
1->Emitted(14, 9) Source(2, 1) + SourceIndex(1) name (m2_c1)
---
>>> }
1->^^^^^^^^
2 > ^
3 > ^^^^^^^^^^^^^->
1->export class m2_c1 {
> public m2_c1_p1: number;
>
2 > }
1->Emitted(15, 9) Source(4, 1) + SourceIndex(1) name (m2_c1.constructor)
2 >Emitted(15, 10) Source(4, 2) + SourceIndex(1) name (m2_c1.constructor)
---
>>> return m2_c1;
1->^^^^^^^^
2 > ^^^^^^^^^^^^
1->
2 > }
1->Emitted(16, 9) Source(4, 1) + SourceIndex(1) name (m2_c1)
2 >Emitted(16, 21) Source(4, 2) + SourceIndex(1) name (m2_c1)
---
>>> })();
1 >^^^^
2 > ^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^->
1 >
2 > }
3 >
4 > export class m2_c1 {
> public m2_c1_p1: number;
> }
1 >Emitted(17, 5) Source(4, 1) + SourceIndex(1) name (m2_c1)
2 >Emitted(17, 6) Source(4, 2) + SourceIndex(1) name (m2_c1)
3 >Emitted(17, 6) Source(2, 1) + SourceIndex(1)
4 >Emitted(17, 10) Source(4, 2) + SourceIndex(1)
---
>>> exports.m2_c1 = m2_c1;
1->^^^^
2 > ^^^^^^^^^^^^^
3 > ^^^^^^^^
4 > ^
5 > ^^^^^^^^^^^^^^->
1->
2 > m2_c1
3 > {
> public m2_c1_p1: number;
> }
4 >
1->Emitted(18, 5) Source(2, 14) + SourceIndex(1)
2 >Emitted(18, 18) Source(2, 19) + SourceIndex(1)
3 >Emitted(18, 26) Source(4, 2) + SourceIndex(1)
4 >Emitted(18, 27) Source(4, 2) + SourceIndex(1)
---
>>> exports.m2_instance1 = new m2_c1();
1->^^^^
2 > ^^^^^^^^^^^^^^^^^^^^
3 > ^^^
4 > ^^^^
5 > ^^^^^
6 > ^^
7 > ^
1->
>
>export var
2 > m2_instance1
3 > =
4 > new
5 > m2_c1
6 > ()
7 > ;
1->Emitted(19, 5) Source(6, 12) + SourceIndex(1)
2 >Emitted(19, 25) Source(6, 24) + SourceIndex(1)
3 >Emitted(19, 28) Source(6, 27) + SourceIndex(1)
4 >Emitted(19, 32) Source(6, 31) + SourceIndex(1)
5 >Emitted(19, 37) Source(6, 36) + SourceIndex(1)
6 >Emitted(19, 39) Source(6, 38) + SourceIndex(1)
7 >Emitted(19, 40) Source(6, 39) + SourceIndex(1)
---
>>> function m2_f1() {
1 >^^^^
2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
1 >Emitted(20, 5) Source(7, 1) + SourceIndex(1)
---
>>> return exports.m2_instance1;
1->^^^^^^^^
2 > ^^^^^^
3 > ^
4 > ^^^^^^^^^^^^^^^^^^^^
5 > ^
1->export function m2_f1() {
>
2 > return
3 >
4 > m2_instance1
5 > ;
1->Emitted(21, 9) Source(8, 5) + SourceIndex(1) name (m2_f1)
2 >Emitted(21, 15) Source(8, 11) + SourceIndex(1) name (m2_f1)
3 >Emitted(21, 16) Source(8, 12) + SourceIndex(1) name (m2_f1)
4 >Emitted(21, 36) Source(8, 24) + SourceIndex(1) name (m2_f1)
5 >Emitted(21, 37) Source(8, 25) + SourceIndex(1) name (m2_f1)
---
>>> }
1 >^^^^
2 > ^
3 > ^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
2 > }
1 >Emitted(22, 5) Source(9, 1) + SourceIndex(1) name (m2_f1)
2 >Emitted(22, 6) Source(9, 2) + SourceIndex(1) name (m2_f1)
---
>>> exports.m2_f1 = m2_f1;
1->^^^^
2 > ^^^^^^^^^^^^^
3 > ^^^^^^^^
4 > ^
1->
2 > m2_f1
3 > () {
> return m2_instance1;
> }
4 >
1->Emitted(23, 5) Source(7, 17) + SourceIndex(1)
2 >Emitted(23, 18) Source(7, 22) + SourceIndex(1)
3 >Emitted(23, 26) Source(9, 2) + SourceIndex(1)
4 >Emitted(23, 27) Source(9, 2) + SourceIndex(1)
---
-------------------------------------------------------------------
emittedFile:bin/outAndOutDirFile.js
sourceFile:../test.ts
-------------------------------------------------------------------
>>>});
>>>/// <reference path='ref/m1.ts'/>
1->
1 >
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 > ^->
1->
1 >
2 >/// <reference path='ref/m1.ts'/>
1->Emitted(11, 1) Source(1, 1) + SourceIndex(1)
2 >Emitted(11, 34) Source(1, 34) + SourceIndex(1)
1 >Emitted(25, 1) Source(1, 1) + SourceIndex(2)
2 >Emitted(25, 34) Source(1, 34) + SourceIndex(2)
---
>>>/// <reference path='ref/m2.ts'/>
1->
@@ -332,8 +326,8 @@ sourceFile:../test.ts
1->
>
2 >/// <reference path='ref/m2.ts'/>
1->Emitted(12, 1) Source(2, 1) + SourceIndex(1)
2 >Emitted(12, 34) Source(2, 34) + SourceIndex(1)
1->Emitted(26, 1) Source(2, 1) + SourceIndex(2)
2 >Emitted(26, 34) Source(2, 34) + SourceIndex(2)
---
>>>var a1 = 10;
1 >
@@ -350,25 +344,25 @@ sourceFile:../test.ts
4 > =
5 > 10
6 > ;
1 >Emitted(13, 1) Source(3, 1) + SourceIndex(1)
2 >Emitted(13, 5) Source(3, 5) + SourceIndex(1)
3 >Emitted(13, 7) Source(3, 7) + SourceIndex(1)
4 >Emitted(13, 10) Source(3, 10) + SourceIndex(1)
5 >Emitted(13, 12) Source(3, 12) + SourceIndex(1)
6 >Emitted(13, 13) Source(3, 13) + SourceIndex(1)
1 >Emitted(27, 1) Source(3, 1) + SourceIndex(2)
2 >Emitted(27, 5) Source(3, 5) + SourceIndex(2)
3 >Emitted(27, 7) Source(3, 7) + SourceIndex(2)
4 >Emitted(27, 10) Source(3, 10) + SourceIndex(2)
5 >Emitted(27, 12) Source(3, 12) + SourceIndex(2)
6 >Emitted(27, 13) Source(3, 13) + SourceIndex(2)
---
>>>var c1 = (function () {
1->
2 >^^^^^^^^^^^^^^^^^^^^->
1->
>
1->Emitted(14, 1) Source(4, 1) + SourceIndex(1)
1->Emitted(28, 1) Source(4, 1) + SourceIndex(2)
---
>>> function c1() {
1->^^^^
2 > ^^->
1->
1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1)
1->Emitted(29, 5) Source(4, 1) + SourceIndex(2) name (c1)
---
>>> }
1->^^^^
@@ -378,16 +372,16 @@ sourceFile:../test.ts
> public p1: number;
>
2 > }
1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor)
2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor)
1->Emitted(30, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor)
2 >Emitted(30, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor)
---
>>> return c1;
1->^^^^
2 > ^^^^^^^^^
1->
2 > }
1->Emitted(17, 5) Source(6, 1) + SourceIndex(1) name (c1)
2 >Emitted(17, 14) Source(6, 2) + SourceIndex(1) name (c1)
1->Emitted(31, 5) Source(6, 1) + SourceIndex(2) name (c1)
2 >Emitted(31, 14) Source(6, 2) + SourceIndex(2) name (c1)
---
>>>})();
1 >
@@ -401,10 +395,10 @@ sourceFile:../test.ts
4 > class c1 {
> public p1: number;
> }
1 >Emitted(18, 1) Source(6, 1) + SourceIndex(1) name (c1)
2 >Emitted(18, 2) Source(6, 2) + SourceIndex(1) name (c1)
3 >Emitted(18, 2) Source(4, 1) + SourceIndex(1)
4 >Emitted(18, 6) Source(6, 2) + SourceIndex(1)
1 >Emitted(32, 1) Source(6, 1) + SourceIndex(2) name (c1)
2 >Emitted(32, 2) Source(6, 2) + SourceIndex(2) name (c1)
3 >Emitted(32, 2) Source(4, 1) + SourceIndex(2)
4 >Emitted(32, 6) Source(6, 2) + SourceIndex(2)
---
>>>var instance1 = new c1();
1->
@@ -425,21 +419,21 @@ sourceFile:../test.ts
6 > c1
7 > ()
8 > ;
1->Emitted(19, 1) Source(8, 1) + SourceIndex(1)
2 >Emitted(19, 5) Source(8, 5) + SourceIndex(1)
3 >Emitted(19, 14) Source(8, 14) + SourceIndex(1)
4 >Emitted(19, 17) Source(8, 17) + SourceIndex(1)
5 >Emitted(19, 21) Source(8, 21) + SourceIndex(1)
6 >Emitted(19, 23) Source(8, 23) + SourceIndex(1)
7 >Emitted(19, 25) Source(8, 25) + SourceIndex(1)
8 >Emitted(19, 26) Source(8, 26) + SourceIndex(1)
1->Emitted(33, 1) Source(8, 1) + SourceIndex(2)
2 >Emitted(33, 5) Source(8, 5) + SourceIndex(2)
3 >Emitted(33, 14) Source(8, 14) + SourceIndex(2)
4 >Emitted(33, 17) Source(8, 17) + SourceIndex(2)
5 >Emitted(33, 21) Source(8, 21) + SourceIndex(2)
6 >Emitted(33, 23) Source(8, 23) + SourceIndex(2)
7 >Emitted(33, 25) Source(8, 25) + SourceIndex(2)
8 >Emitted(33, 26) Source(8, 26) + SourceIndex(2)
---
>>>function f1() {
1 >
2 >^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1)
1 >Emitted(34, 1) Source(9, 1) + SourceIndex(2)
---
>>> return instance1;
1->^^^^
@@ -453,11 +447,11 @@ sourceFile:../test.ts
3 >
4 > instance1
5 > ;
1->Emitted(21, 5) Source(10, 5) + SourceIndex(1) name (f1)
2 >Emitted(21, 11) Source(10, 11) + SourceIndex(1) name (f1)
3 >Emitted(21, 12) Source(10, 12) + SourceIndex(1) name (f1)
4 >Emitted(21, 21) Source(10, 21) + SourceIndex(1) name (f1)
5 >Emitted(21, 22) Source(10, 22) + SourceIndex(1) name (f1)
1->Emitted(35, 5) Source(10, 5) + SourceIndex(2) name (f1)
2 >Emitted(35, 11) Source(10, 11) + SourceIndex(2) name (f1)
3 >Emitted(35, 12) Source(10, 12) + SourceIndex(2) name (f1)
4 >Emitted(35, 21) Source(10, 21) + SourceIndex(2) name (f1)
5 >Emitted(35, 22) Source(10, 22) + SourceIndex(2) name (f1)
---
>>>}
1 >
@@ -466,7 +460,7 @@ sourceFile:../test.ts
1 >
>
2 >}
1 >Emitted(22, 1) Source(11, 1) + SourceIndex(1) name (f1)
2 >Emitted(22, 2) Source(11, 2) + SourceIndex(1) name (f1)
1 >Emitted(36, 1) Source(11, 1) + SourceIndex(2) name (f1)
2 >Emitted(36, 2) Source(11, 2) + SourceIndex(2) name (f1)
---
>>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/outAndOutDirFile.js.map
@@ -1,6 +0,0 @@
export declare var m2_a1: number;
export declare class m2_c1 {
m2_c1_p1: number;
}
export declare var m2_instance1: m2_c1;
export declare function m2_f1(): m2_c1;
@@ -1,15 +0,0 @@
define(["require", "exports"], function (require, exports) {
exports.m2_a1 = 10;
var m2_c1 = (function () {
function m2_c1() {
}
return m2_c1;
})();
exports.m2_c1 = m2_c1;
exports.m2_instance1 = new m2_c1();
function m2_f1() {
return exports.m2_instance1;
}
exports.m2_f1 = m2_f1;
});
//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map
@@ -1 +0,0 @@
{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"}
@@ -1,10 +1,17 @@
/// <reference path="../outdir/outAndOutDirFolder/ref/m2.d.ts" />
declare var m1_a1: number;
declare class m1_c1 {
m1_c1_p1: number;
}
declare var m1_instance1: m1_c1;
declare function m1_f1(): m1_c1;
declare module "ref/m2" {
export var m2_a1: number;
export class m2_c1 {
m2_c1_p1: number;
}
export var m2_instance1: m2_c1;
export function m2_f1(): m2_c1;
}
declare var a1: number;
declare class c1 {
p1: number;
@@ -1 +1 @@
{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;ACRD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"}
{"version":3,"file":"outAndOutDirFile.js","sourceRoot":"","sources":["../ref/m1.ts","../ref/m2.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","c1","c1.constructor","f1"],"mappings":"AAAA,IAAI,KAAK,GAAG,EAAE,CAAC;AACf;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,YAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AAC/B;IACIE,MAAMA,CAACA,YAAYA,CAACA;AACxBA,CAACA;AERD,iCAAiC;AACjC,iCAAiC;AACjC,IAAI,EAAE,GAAG,EAAE,CAAC;AACZ;IAAAC;IAEAC,CAACA;IAADD,SAACA;AAADA,CAACA,AAFD,IAEC;AAED,IAAI,SAAS,GAAG,IAAI,EAAE,EAAE,CAAC;AACzB;IACIE,MAAMA,CAACA,SAASA,CAACA;AACrBA,CAACA"}
@@ -0,0 +1,36 @@
error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile.
!!! error TS6082: Only 'amd' and 'system' modules are supported alongside --outFile.
==== m1.ts (0 errors) ====
var m1_a1 = 10;
class m1_c1 {
public m1_c1_p1: number;
}
var m1_instance1 = new m1_c1();
function m1_f1() {
return m1_instance1;
}
==== m2.ts (0 errors) ====
export var m2_a1 = 10;
export class m2_c1 {
public m2_c1_p1: number;
}
export var m2_instance1 = new m2_c1();
export function m2_f1() {
return m2_instance1;
}
==== test.ts (0 errors) ====
/// <reference path='ref/m1.ts'/>
/// <reference path='ref/m2.ts'/>
var a1 = 10;
class c1 {
public p1: number;
}
var instance1 = new c1();
function f1() {
return instance1;
}
@@ -18,9 +18,6 @@
"test.ts"
],
"emittedFiles": [
"outdir/outAndOutDirFolder/ref/m2.js.map",
"outdir/outAndOutDirFolder/ref/m2.js",
"outdir/outAndOutDirFolder/ref/m2.d.ts",
"bin/outAndOutDirFile.js.map",
"bin/outAndOutDirFile.js",
"bin/outAndOutDirFile.d.ts"
@@ -1,179 +1,8 @@
===================================================================
JsFile: m2.js
mapUrl: /tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map
sourceRoot:
sources: ../../ref/m2.ts
===================================================================
-------------------------------------------------------------------
emittedFile:outdir/outAndOutDirFolder/ref/m2.js
sourceFile:../../ref/m2.ts
-------------------------------------------------------------------
>>>exports.m2_a1 = 10;
1 >
2 >^^^^^^^^^^^^^
3 > ^^^
4 > ^^
5 > ^
6 > ^^^^^^^^->
1 >export var
2 >m2_a1
3 > =
4 > 10
5 > ;
1 >Emitted(1, 1) Source(1, 12) + SourceIndex(0)
2 >Emitted(1, 14) Source(1, 17) + SourceIndex(0)
3 >Emitted(1, 17) Source(1, 20) + SourceIndex(0)
4 >Emitted(1, 19) Source(1, 22) + SourceIndex(0)
5 >Emitted(1, 20) Source(1, 23) + SourceIndex(0)
---
>>>var m2_c1 = (function () {
1->
2 >^^^^^^^^^^^^^^^^^^^^^^^->
1->
>
1->Emitted(2, 1) Source(2, 1) + SourceIndex(0)
---
>>> function m2_c1() {
1->^^^^
2 > ^^->
1->
1->Emitted(3, 5) Source(2, 1) + SourceIndex(0) name (m2_c1)
---
>>> }
1->^^^^
2 > ^
3 > ^^^^^^^^^^^^^->
1->export class m2_c1 {
> public m2_c1_p1: number;
>
2 > }
1->Emitted(4, 5) Source(4, 1) + SourceIndex(0) name (m2_c1.constructor)
2 >Emitted(4, 6) Source(4, 2) + SourceIndex(0) name (m2_c1.constructor)
---
>>> return m2_c1;
1->^^^^
2 > ^^^^^^^^^^^^
1->
2 > }
1->Emitted(5, 5) Source(4, 1) + SourceIndex(0) name (m2_c1)
2 >Emitted(5, 17) Source(4, 2) + SourceIndex(0) name (m2_c1)
---
>>>})();
1 >
2 >^
3 >
4 > ^^^^
5 > ^^^^^^^^^^^^^^^^^^->
1 >
2 >}
3 >
4 > export class m2_c1 {
> public m2_c1_p1: number;
> }
1 >Emitted(6, 1) Source(4, 1) + SourceIndex(0) name (m2_c1)
2 >Emitted(6, 2) Source(4, 2) + SourceIndex(0) name (m2_c1)
3 >Emitted(6, 2) Source(2, 1) + SourceIndex(0)
4 >Emitted(6, 6) Source(4, 2) + SourceIndex(0)
---
>>>exports.m2_c1 = m2_c1;
1->
2 >^^^^^^^^^^^^^
3 > ^^^^^^^^
4 > ^
5 > ^^^^^^^^^^^^^^->
1->
2 >m2_c1
3 > {
> public m2_c1_p1: number;
> }
4 >
1->Emitted(7, 1) Source(2, 14) + SourceIndex(0)
2 >Emitted(7, 14) Source(2, 19) + SourceIndex(0)
3 >Emitted(7, 22) Source(4, 2) + SourceIndex(0)
4 >Emitted(7, 23) Source(4, 2) + SourceIndex(0)
---
>>>exports.m2_instance1 = new m2_c1();
1->
2 >^^^^^^^^^^^^^^^^^^^^
3 > ^^^
4 > ^^^^
5 > ^^^^^
6 > ^^
7 > ^
1->
>
>export var
2 >m2_instance1
3 > =
4 > new
5 > m2_c1
6 > ()
7 > ;
1->Emitted(8, 1) Source(6, 12) + SourceIndex(0)
2 >Emitted(8, 21) Source(6, 24) + SourceIndex(0)
3 >Emitted(8, 24) Source(6, 27) + SourceIndex(0)
4 >Emitted(8, 28) Source(6, 31) + SourceIndex(0)
5 >Emitted(8, 33) Source(6, 36) + SourceIndex(0)
6 >Emitted(8, 35) Source(6, 38) + SourceIndex(0)
7 >Emitted(8, 36) Source(6, 39) + SourceIndex(0)
---
>>>function m2_f1() {
1 >
2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
1 >Emitted(9, 1) Source(7, 1) + SourceIndex(0)
---
>>> return exports.m2_instance1;
1->^^^^
2 > ^^^^^^
3 > ^
4 > ^^^^^^^^^^^^^^^^^^^^
5 > ^
1->export function m2_f1() {
>
2 > return
3 >
4 > m2_instance1
5 > ;
1->Emitted(10, 5) Source(8, 5) + SourceIndex(0) name (m2_f1)
2 >Emitted(10, 11) Source(8, 11) + SourceIndex(0) name (m2_f1)
3 >Emitted(10, 12) Source(8, 12) + SourceIndex(0) name (m2_f1)
4 >Emitted(10, 32) Source(8, 24) + SourceIndex(0) name (m2_f1)
5 >Emitted(10, 33) Source(8, 25) + SourceIndex(0) name (m2_f1)
---
>>>}
1 >
2 >^
3 > ^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
2 >}
1 >Emitted(11, 1) Source(9, 1) + SourceIndex(0) name (m2_f1)
2 >Emitted(11, 2) Source(9, 2) + SourceIndex(0) name (m2_f1)
---
>>>exports.m2_f1 = m2_f1;
1->
2 >^^^^^^^^^^^^^
3 > ^^^^^^^^
4 > ^
5 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^->
1->
2 >m2_f1
3 > () {
> return m2_instance1;
> }
4 >
1->Emitted(12, 1) Source(7, 17) + SourceIndex(0)
2 >Emitted(12, 14) Source(7, 22) + SourceIndex(0)
3 >Emitted(12, 22) Source(9, 2) + SourceIndex(0)
4 >Emitted(12, 23) Source(9, 2) + SourceIndex(0)
---
>>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map===================================================================
JsFile: outAndOutDirFile.js
mapUrl: /tests/cases/projects/outputdir_mixed_subfolder/mapFiles/outAndOutDirFile.js.map
sourceRoot:
sources: ../ref/m1.ts,../test.ts
sources: ../ref/m1.ts,../ref/m2.ts,../test.ts
===================================================================
-------------------------------------------------------------------
emittedFile:bin/outAndOutDirFile.js
@@ -322,8 +151,8 @@ sourceFile:../test.ts
3 > ^->
1->
2 >/// <reference path='ref/m1.ts'/>
1->Emitted(11, 1) Source(1, 1) + SourceIndex(1)
2 >Emitted(11, 34) Source(1, 34) + SourceIndex(1)
1->Emitted(11, 1) Source(1, 1) + SourceIndex(2)
2 >Emitted(11, 34) Source(1, 34) + SourceIndex(2)
---
>>>/// <reference path='ref/m2.ts'/>
1->
@@ -331,8 +160,8 @@ sourceFile:../test.ts
1->
>
2 >/// <reference path='ref/m2.ts'/>
1->Emitted(12, 1) Source(2, 1) + SourceIndex(1)
2 >Emitted(12, 34) Source(2, 34) + SourceIndex(1)
1->Emitted(12, 1) Source(2, 1) + SourceIndex(2)
2 >Emitted(12, 34) Source(2, 34) + SourceIndex(2)
---
>>>var a1 = 10;
1 >
@@ -349,25 +178,25 @@ sourceFile:../test.ts
4 > =
5 > 10
6 > ;
1 >Emitted(13, 1) Source(3, 1) + SourceIndex(1)
2 >Emitted(13, 5) Source(3, 5) + SourceIndex(1)
3 >Emitted(13, 7) Source(3, 7) + SourceIndex(1)
4 >Emitted(13, 10) Source(3, 10) + SourceIndex(1)
5 >Emitted(13, 12) Source(3, 12) + SourceIndex(1)
6 >Emitted(13, 13) Source(3, 13) + SourceIndex(1)
1 >Emitted(13, 1) Source(3, 1) + SourceIndex(2)
2 >Emitted(13, 5) Source(3, 5) + SourceIndex(2)
3 >Emitted(13, 7) Source(3, 7) + SourceIndex(2)
4 >Emitted(13, 10) Source(3, 10) + SourceIndex(2)
5 >Emitted(13, 12) Source(3, 12) + SourceIndex(2)
6 >Emitted(13, 13) Source(3, 13) + SourceIndex(2)
---
>>>var c1 = (function () {
1->
2 >^^^^^^^^^^^^^^^^^^^^->
1->
>
1->Emitted(14, 1) Source(4, 1) + SourceIndex(1)
1->Emitted(14, 1) Source(4, 1) + SourceIndex(2)
---
>>> function c1() {
1->^^^^
2 > ^^->
1->
1->Emitted(15, 5) Source(4, 1) + SourceIndex(1) name (c1)
1->Emitted(15, 5) Source(4, 1) + SourceIndex(2) name (c1)
---
>>> }
1->^^^^
@@ -377,16 +206,16 @@ sourceFile:../test.ts
> public p1: number;
>
2 > }
1->Emitted(16, 5) Source(6, 1) + SourceIndex(1) name (c1.constructor)
2 >Emitted(16, 6) Source(6, 2) + SourceIndex(1) name (c1.constructor)
1->Emitted(16, 5) Source(6, 1) + SourceIndex(2) name (c1.constructor)
2 >Emitted(16, 6) Source(6, 2) + SourceIndex(2) name (c1.constructor)
---
>>> return c1;
1->^^^^
2 > ^^^^^^^^^
1->
2 > }
1->Emitted(17, 5) Source(6, 1) + SourceIndex(1) name (c1)
2 >Emitted(17, 14) Source(6, 2) + SourceIndex(1) name (c1)
1->Emitted(17, 5) Source(6, 1) + SourceIndex(2) name (c1)
2 >Emitted(17, 14) Source(6, 2) + SourceIndex(2) name (c1)
---
>>>})();
1 >
@@ -400,10 +229,10 @@ sourceFile:../test.ts
4 > class c1 {
> public p1: number;
> }
1 >Emitted(18, 1) Source(6, 1) + SourceIndex(1) name (c1)
2 >Emitted(18, 2) Source(6, 2) + SourceIndex(1) name (c1)
3 >Emitted(18, 2) Source(4, 1) + SourceIndex(1)
4 >Emitted(18, 6) Source(6, 2) + SourceIndex(1)
1 >Emitted(18, 1) Source(6, 1) + SourceIndex(2) name (c1)
2 >Emitted(18, 2) Source(6, 2) + SourceIndex(2) name (c1)
3 >Emitted(18, 2) Source(4, 1) + SourceIndex(2)
4 >Emitted(18, 6) Source(6, 2) + SourceIndex(2)
---
>>>var instance1 = new c1();
1->
@@ -424,21 +253,21 @@ sourceFile:../test.ts
6 > c1
7 > ()
8 > ;
1->Emitted(19, 1) Source(8, 1) + SourceIndex(1)
2 >Emitted(19, 5) Source(8, 5) + SourceIndex(1)
3 >Emitted(19, 14) Source(8, 14) + SourceIndex(1)
4 >Emitted(19, 17) Source(8, 17) + SourceIndex(1)
5 >Emitted(19, 21) Source(8, 21) + SourceIndex(1)
6 >Emitted(19, 23) Source(8, 23) + SourceIndex(1)
7 >Emitted(19, 25) Source(8, 25) + SourceIndex(1)
8 >Emitted(19, 26) Source(8, 26) + SourceIndex(1)
1->Emitted(19, 1) Source(8, 1) + SourceIndex(2)
2 >Emitted(19, 5) Source(8, 5) + SourceIndex(2)
3 >Emitted(19, 14) Source(8, 14) + SourceIndex(2)
4 >Emitted(19, 17) Source(8, 17) + SourceIndex(2)
5 >Emitted(19, 21) Source(8, 21) + SourceIndex(2)
6 >Emitted(19, 23) Source(8, 23) + SourceIndex(2)
7 >Emitted(19, 25) Source(8, 25) + SourceIndex(2)
8 >Emitted(19, 26) Source(8, 26) + SourceIndex(2)
---
>>>function f1() {
1 >
2 >^^^^^^^^^^^^^^^^^^^^^^->
1 >
>
1 >Emitted(20, 1) Source(9, 1) + SourceIndex(1)
1 >Emitted(20, 1) Source(9, 1) + SourceIndex(2)
---
>>> return instance1;
1->^^^^
@@ -452,11 +281,11 @@ sourceFile:../test.ts
3 >
4 > instance1
5 > ;
1->Emitted(21, 5) Source(10, 5) + SourceIndex(1) name (f1)
2 >Emitted(21, 11) Source(10, 11) + SourceIndex(1) name (f1)
3 >Emitted(21, 12) Source(10, 12) + SourceIndex(1) name (f1)
4 >Emitted(21, 21) Source(10, 21) + SourceIndex(1) name (f1)
5 >Emitted(21, 22) Source(10, 22) + SourceIndex(1) name (f1)
1->Emitted(21, 5) Source(10, 5) + SourceIndex(2) name (f1)
2 >Emitted(21, 11) Source(10, 11) + SourceIndex(2) name (f1)
3 >Emitted(21, 12) Source(10, 12) + SourceIndex(2) name (f1)
4 >Emitted(21, 21) Source(10, 21) + SourceIndex(2) name (f1)
5 >Emitted(21, 22) Source(10, 22) + SourceIndex(2) name (f1)
---
>>>}
1 >
@@ -465,7 +294,7 @@ sourceFile:../test.ts
1 >
>
2 >}
1 >Emitted(22, 1) Source(11, 1) + SourceIndex(1) name (f1)
2 >Emitted(22, 2) Source(11, 2) + SourceIndex(1) name (f1)
1 >Emitted(22, 1) Source(11, 1) + SourceIndex(2) name (f1)
2 >Emitted(22, 2) Source(11, 2) + SourceIndex(2) name (f1)
---
>>>//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/outAndOutDirFile.js.map
@@ -1,6 +0,0 @@
export declare var m2_a1: number;
export declare class m2_c1 {
m2_c1_p1: number;
}
export declare var m2_instance1: m2_c1;
export declare function m2_f1(): m2_c1;
@@ -1,13 +0,0 @@
exports.m2_a1 = 10;
var m2_c1 = (function () {
function m2_c1() {
}
return m2_c1;
})();
exports.m2_c1 = m2_c1;
exports.m2_instance1 = new m2_c1();
function m2_f1() {
return exports.m2_instance1;
}
exports.m2_f1 = m2_f1;
//# sourceMappingURL=/tests/cases/projects/outputdir_mixed_subfolder/mapFiles/ref/m2.js.map
@@ -1 +0,0 @@
{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":"AAAW,aAAK,GAAG,EAAE,CAAC;AACtB;IAAAA;IAEAC,CAACA;IAADD,YAACA;AAADA,CAACA,AAFD,IAEC;AAFY,aAAK,QAEjB,CAAA;AAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;AACtC;IACIE,MAAMA,CAACA,oBAAYA,CAACA;AACxBA,CAACA;AAFe,aAAK,QAEpB,CAAA"}
@@ -0,0 +1,28 @@
declare module "ref/m1" {
export var m1_a1: number;
export class m1_c1 {
m1_c1_p1: number;
}
export var m1_instance1: m1_c1;
export function m1_f1(): m1_c1;
}
declare module "../outputdir_module_multifolder_ref/m2" {
export var m2_a1: number;
export class m2_c1 {
m2_c1_p1: number;
}
export var m2_instance1: m2_c1;
export function m2_f1(): m2_c1;
}
declare module "test" {
import m1 = require("ref/m1");
import m2 = require("../outputdir_module_multifolder_ref/m2");
export var a1: number;
export class c1 {
p1: number;
}
export var instance1: c1;
export function f1(): c1;
export var a2: typeof m1.m1_c1;
export var a3: typeof m2.m2_c1;
}
@@ -1 +1,45 @@
define("ref/m1", ["require", "exports"], function (require, exports) {
exports.m1_a1 = 10;
var m1_c1 = (function () {
function m1_c1() {
}
return m1_c1;
})();
exports.m1_c1 = m1_c1;
exports.m1_instance1 = new m1_c1();
function m1_f1() {
return exports.m1_instance1;
}
exports.m1_f1 = m1_f1;
});
define("../outputdir_module_multifolder_ref/m2", ["require", "exports"], function (require, exports) {
exports.m2_a1 = 10;
var m2_c1 = (function () {
function m2_c1() {
}
return m2_c1;
})();
exports.m2_c1 = m2_c1;
exports.m2_instance1 = new m2_c1();
function m2_f1() {
return exports.m2_instance1;
}
exports.m2_f1 = m2_f1;
});
define("test", ["require", "exports", "ref/m1", "../outputdir_module_multifolder_ref/m2"], function (require, exports, m1, m2) {
exports.a1 = 10;
var c1 = (function () {
function c1() {
}
return c1;
})();
exports.c1 = c1;
exports.instance1 = new c1();
function f1() {
return exports.instance1;
}
exports.f1 = f1;
exports.a2 = m1.m1_c1;
exports.a3 = m2.m2_c1;
});
//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/test.js.map
@@ -1 +1 @@
{"version":3,"file":"test.js","sourceRoot":"","sources":[],"names":[],"mappings":""}
{"version":3,"file":"test.js","sourceRoot":"","sources":["../ref/m1.ts","../../outputdir_module_multifolder_ref/m2.ts","../test.ts"],"names":["m1_c1","m1_c1.constructor","m1_f1","m2_c1","m2_c1.constructor","m2_f1","c1","c1.constructor","f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICRU,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAC;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA;;;ICNU,UAAE,GAAG,EAAE,CAAC;IACnB;QAAAC;QAEAC,CAACA;QAADD,SAACA;IAADA,CAACA,AAFD,IAEC;IAFY,UAAE,KAEd,CAAA;IAEU,iBAAS,GAAG,IAAI,EAAE,EAAE,CAAC;IAChC;QACIE,MAAMA,CAACA,iBAASA,CAACA;IACrBA,CAACA;IAFe,UAAE,KAEjB,CAAA;IAEU,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC;IACd,UAAE,GAAG,EAAE,CAAC,KAAK,CAAC"}
@@ -1 +0,0 @@
{"version":3,"file":"m2.js","sourceRoot":"","sources":["../../../outputdir_module_multifolder_ref/m2.ts"],"names":["m2_c1","m2_c1.constructor","m2_f1"],"mappings":";IAAW,aAAK,GAAG,EAAE,CAAC;IACtB;QAAAA;QAEAC,CAACA;QAADD,YAACA;IAADA,CAACA,AAFD,IAEC;IAFY,aAAK,QAEjB,CAAA;IAEU,oBAAY,GAAG,IAAI,KAAK,EAAE,CAAC;IACtC;QACIE,MAAMA,CAACA,oBAAYA,CAACA;IACxBA,CAACA;IAFe,aAAK,QAEpB,CAAA"}
@@ -1,15 +0,0 @@
define(["require", "exports"], function (require, exports) {
exports.m2_a1 = 10;
var m2_c1 = (function () {
function m2_c1() {
}
return m2_c1;
})();
exports.m2_c1 = m2_c1;
exports.m2_instance1 = new m2_c1();
function m2_f1() {
return exports.m2_instance1;
}
exports.m2_f1 = m2_f1;
});
//# sourceMappingURL=/tests/cases/projects/outputdir_module_multifolder/mapFiles/outputdir_module_multifolder_ref/m2.js.map

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