Merge branch 'master' into strictAny

This commit is contained in:
Anders Hejlsberg
2018-05-25 15:26:52 -07:00
137 changed files with 1117 additions and 512 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ Please fill in the *entire* template below.
-->
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:** 2.9.0-dev.201xxxxx
**TypeScript Version:** 3.0.0-dev.201xxxxx
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
+1 -1
View File
@@ -24,7 +24,7 @@ Please help us by doing the following steps before logging an issue:
-->
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:** 2.9.0-dev.201xxxxx
**TypeScript Version:** 3.0.0-dev.201xxxxx
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
+3 -3
View File
@@ -56,13 +56,13 @@ function updateTsFile(tsFilePath: string, tsFileContents: string, majorMinor: st
const majorMinorRgx = /export const versionMajorMinor = "(\d+\.\d+)"/;
const majorMinorMatch = majorMinorRgx.exec(tsFileContents);
assert(majorMinorMatch !== null, `The file seems to no longer have a string matching '${majorMinorRgx}'.`);
const parsedMajorMinor = majorMinorMatch[1];
const parsedMajorMinor = majorMinorMatch![1];
assert(parsedMajorMinor === majorMinor, `versionMajorMinor does not match. ${tsFilePath}: '${parsedMajorMinor}'; package.json: '${majorMinor}'`);
const versionRgx = /export const version = `\$\{versionMajorMinor\}\.(\d)(-dev)?`;/;
const patchMatch = versionRgx.exec(tsFileContents);
assert(patchMatch !== null, "The file seems to no longer have a string matching " + versionRgx.toString());
const parsedPatch = patchMatch[1];
const parsedPatch = patchMatch![1];
if (parsedPatch !== patch) {
throw new Error(`patch does not match. ${tsFilePath}: '${parsedPatch}; package.json: '${patch}'`);
}
@@ -74,7 +74,7 @@ function parsePackageJsonVersion(versionString: string): { majorMinor: string, p
const versionRgx = /(\d+\.\d+)\.(\d+)($|\-)/;
const match = versionString.match(versionRgx);
assert(match !== null, "package.json 'version' should match " + versionRgx.toString());
return { majorMinor: match[1], patch: match[2] };
return { majorMinor: match![1], patch: match![2] };
}
/** e.g. 0-dev.20170707 */
+3 -3
View File
@@ -2994,7 +2994,7 @@ namespace ts {
}
}
function typeToString(type: Type, enclosingDeclaration?: Node, flags: TypeFormatFlags = TypeFormatFlags.AllowUniqueESSymbolType, writer: EmitTextWriter = createTextWriter("")): string {
function typeToString(type: Type, enclosingDeclaration?: Node, flags: TypeFormatFlags = TypeFormatFlags.AllowUniqueESSymbolType | TypeFormatFlags.UseAliasDefinedOutsideCurrentScope, writer: EmitTextWriter = createTextWriter("")): string {
const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | NodeBuilderFlags.IgnoreErrors, writer);
if (typeNode === undefined) return Debug.fail("should always get typenode");
const options = { removeComments: true };
@@ -3942,7 +3942,7 @@ namespace ts {
}
}
function typePredicateToString(typePredicate: TypePredicate, enclosingDeclaration?: Node, flags?: TypeFormatFlags, writer?: EmitTextWriter): string {
function typePredicateToString(typePredicate: TypePredicate, enclosingDeclaration?: Node, flags: TypeFormatFlags = TypeFormatFlags.UseAliasDefinedOutsideCurrentScope, writer?: EmitTextWriter): string {
return writer ? typePredicateToStringWorker(writer).getText() : usingSingleLineStringWriter(typePredicateToStringWorker);
function typePredicateToStringWorker(writer: EmitTextWriter) {
@@ -24491,7 +24491,7 @@ namespace ts {
continue;
}
if (isPrototypeProperty(base) && isPrototypeProperty(derived) || base.flags & SymbolFlags.PropertyOrAccessor && derived.flags & SymbolFlags.PropertyOrAccessor) {
if (isPrototypeProperty(base) || base.flags & SymbolFlags.PropertyOrAccessor && derived.flags & SymbolFlags.PropertyOrAccessor) {
// method is overridden with method or property/accessor is overridden with property/accessor - correct case
continue;
}
+2 -16
View File
@@ -965,7 +965,8 @@ namespace ts {
export function append<T>(to: T[], value: T | undefined): T[];
export function append<T>(to: T[] | undefined, value: T): T[];
export function append<T>(to: T[] | undefined, value: T | undefined): T[] | undefined;
export function append<T>(to: T[] | undefined, value: T | undefined): T[] | undefined {
export function append<T>(to: Push<T>, value: T | undefined): void;
export function append<T>(to: T[], value: T | undefined): T[] | undefined {
if (value === undefined) return to;
if (to === undefined) return [value];
to.push(value);
@@ -1005,21 +1006,6 @@ namespace ts {
return to;
}
/**
* Appends a range of value to begin of an array, returning the array.
*
* @param to The array to which `value` is to be appended. If `to` is `undefined`, a new array
* is created if `value` was appended.
* @param from The values to append to the array. If `from` is `undefined`, nothing is
* appended. If an element of `from` is `undefined`, that element is not appended.
*/
export function prependRange<T>(to: T[], from: ReadonlyArray<T> | undefined): T[] | undefined {
if (from === undefined || from.length === 0) return to;
if (to === undefined) return from.slice();
to.unshift(...from);
return to;
}
/**
* @return Whether the value was added.
*/
+1 -1
View File
@@ -6707,7 +6707,7 @@ namespace ts {
<JSDocParameterTag>createNode(SyntaxKind.JSDocParameterTag, atToken.pos);
let comment: string | undefined;
if (indent !== undefined) comment = parseTagComments(indent + scanner.getStartPos() - atToken.pos);
const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target);
const nestedTypeLiteral = target !== PropertyLikeParse.CallbackParameter && parseNestedTypeLiteral(typeExpression, name, target);
if (nestedTypeLiteral) {
typeExpression = nestedTypeLiteral;
isNameFirst = true;
+7 -2
View File
@@ -2667,6 +2667,11 @@ namespace ts {
return isSameFile(filePath, out) || isSameFile(filePath, removeFileExtension(out) + Extension.Dts);
}
// If declarationDir is specified, return if its a file in that directory
if (options.declarationDir && containsPath(options.declarationDir, filePath, currentDirectory, !host.useCaseSensitiveFileNames())) {
return true;
}
// If --outDir, check if file is in that directory
if (options.outDir) {
return containsPath(options.outDir, filePath, currentDirectory, !host.useCaseSensitiveFileNames());
@@ -2675,8 +2680,8 @@ namespace ts {
if (fileExtensionIsOneOf(filePath, supportedJavascriptExtensions) || fileExtensionIs(filePath, Extension.Dts)) {
// Otherwise just check if sourceFile with the name exists
const filePathWithoutExtension = removeFileExtension(filePath);
return !!getSourceFileByPath(combinePaths(filePathWithoutExtension, Extension.Ts) as Path) ||
!!getSourceFileByPath(combinePaths(filePathWithoutExtension, Extension.Tsx) as Path);
return !!getSourceFileByPath((filePathWithoutExtension + Extension.Ts) as Path) ||
!!getSourceFileByPath((filePathWithoutExtension + Extension.Tsx) as Path);
}
return false;
}
+5 -5
View File
@@ -529,7 +529,7 @@ namespace ts {
createVariableStatement(/*modifiers*/ undefined,
createVariableDeclarationList(taggedTemplateStringDeclarations)));
}
prependRange(statements, endLexicalEnvironment());
prependStatements(statements, endLexicalEnvironment());
exitSubtree(ancestorFacts, HierarchyFacts.None, HierarchyFacts.None);
return updateSourceFileNode(
node,
@@ -837,7 +837,7 @@ namespace ts {
setEmitFlags(statement, EmitFlags.NoComments | EmitFlags.NoTokenSourceMaps);
statements.push(statement);
prependRange(statements, endLexicalEnvironment());
prependStatements(statements, endLexicalEnvironment());
const block = createBlock(setTextRange(createNodeArray(statements), /*location*/ node.members), /*multiLine*/ true);
setEmitFlags(block, EmitFlags.NoComments);
@@ -980,7 +980,7 @@ namespace ts {
);
}
prependRange(statements, endLexicalEnvironment());
prependStatements(statements, endLexicalEnvironment());
if (constructor) {
prependCaptureNewTargetIfNeeded(statements, constructor, /*copyOnWrite*/ false);
@@ -1896,7 +1896,7 @@ namespace ts {
}
const lexicalEnvironment = context.endLexicalEnvironment();
prependRange(statements, lexicalEnvironment);
prependStatements(statements, lexicalEnvironment);
prependCaptureNewTargetIfNeeded(statements, node, /*copyOnWrite*/ false);
@@ -2712,7 +2712,7 @@ namespace ts {
if (loopOutParameters.length) {
copyOutParameters(loopOutParameters, CopyDirection.ToOutParameter, statements);
}
prependRange(statements, lexicalEnvironment);
prependStatements(statements, lexicalEnvironment);
loopBody = createBlock(statements, /*multiline*/ true);
}
+1 -1
View File
@@ -413,7 +413,7 @@ namespace ts {
)
);
prependRange(statements, endLexicalEnvironment());
prependStatements(statements, endLexicalEnvironment());
const block = createBlock(statements, /*multiLine*/ true);
setTextRange(block, node.body);
+2 -2
View File
@@ -663,7 +663,7 @@ namespace ts {
)
);
prependRange(statements, endLexicalEnvironment());
prependStatements(statements, endLexicalEnvironment());
const block = updateBlock(node.body!, statements);
// Minor optimization, emit `_super` helper to capture `super` access in an arrow.
@@ -695,7 +695,7 @@ namespace ts {
const leadingStatements = endLexicalEnvironment();
if (statementOffset > 0 || some(statements) || some(leadingStatements)) {
const block = convertToFunctionBody(body, /*multiLine*/ true);
prependRange(statements, leadingStatements);
prependStatements(statements, leadingStatements);
addRange(statements, block.statements.slice(statementOffset));
return updateBlock(block, setTextRange(createNodeArray(statements), block.statements));
}
+1 -1
View File
@@ -587,7 +587,7 @@ namespace ts {
transformAndEmitStatements(body.statements, statementOffset);
const buildResult = build();
prependRange(statements, endLexicalEnvironment());
prependStatements(statements, endLexicalEnvironment());
statements.push(createReturn(buildResult));
// Restore previous generator state
+2 -2
View File
@@ -97,7 +97,7 @@ namespace ts {
append(statements, visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, isStatement));
addRange(statements, visitNodes(node.statements, sourceElementVisitor, isStatement, statementOffset));
addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false);
prependRange(statements, endLexicalEnvironment());
prependStatements(statements, endLexicalEnvironment());
const updated = updateSourceFileNode(node, setTextRange(createNodeArray(statements), node.statements));
if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) {
@@ -426,7 +426,7 @@ namespace ts {
// End the lexical environment for the module body
// and merge any new lexical declarations.
prependRange(statements, endLexicalEnvironment());
prependStatements(statements, endLexicalEnvironment());
const body = createBlock(statements, /*multiLine*/ true);
if (currentModuleInfo.hasExportStarsToExportValues && !compilerOptions.importHelpers) {
+1 -1
View File
@@ -257,7 +257,7 @@ namespace ts {
// We emit hoisted variables early to align roughly with our previous emit output.
// Two key differences in this approach are:
// - Temporary variables will appear at the top rather than at the bottom of the file
prependRange(statements, endLexicalEnvironment());
prependStatements(statements, endLexicalEnvironment());
const exportStarFunction = addExportStarIfNeeded(statements)!; // TODO: GH#18217
const moduleObject = createObjectLiteral([
+3 -3
View File
@@ -669,7 +669,7 @@ namespace ts {
setEmitFlags(statement, EmitFlags.NoComments | EmitFlags.NoTokenSourceMaps);
statements.push(statement);
prependRange(statements, context.endLexicalEnvironment());
prependStatements(statements, context.endLexicalEnvironment());
const iife = createImmediatelyInvokedArrowFunction(statements);
setEmitFlags(iife, EmitFlags.TypeScriptClassWrapper);
@@ -2693,7 +2693,7 @@ namespace ts {
const statements: Statement[] = [];
startLexicalEnvironment();
const members = map(node.members, transformEnumMember);
prependRange(statements, endLexicalEnvironment());
prependStatements(statements, endLexicalEnvironment());
addRange(statements, members);
currentNamespaceContainerName = savedCurrentNamespaceLocalName;
@@ -3008,7 +3008,7 @@ namespace ts {
statementsLocation = moveRangePos(moduleBlock.statements, -1);
}
prependRange(statements, endLexicalEnvironment());
prependStatements(statements, endLexicalEnvironment());
currentNamespaceContainerName = savedCurrentNamespaceContainerName;
currentNamespace = savedCurrentNamespace;
currentScopeFirstDeclarationsOfName = savedCurrentScopeFirstDeclarationsOfName;
+19
View File
@@ -254,6 +254,25 @@ namespace ts {
return !nodeIsMissing(node);
}
/**
* Appends a range of value to begin of an array, returning the array.
*
* @param to The array to which `value` is to be appended. If `to` is `undefined`, a new array
* is created if `value` was appended.
* @param from The values to append to the array. If `from` is `undefined`, nothing is
* appended. If an element of `from` is `undefined`, that element is not appended.
*/
export function prependStatements<T extends Statement>(to: T[], from: ReadonlyArray<T> | undefined): T[] | undefined {
if (from === undefined || from.length === 0) return to;
if (to === undefined) return from.slice();
const prologue = to.length && isPrologueDirective(to[0]) && to.shift();
to.unshift(...from);
if (prologue) {
to.unshift(prologue);
}
return to;
}
/**
* Determine if the given comment is a triple-slash
*
+1 -1
View File
@@ -1469,7 +1469,7 @@ namespace ts {
return isNodeArray(statements)
? setTextRange(createNodeArray(concatenate(declarations, statements)), statements)
: prependRange(statements, declarations);
: prependStatements(statements, declarations);
}
/**
+2 -1
View File
@@ -3130,7 +3130,7 @@ Actual: ${stringify(fullActual)}`);
const action = ts.first(refactor.actions);
assert(action.name === "Move to a new file" && action.description === "Move to a new file");
const editInfo = this.languageService.getEditsForRefactor(this.activeFile.fileName, this.formatCodeSettings, range, refactor.name, action.name, ts.defaultPreferences)!;
const editInfo = this.languageService.getEditsForRefactor(this.activeFile.fileName, this.formatCodeSettings, range, refactor.name, action.name, options.preferences || ts.defaultPreferences)!;
for (const edit of editInfo.edits) {
const newContent = options.newFileContents[edit.fileName];
if (newContent === undefined) {
@@ -4836,5 +4836,6 @@ namespace FourSlashInterface {
export interface MoveToNewFileOptions {
readonly newFileContents: { readonly [fileName: string]: string };
readonly preferences?: ts.UserPreferences;
}
}
+7
View File
@@ -1469,7 +1469,14 @@ namespace Harness {
// Verify we didn't miss any errors in this file
assert.equal(markedErrorCount, fileErrors.length, "count of errors in " + inputFile.unitName);
const isDupe = dupeCase.has(sanitizeTestFilePath(inputFile.unitName));
yield [checkDuplicatedFileName(inputFile.unitName, dupeCase), outputLines, errorsReported];
if (isDupe && !(options && options.caseSensitive)) {
// Case-duplicated files on a case-insensitive build will have errors reported in both the dupe and the original
// thanks to the canse-insensitive path comparison on the error file path - We only want to count those errors once
// for the assert below, so we subtract them here.
totalErrorsReportedInNonLibraryFiles -= errorsReported;
}
outputLines = "";
errorsReported = 0;
}
+18 -2
View File
@@ -13,6 +13,13 @@ namespace Harness.Parallel.Host {
on(event: "message", listener: (message: ParallelClientMessage) => void): this;
kill(signal?: string): void;
currentTasks?: {file: string}[]; // Custom monkeypatch onto child process handle
accumulatedOutput: string; // Custom monkeypatch with process output
stderr: PartialStream;
stdout: PartialStream;
}
interface PartialStream {
on(event: "data", listener: (chunk: Buffer) => void): this;
}
interface ProgressBarsOptions {
@@ -151,7 +158,13 @@ namespace Harness.Parallel.Host {
const config: TestConfig = { light: lightMode, listenForWork: true, runUnitTests, stackTraceLimit };
const configPath = ts.combinePaths(taskConfigsFolder, `task-config${i}.json`);
IO.writeFile(configPath, JSON.stringify(config));
const child = fork(__filename, [`--config="${configPath}"`]);
const child = fork(__filename, [`--config="${configPath}"`], { stdio: ["pipe", "pipe", "pipe", "ipc"] });
child.accumulatedOutput = "";
const appendOutput = (d: Buffer) => {
child.accumulatedOutput += d.toString();
};
child.stderr.on("data", appendOutput);
child.stdout.on("data", appendOutput);
let currentTimeout = defaultTimeout;
const killChild = () => {
child.kill();
@@ -166,8 +179,10 @@ namespace Harness.Parallel.Host {
return process.exit(2);
});
child.on("exit", (code, _signal) => {
clearTimeout(timer);
if (code !== 0) {
console.error("Test worker process exited with nonzero exit code!");
console.error(`Test worker process exited with nonzero exit code! Output:
${child.accumulatedOutput}`);
return process.exit(2);
}
});
@@ -223,6 +238,7 @@ namespace Harness.Parallel.Host {
// No more tasks to distribute
child.send({ type: "close" });
closedWorkers++;
clearTimeout(timer);
if (closedWorkers === workerCount) {
outputFinalResult();
}
+45 -26
View File
@@ -1116,34 +1116,53 @@ namespace ts.tscWatch {
assert.equal(nowErrors[1].start, intialErrors[1].start! - configFileContentComment.length);
});
it("should not trigger recompilation because of program emit", () => {
const proj = "/user/username/projects/myproject";
const file1: File = {
path: `${proj}/file1.ts`,
content: "export const c = 30;"
};
const file2: File = {
path: `${proj}/src/file2.ts`,
content: `import {c} from "file1"; export const d = 30;`
};
const tsconfig: File = {
path: `${proj}/tsconfig.json`,
content: JSON.stringify({
compilerOptions: {
module: "amd",
outDir: "build"
}
})
};
const host = createWatchedSystem([file1, file2, libFile, tsconfig], { currentDirectory: proj });
const watch = createWatchOfConfigFile(tsconfig.path, host, /*maxNumberOfFilesToIterateForInvalidation*/1);
checkProgramActualFiles(watch(), [file1.path, file2.path, libFile.path]);
describe("should not trigger should not trigger recompilation because of program emit", () => {
function verifyWithOptions(options: CompilerOptions, outputFiles: ReadonlyArray<string>) {
const proj = "/user/username/projects/myproject";
const file1: File = {
path: `${proj}/file1.ts`,
content: "export const c = 30;"
};
const file2: File = {
path: `${proj}/src/file2.ts`,
content: `import {c} from "file1"; export const d = 30;`
};
const tsconfig: File = {
path: `${proj}/tsconfig.json`,
content: generateTSConfig(options, emptyArray, "\n")
};
const host = createWatchedSystem([file1, file2, libFile, tsconfig], { currentDirectory: proj });
const watch = createWatchOfConfigFile(tsconfig.path, host, /*maxNumberOfFilesToIterateForInvalidation*/1);
checkProgramActualFiles(watch(), [file1.path, file2.path, libFile.path]);
assert.isTrue(host.fileExists("build/file1.js"));
assert.isTrue(host.fileExists("build/src/file2.js"));
outputFiles.forEach(f => host.fileExists(f));
// This should be 0
host.checkTimeoutQueueLengthAndRun(0);
// This should be 0
host.checkTimeoutQueueLengthAndRun(0);
}
it("without outDir or outFile is specified", () => {
debugger;
verifyWithOptions({ module: ModuleKind.AMD }, ["file1.js", "src/file2.js"]);
});
it("with outFile", () => {
verifyWithOptions({ module: ModuleKind.AMD, outFile: "build/outFile.js" }, ["build/outFile.js"]);
});
it("when outDir is specified", () => {
verifyWithOptions({ module: ModuleKind.AMD, outDir: "build" }, ["build/file1.js", "build/src/file2.js"]);
});
it("when outDir and declarationDir is specified", () => {
verifyWithOptions({ module: ModuleKind.AMD, outDir: "build", declaration: true, declarationDir: "decls" },
["build/file1.js", "build/src/file2.js", "decls/file1.d.ts", "decls/src/file2.d.ts"]);
});
it("declarationDir is specified", () => {
verifyWithOptions({ module: ModuleKind.AMD, declaration: true, declarationDir: "decls" },
["file1.js", "src/file2.js", "decls/file1.d.ts", "decls/src/file2.d.ts"]);
});
});
it("shouldnt report error about unused function incorrectly when file changes from global to module", () => {
@@ -8314,7 +8314,7 @@ new C();`
});
});
describe("watchDirectories implementation", () => {
describe("tsserverProjectSystem watchDirectories implementation", () => {
function verifyCompletionListWithNewFileInSubFolder(tscWatchDirectory: TestFSWithWatch.Tsc_WatchDirectory) {
const projectFolder = "/a/username/project";
const projectSrcFolder = `${projectFolder}/src`;
@@ -8422,7 +8422,7 @@ new C();`
});
});
describe("document registry in project service", () => {
describe("tsserverProjectSystem document registry in project service", () => {
const projectRootPath = "/user/username/projects/project";
const importModuleContent = `import {a} from "./module1"`;
const file: File = {
@@ -1008,6 +1008,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_missing_typeof_95052" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add missing 'typeof']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[添加缺少的 "typeof"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add qualifier to all unresolved variables matching a member name]]></Val>
@@ -1125,6 +1134,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";All_variables_are_unused_6199" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[All variables are unused.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[所有变量均未使用。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
@@ -2538,6 +2556,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_0_to_mapped_object_type_95055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert '{0}' to mapped object type]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
@@ -6564,6 +6588,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_all_unused_labels_95054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unused labels]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[删除所有未使用的标签]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
@@ -6603,6 +6636,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_unused_label_95053" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unused label]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[删除未使用的标签]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_variable_statement_90010" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove variable statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[删除变量语句]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Replace import with '{0}'.]]></Val>
@@ -1017,6 +1017,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_missing_typeof_95052" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add missing 'typeof']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Přidat chybějící typeof]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add qualifier to all unresolved variables matching a member name]]></Val>
@@ -1134,6 +1143,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";All_variables_are_unused_6199" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[All variables are unused.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Žádná z proměnných se nepoužívá.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
@@ -2547,6 +2565,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_0_to_mapped_object_type_95055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert '{0}' to mapped object type]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
@@ -6573,6 +6597,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_all_unused_labels_95054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unused labels]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Odebrat všechny nepoužívané popisky]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
@@ -6612,6 +6645,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_unused_label_95053" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unused label]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Odebrat nepoužitý popisek]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_variable_statement_90010" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove variable statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Odebrat příkaz proměnné]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Replace import with '{0}'.]]></Val>
@@ -1005,6 +1005,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_missing_typeof_95052" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add missing 'typeof']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Fehlenden "typeof" hinzufügen]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add qualifier to all unresolved variables matching a member name]]></Val>
@@ -1122,6 +1131,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";All_variables_are_unused_6199" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[All variables are unused.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Alle Variablen werden nicht verwendet.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
@@ -2535,6 +2553,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_0_to_mapped_object_type_95055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert '{0}' to mapped object type]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
@@ -6558,6 +6582,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_all_unused_labels_95054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unused labels]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Alle nicht verwendeten Bezeichnungen entfernen]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
@@ -6597,6 +6630,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_unused_label_95053" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unused label]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Nicht verwendete Bezeichnung entfernen]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_variable_statement_90010" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove variable statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Variablenanweisung entfernen]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Replace import with '{0}'.]]></Val>
@@ -1019,10 +1019,13 @@
</Item>
<Item ItemId=";Add_missing_typeof_95052" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add missing typeof]]></Val>
<Val><![CDATA[Add missing 'typeof']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Agregar el objeto typeof que falta]]></Val>
<Val><![CDATA[Agregar el elemento "typeof" que falta]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[Add missing typeof]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1143,6 +1146,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";All_variables_are_unused_6199" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[All variables are unused.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Todas las variables son no utilizadas.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
@@ -2556,6 +2568,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_0_to_mapped_object_type_95055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert '{0}' to mapped object type]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
@@ -6585,6 +6603,9 @@
<Item ItemId=";Remove_all_unused_labels_95054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unused labels]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Quitar todas las etiquetas no utilizadas]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -6630,6 +6651,18 @@
<Item ItemId=";Remove_unused_label_95053" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unused label]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Quitar etiqueta no utilizada]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_variable_statement_90010" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove variable statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Quitar la declaración de variable]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1008,6 +1008,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_missing_typeof_95052" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add missing 'typeof']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Aggiungere l'elemento 'typeof' mancante]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add qualifier to all unresolved variables matching a member name]]></Val>
@@ -1125,6 +1134,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";All_variables_are_unused_6199" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[All variables are unused.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Tutte le variabili sono inutilizzate.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
@@ -2538,6 +2556,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_0_to_mapped_object_type_95055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert '{0}' to mapped object type]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
@@ -6564,6 +6588,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_all_unused_labels_95054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unused labels]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Rimuovere tutte le etichette inutilizzate]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
@@ -6603,6 +6636,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_unused_label_95053" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unused label]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Rimuovere l'etichetta inutilizzata]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_variable_statement_90010" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove variable statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Rimuovere l'istruzione di variabile]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Replace import with '{0}'.]]></Val>
@@ -1008,6 +1008,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_missing_typeof_95052" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add missing 'typeof']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[不足している 'typeof' を追加します]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add qualifier to all unresolved variables matching a member name]]></Val>
@@ -1125,6 +1134,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";All_variables_are_unused_6199" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[All variables are unused.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[すべての変数は未使用です。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
@@ -2538,6 +2556,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_0_to_mapped_object_type_95055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert '{0}' to mapped object type]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
@@ -6564,6 +6588,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_all_unused_labels_95054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unused labels]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[すべての未使用のラベルを削除します]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
@@ -6603,6 +6636,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_unused_label_95053" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unused label]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[未使用のラベルを削除します]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_variable_statement_90010" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove variable statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[変数のステートメントを削除します]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Replace import with '{0}'.]]></Val>
@@ -1008,6 +1008,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_missing_typeof_95052" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add missing 'typeof']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[누락된 'typeof' 추가]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add qualifier to all unresolved variables matching a member name]]></Val>
@@ -1125,6 +1134,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";All_variables_are_unused_6199" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[All variables are unused.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[모든 변수가 사용되지 않습니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
@@ -2538,6 +2556,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_0_to_mapped_object_type_95055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert '{0}' to mapped object type]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
@@ -6564,6 +6588,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_all_unused_labels_95054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unused labels]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[사용되지 않는 레이블 모두 제거]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
@@ -6603,6 +6636,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_unused_label_95053" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unused label]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[사용되지 않는 레이블 제거]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_variable_statement_90010" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove variable statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[변수 문 제거]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Replace import with '{0}'.]]></Val>
@@ -998,6 +998,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_missing_typeof_95052" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add missing 'typeof']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Dodaj brakujący element „typeof”]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add qualifier to all unresolved variables matching a member name]]></Val>
@@ -1115,6 +1124,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";All_variables_are_unused_6199" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[All variables are unused.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Wszystkie zmienne są nieużywane.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
@@ -2528,6 +2546,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_0_to_mapped_object_type_95055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert '{0}' to mapped object type]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
@@ -6551,6 +6575,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_all_unused_labels_95054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unused labels]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Usuń wszystkie nieużywane etykiety]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
@@ -6590,6 +6623,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_unused_label_95053" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unused label]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Usuń nieużywaną etykietę]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_variable_statement_90010" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove variable statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Usuń instrukcję zmiennej]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Replace import with '{0}'.]]></Val>
@@ -1000,10 +1000,13 @@
</Item>
<Item ItemId=";Add_missing_typeof_95052" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add missing typeof]]></Val>
<Val><![CDATA[Add missing 'typeof']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Adicionar typeof ausente]]></Val>
<Val><![CDATA[Adicionar 'typeof' ausente]]></Val>
</Tgt>
<Prev Cat="Text">
<Val><![CDATA[Add missing typeof]]></Val>
</Prev>
</Str>
<Disp Icon="Str" />
</Item>
@@ -1124,6 +1127,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";All_variables_are_unused_6199" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[All variables are unused.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Nenhuma das variáveis está sendo utilizada.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
@@ -2537,6 +2549,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_0_to_mapped_object_type_95055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert '{0}' to mapped object type]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
@@ -6560,6 +6578,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_all_unused_labels_95054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unused labels]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Remover todos os rótulos não utilizados]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
@@ -6599,6 +6626,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_unused_label_95053" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unused label]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Remover rótulo não utilizado]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_variable_statement_90010" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove variable statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Remover instrução de variável]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Replace import with '{0}'.]]></Val>
@@ -1001,6 +1001,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_missing_typeof_95052" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add missing 'typeof']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Eksik 'typeof' öğesini ekle]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Add qualifier to all unresolved variables matching a member name]]></Val>
@@ -1118,6 +1127,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";All_variables_are_unused_6199" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[All variables are unused.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Hiçbir değişken kullanılmıyor.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Allow default imports from modules with no default export. This does not affect code emit, just typechecking.]]></Val>
@@ -2531,6 +2549,12 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_0_to_mapped_object_type_95055" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert '{0}' to mapped object type]]></Val>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Convert_all_constructor_functions_to_classes_95045" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Convert all constructor functions to classes]]></Val>
@@ -6557,6 +6581,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_all_unused_labels_95054" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove all unused labels]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Kullanılmayan tüm etiketleri kaldır]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_declaration_for_Colon_0_90004" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove declaration for: '{0}']]></Val>
@@ -6596,6 +6629,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_unused_label_95053" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove unused label]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Kullanılmayan etiketi kaldır]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Remove_variable_statement_90010" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Remove variable statement]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Değişken deyimini kaldır]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";Replace_import_with_0_95015" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Replace import with '{0}'.]]></Val>
+25 -24
View File
@@ -3,12 +3,12 @@ namespace ts.codefix {
registerCodeFix({
errorCodes: [Diagnostics.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module.code],
getCodeActions(context) {
const { sourceFile, program } = context;
const { sourceFile, program, preferences } = context;
const changes = textChanges.ChangeTracker.with(context, changes => {
const moduleExportsChangedToDefault = convertFileToEs6Module(sourceFile, program.getTypeChecker(), changes, program.getCompilerOptions().target!);
const moduleExportsChangedToDefault = convertFileToEs6Module(sourceFile, program.getTypeChecker(), changes, program.getCompilerOptions().target!, preferences);
if (moduleExportsChangedToDefault) {
for (const importingFile of program.getSourceFiles()) {
fixImportOfModuleExports(importingFile, sourceFile, changes);
fixImportOfModuleExports(importingFile, sourceFile, changes, preferences);
}
}
});
@@ -17,7 +17,7 @@ namespace ts.codefix {
},
});
function fixImportOfModuleExports(importingFile: SourceFile, exportingFile: SourceFile, changes: textChanges.ChangeTracker) {
function fixImportOfModuleExports(importingFile: SourceFile, exportingFile: SourceFile, changes: textChanges.ChangeTracker, preferences: UserPreferences) {
for (const moduleSpecifier of importingFile.imports) {
const imported = getResolvedModule(importingFile, moduleSpecifier.text);
if (!imported || imported.resolvedFileName !== exportingFile.fileName) {
@@ -27,7 +27,7 @@ namespace ts.codefix {
const importNode = importFromModuleSpecifier(moduleSpecifier);
switch (importNode.kind) {
case SyntaxKind.ImportEqualsDeclaration:
changes.replaceNode(importingFile, importNode, makeImport(importNode.name, /*namedImports*/ undefined, moduleSpecifier));
changes.replaceNode(importingFile, importNode, makeImport(importNode.name, /*namedImports*/ undefined, moduleSpecifier, preferences));
break;
case SyntaxKind.CallExpression:
if (isRequireCall(importNode, /*checkArgumentIsStringLiteralLike*/ false)) {
@@ -39,13 +39,13 @@ namespace ts.codefix {
}
/** @returns Whether we converted a `module.exports =` to a default export. */
function convertFileToEs6Module(sourceFile: SourceFile, checker: TypeChecker, changes: textChanges.ChangeTracker, target: ScriptTarget): ModuleExportsChanged {
function convertFileToEs6Module(sourceFile: SourceFile, checker: TypeChecker, changes: textChanges.ChangeTracker, target: ScriptTarget, preferences: UserPreferences): ModuleExportsChanged {
const identifiers: Identifiers = { original: collectFreeIdentifiers(sourceFile), additional: createMap<true>() };
const exports = collectExportRenames(sourceFile, checker, identifiers);
convertExportsAccesses(sourceFile, exports, changes);
let moduleExportsChangedToDefault = false;
for (const statement of sourceFile.statements) {
const moduleExportsChanged = convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports);
const moduleExportsChanged = convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports, preferences);
moduleExportsChangedToDefault = moduleExportsChangedToDefault || moduleExportsChanged;
}
return moduleExportsChangedToDefault;
@@ -98,10 +98,10 @@ namespace ts.codefix {
/** Whether `module.exports =` was changed to `export default` */
type ModuleExportsChanged = boolean;
function convertStatement(sourceFile: SourceFile, statement: Statement, checker: TypeChecker, changes: textChanges.ChangeTracker, identifiers: Identifiers, target: ScriptTarget, exports: ExportRenames): ModuleExportsChanged {
function convertStatement(sourceFile: SourceFile, statement: Statement, checker: TypeChecker, changes: textChanges.ChangeTracker, identifiers: Identifiers, target: ScriptTarget, exports: ExportRenames, preferences: UserPreferences): ModuleExportsChanged {
switch (statement.kind) {
case SyntaxKind.VariableStatement:
convertVariableStatement(sourceFile, statement as VariableStatement, changes, checker, identifiers, target);
convertVariableStatement(sourceFile, statement as VariableStatement, changes, checker, identifiers, target, preferences);
return false;
case SyntaxKind.ExpressionStatement: {
const { expression } = statement as ExpressionStatement;
@@ -109,7 +109,7 @@ namespace ts.codefix {
case SyntaxKind.CallExpression: {
if (isRequireCall(expression, /*checkArgumentIsStringLiteralLike*/ true)) {
// For side-effecting require() call, just make a side-effecting import.
changes.replaceNode(sourceFile, statement, makeImport(/*name*/ undefined, /*namedImports*/ undefined, expression.arguments[0]));
changes.replaceNode(sourceFile, statement, makeImport(/*name*/ undefined, /*namedImports*/ undefined, expression.arguments[0], preferences));
}
return false;
}
@@ -125,7 +125,7 @@ namespace ts.codefix {
}
}
function convertVariableStatement(sourceFile: SourceFile, statement: VariableStatement, changes: textChanges.ChangeTracker, checker: TypeChecker, identifiers: Identifiers, target: ScriptTarget): void {
function convertVariableStatement(sourceFile: SourceFile, statement: VariableStatement, changes: textChanges.ChangeTracker, checker: TypeChecker, identifiers: Identifiers, target: ScriptTarget, preferences: UserPreferences): void {
const { declarationList } = statement;
let foundImport = false;
const newNodes = flatMap(declarationList.declarations, decl => {
@@ -138,11 +138,11 @@ namespace ts.codefix {
}
else if (isRequireCall(initializer, /*checkArgumentIsStringLiteralLike*/ true)) {
foundImport = true;
return convertSingleImport(sourceFile, name, initializer.arguments[0], changes, checker, identifiers, target);
return convertSingleImport(sourceFile, name, initializer.arguments[0], changes, checker, identifiers, target, preferences);
}
else if (isPropertyAccessExpression(initializer) && isRequireCall(initializer.expression, /*checkArgumentIsStringLiteralLike*/ true)) {
foundImport = true;
return convertPropertyAccessImport(name, initializer.name.text, initializer.expression.arguments[0], identifiers);
return convertPropertyAccessImport(name, initializer.name.text, initializer.expression.arguments[0], identifiers, preferences);
}
}
// Move it out to its own variable statement. (This will not be used if `!foundImport`)
@@ -155,20 +155,20 @@ namespace ts.codefix {
}
/** Converts `const name = require("moduleSpecifier").propertyName` */
function convertPropertyAccessImport(name: BindingName, propertyName: string, moduleSpecifier: StringLiteralLike, identifiers: Identifiers): ReadonlyArray<Node> {
function convertPropertyAccessImport(name: BindingName, propertyName: string, moduleSpecifier: StringLiteralLike, identifiers: Identifiers, preferences: UserPreferences): ReadonlyArray<Node> {
switch (name.kind) {
case SyntaxKind.ObjectBindingPattern:
case SyntaxKind.ArrayBindingPattern: {
// `const [a, b] = require("c").d` --> `import { d } from "c"; const [a, b] = d;`
const tmp = makeUniqueName(propertyName, identifiers);
return [
makeSingleImport(tmp, propertyName, moduleSpecifier),
makeSingleImport(tmp, propertyName, moduleSpecifier, preferences),
makeConst(/*modifiers*/ undefined, name, createIdentifier(tmp)),
];
}
case SyntaxKind.Identifier:
// `const a = require("b").c` --> `import { c as a } from "./b";
return [makeSingleImport(name.text, propertyName, moduleSpecifier)];
return [makeSingleImport(name.text, propertyName, moduleSpecifier, preferences)];
default:
return Debug.assertNever(name);
}
@@ -340,6 +340,7 @@ namespace ts.codefix {
checker: TypeChecker,
identifiers: Identifiers,
target: ScriptTarget,
preferences: UserPreferences,
): ReadonlyArray<Node> {
switch (name.kind) {
case SyntaxKind.ObjectBindingPattern: {
@@ -348,7 +349,7 @@ namespace ts.codefix {
? undefined
: makeImportSpecifier(e.propertyName && (e.propertyName as Identifier).text, e.name.text)); // tslint:disable-line no-unnecessary-type-assertion (TODO: GH#18217)
if (importSpecifiers) {
return [makeImport(/*name*/ undefined, importSpecifiers, moduleSpecifier)];
return [makeImport(/*name*/ undefined, importSpecifiers, moduleSpecifier, preferences)];
}
}
// falls through -- object destructuring has an interesting pattern and must be a variable declaration
@@ -359,12 +360,12 @@ namespace ts.codefix {
*/
const tmp = makeUniqueName(moduleSpecifierToValidIdentifier(moduleSpecifier.text, target), identifiers);
return [
makeImport(createIdentifier(tmp), /*namedImports*/ undefined, moduleSpecifier),
makeImport(createIdentifier(tmp), /*namedImports*/ undefined, moduleSpecifier, preferences),
makeConst(/*modifiers*/ undefined, getSynthesizedDeepClone(name), createIdentifier(tmp)),
];
}
case SyntaxKind.Identifier:
return convertSingleIdentifierImport(file, name, moduleSpecifier, changes, checker, identifiers);
return convertSingleIdentifierImport(file, name, moduleSpecifier, changes, checker, identifiers, preferences);
default:
return Debug.assertNever(name);
}
@@ -374,7 +375,7 @@ namespace ts.codefix {
* Convert `import x = require("x").`
* Also converts uses like `x.y()` to `y()` and uses a named import.
*/
function convertSingleIdentifierImport(file: SourceFile, name: Identifier, moduleSpecifier: StringLiteralLike, changes: textChanges.ChangeTracker, checker: TypeChecker, identifiers: Identifiers): ReadonlyArray<Node> {
function convertSingleIdentifierImport(file: SourceFile, name: Identifier, moduleSpecifier: StringLiteralLike, changes: textChanges.ChangeTracker, checker: TypeChecker, identifiers: Identifiers, preferences: UserPreferences): ReadonlyArray<Node> {
const nameSymbol = checker.getSymbolAtLocation(name);
// Maps from module property name to name actually used. (The same if there isn't shadowing.)
const namedBindingsNames = createMap<string>();
@@ -409,7 +410,7 @@ namespace ts.codefix {
// If it was unused, ensure that we at least import *something*.
needDefaultImport = true;
}
return [makeImport(needDefaultImport ? getSynthesizedDeepClone(name) : undefined, namedBindings, moduleSpecifier)];
return [makeImport(needDefaultImport ? getSynthesizedDeepClone(name) : undefined, namedBindings, moduleSpecifier, preferences)];
}
// Identifiers helpers
@@ -481,10 +482,10 @@ namespace ts.codefix {
getSynthesizedDeepClones(cls.members));
}
function makeSingleImport(localName: string, propertyName: string, moduleSpecifier: StringLiteralLike): ImportDeclaration {
function makeSingleImport(localName: string, propertyName: string, moduleSpecifier: StringLiteralLike, preferences: UserPreferences): ImportDeclaration {
return propertyName === "default"
? makeImport(createIdentifier(localName), /*namedImports*/ undefined, moduleSpecifier)
: makeImport(/*name*/ undefined, [makeImportSpecifier(propertyName, localName)], moduleSpecifier);
? makeImport(createIdentifier(localName), /*namedImports*/ undefined, moduleSpecifier, preferences)
: makeImport(/*name*/ undefined, [makeImportSpecifier(propertyName, localName)], moduleSpecifier, preferences);
}
function makeImportSpecifier(propertyName: string | undefined, name: string): ImportSpecifier {
@@ -28,7 +28,7 @@ namespace ts.codefix {
const variations: CodeFixAction[] = [];
// import Bluebird from "bluebird";
variations.push(createAction(context, sourceFile, node, makeImport(namespace.name, /*namedImports*/ undefined, node.moduleSpecifier)));
variations.push(createAction(context, sourceFile, node, makeImport(namespace.name, /*namedImports*/ undefined, node.moduleSpecifier, context.preferences)));
if (getEmitModuleKind(opts) === ModuleKind.CommonJS) {
// import Bluebird = require("bluebird");
+51 -63
View File
@@ -10,15 +10,14 @@ namespace ts.codefix {
Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code,
Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here.code,
],
getCodeActions: getImportCodeActions,
getCodeActions: context => context.errorCode === Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code
? getActionsForUMDImport(context)
: getActionsForNonUMDImport(context),
// TODO: GH#20315
fixIds: [],
getAllCodeActions: notImplemented,
});
// Map from module Id to an array of import declarations in that module.
type ImportDeclarationMap = ExistingImportInfo[][];
interface SymbolContext extends textChanges.TextChangesContext {
sourceFile: SourceFile;
symbolName: string;
@@ -30,7 +29,6 @@ namespace ts.codefix {
checker: TypeChecker;
compilerOptions: CompilerOptions;
getCanonicalFileName: GetCanonicalFileName;
cachedImportDeclarations?: ImportDeclarationMap;
preferences: UserPreferences;
}
@@ -50,7 +48,6 @@ namespace ts.codefix {
program,
checker,
compilerOptions: program.getCompilerOptions(),
cachedImportDeclarations: [],
getCanonicalFileName: createGetCanonicalFileName(hostUsesCaseSensitiveFileNames(context.host)),
symbolName,
symbolToken,
@@ -130,8 +127,19 @@ namespace ts.codefix {
}
function getCodeActionsForImport_separateExistingAndNew(exportInfos: ReadonlyArray<SymbolExportInfo>, context: ImportCodeFixContext, useExisting: Push<CodeFixAction>, addNew: Push<CodeFixAction>): void {
const existingImports = flatMap(exportInfos, info =>
getImportDeclarations(info, context.checker, context.sourceFile, context.cachedImportDeclarations));
const existingImports = flatMap(exportInfos, info => getExistingImportDeclarations(info, context.checker, context.sourceFile));
append(useExisting, tryUseExistingNamespaceImport(existingImports, context, context.symbolToken, context.checker));
const addToExisting = tryAddToExistingImport(existingImports, context);
if (addToExisting) {
useExisting.push(addToExisting);
}
else { // Don't bother providing an action to add a new import if we can add to an existing one.
getCodeActionsForAddImport(exportInfos, context, existingImports, addNew);
}
}
function tryUseExistingNamespaceImport(existingImports: ReadonlyArray<ExistingImportInfo>, context: SymbolContext, symbolToken: Node | undefined, checker: TypeChecker): CodeFixAction | undefined {
// It is possible that multiple import statements with the same specifier exist in the file.
// e.g.
//
@@ -144,18 +152,26 @@ namespace ts.codefix {
// 1. change "member3" to "ns.member3"
// 2. add "member3" to the second import statement's import list
// and it is up to the user to decide which one fits best.
if (context.symbolToken && isIdentifier(context.symbolToken)) {
for (const { declaration } of existingImports) {
const namespace = getNamespaceImportName(declaration);
if (namespace) {
const moduleSymbol = context.checker.getAliasedSymbol(context.checker.getSymbolAtLocation(namespace)!);
if (moduleSymbol && moduleSymbol.exports!.has(escapeLeadingUnderscores(context.symbolName))) {
useExisting.push(getCodeActionForUseExistingNamespaceImport(namespace.text, context, context.symbolToken));
}
return !symbolToken || !isIdentifier(symbolToken) ? undefined : firstDefined(existingImports, ({ declaration }) => {
const namespace = getNamespaceImportName(declaration);
if (namespace) {
const moduleSymbol = namespace && checker.getAliasedSymbol(checker.getSymbolAtLocation(namespace)!);
if (moduleSymbol && moduleSymbol.exports!.has(escapeLeadingUnderscores(context.symbolName))) {
return getCodeActionForUseExistingNamespaceImport(namespace.text, context, symbolToken);
}
}
}
getCodeActionsForAddImport(exportInfos, context, existingImports, useExisting, addNew);
});
}
function tryAddToExistingImport(existingImports: ReadonlyArray<ExistingImportInfo>, context: SymbolContext): CodeFixAction | undefined {
return firstDefined(existingImports, ({ declaration, importKind }) => {
if (declaration.kind === SyntaxKind.ImportDeclaration && declaration.importClause) {
const changes = tryUpdateExistingImport(context, declaration.importClause, importKind);
if (changes) {
const moduleSpecifierWithoutQuotes = stripQuotes(declaration.moduleSpecifier.getText());
return createCodeAction(Diagnostics.Add_0_to_existing_import_declaration_from_1, [context.symbolName, moduleSpecifierWithoutQuotes], changes);
}
}
});
}
function getNamespaceImportName(declaration: AnyImportSyntax): Identifier | undefined {
@@ -168,18 +184,12 @@ namespace ts.codefix {
}
}
// TODO(anhans): This doesn't seem important to cache... just use an iterator instead of creating a new array?
function getImportDeclarations({ moduleSymbol, importKind }: SymbolExportInfo, checker: TypeChecker, { imports }: SourceFile, cachedImportDeclarations: ImportDeclarationMap = []): ReadonlyArray<ExistingImportInfo> {
const moduleSymbolId = getUniqueSymbolId(moduleSymbol, checker);
let cached = cachedImportDeclarations[moduleSymbolId];
if (!cached) {
cached = cachedImportDeclarations[moduleSymbolId] = mapDefined<StringLiteralLike, ExistingImportInfo>(imports, moduleSpecifier => {
const i = importFromModuleSpecifier(moduleSpecifier);
return (i.kind === SyntaxKind.ImportDeclaration || i.kind === SyntaxKind.ImportEqualsDeclaration)
&& checker.getSymbolAtLocation(moduleSpecifier) === moduleSymbol ? { declaration: i, importKind } : undefined;
});
}
return cached;
function getExistingImportDeclarations({ moduleSymbol, importKind }: SymbolExportInfo, checker: TypeChecker, { imports }: SourceFile): ReadonlyArray<ExistingImportInfo> {
return mapDefined<StringLiteralLike, ExistingImportInfo>(imports, moduleSpecifier => {
const i = importFromModuleSpecifier(moduleSpecifier);
return (i.kind === SyntaxKind.ImportDeclaration || i.kind === SyntaxKind.ImportEqualsDeclaration)
&& checker.getSymbolAtLocation(moduleSpecifier) === moduleSymbol ? { declaration: i, importKind } : undefined;
});
}
function getCodeActionForNewImport(context: SymbolContext & { preferences: UserPreferences }, { moduleSpecifier, importKind }: NewImportInfo): CodeFixAction {
@@ -258,23 +268,8 @@ namespace ts.codefix {
exportInfos: ReadonlyArray<SymbolExportInfo>,
ctx: ImportCodeFixContext,
existingImports: ReadonlyArray<ExistingImportInfo>,
useExisting: Push<CodeFixAction>,
addNew: Push<CodeFixAction>,
): void {
const fromExistingImport = firstDefined(existingImports, ({ declaration, importKind }) => {
if (declaration.kind === SyntaxKind.ImportDeclaration && declaration.importClause) {
const changes = tryUpdateExistingImport(ctx, (isImportClause(declaration.importClause) && declaration.importClause || undefined)!, importKind); // TODO: GH#18217
if (changes) {
const moduleSpecifierWithoutQuotes = stripQuotes(declaration.moduleSpecifier.getText());
return createCodeAction(Diagnostics.Add_0_to_existing_import_declaration_from_1, [ctx.symbolName, moduleSpecifierWithoutQuotes], changes);
}
}
});
if (fromExistingImport) {
useExisting.push(fromExistingImport);
return;
}
const existingDeclaration = firstDefined(existingImports, newImportInfoFromExistingSpecifier);
const newImportInfos = existingDeclaration
? [existingDeclaration]
@@ -348,12 +343,6 @@ namespace ts.codefix {
return createCodeAction(Diagnostics.Change_0_to_1, [symbolName, `${namespacePrefix}.${symbolName}`], changes);
}
function getImportCodeActions(context: CodeFixContext): CodeFixAction[] | undefined {
return context.errorCode === Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code
? getActionsForUMDImport(context)
: getActionsForNonUMDImport(context);
}
function getActionsForUMDImport(context: CodeFixContext): CodeFixAction[] | undefined {
const token = getTokenAtPosition(context.sourceFile, context.span.start, /*includeJsDocComment*/ false);
const checker = context.program.getTypeChecker();
@@ -422,11 +411,18 @@ namespace ts.codefix {
? checker.getJsxNamespace()
: isIdentifier(symbolToken) ? symbolToken.text : undefined;
if (!symbolName) return undefined;
// "default" is a keyword and not a legal identifier for the import, so we don't expect it here
Debug.assert(symbolName !== "default");
const currentTokenMeaning = getMeaningFromLocation(symbolToken);
const addToExistingDeclaration: CodeFixAction[] = [];
const addNewDeclaration: CodeFixAction[] = [];
getExportInfos(symbolName, getMeaningFromLocation(symbolToken), cancellationToken, sourceFile, checker, program).forEach(exportInfos => {
getCodeActionsForImport_separateExistingAndNew(exportInfos, convertToImportCodeFixContext(context, symbolToken, symbolName), addToExistingDeclaration, addNewDeclaration);
});
return [...addToExistingDeclaration, ...addNewDeclaration];
}
function getExportInfos(symbolName: string, currentTokenMeaning: SemanticMeaning, cancellationToken: CancellationToken, sourceFile: SourceFile, checker: TypeChecker, program: Program): ReadonlyMap<ReadonlyArray<SymbolExportInfo>> {
// For each original symbol, keep all re-exports of that symbol together so we can call `getCodeActionsForImport` on the whole group at once.
// Maps symbol id to info for modules providing that symbol (original export + re-exports).
const originalSymbolToExportInfos = createMultiMap<SymbolExportInfo>();
@@ -464,20 +460,12 @@ namespace ts.codefix {
}
else if (isExportSpecifier(declaration)) {
Debug.assert(declaration.name.escapedText === InternalSymbolName.Default);
if (declaration.propertyName) {
return declaration.propertyName.escapedText;
}
return declaration.propertyName && declaration.propertyName.escapedText;
}
});
}
});
const addToExistingDeclaration: CodeFixAction[] = [];
const addNewDeclaration: CodeFixAction[] = [];
originalSymbolToExportInfos.forEach(exportInfos => {
getCodeActionsForImport_separateExistingAndNew(exportInfos, convertToImportCodeFixContext(context, symbolToken, symbolName), addToExistingDeclaration, addNewDeclaration);
});
return [...addToExistingDeclaration, ...addNewDeclaration];
return originalSymbolToExportInfos;
}
function checkSymbolHasMeaning({ declarations }: Symbol, meaning: SemanticMeaning): boolean {
+4 -4
View File
@@ -8,13 +8,13 @@ namespace ts.codefix {
const { sourceFile, span: { start } } = context;
const info = getInfo(sourceFile, start);
if (!info) return undefined;
const changes = textChanges.ChangeTracker.with(context, t => doChange(t, sourceFile, info));
const changes = textChanges.ChangeTracker.with(context, t => doChange(t, sourceFile, info, context.preferences));
return [createCodeFixAction(fixId, changes, Diagnostics.Convert_to_default_import, fixId, Diagnostics.Convert_all_to_default_imports)];
},
fixIds: [fixId],
getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => {
const info = getInfo(diag.file, diag.start);
if (info) doChange(changes, diag.file, info);
if (info) doChange(changes, diag.file, info, context.preferences);
}),
});
@@ -36,7 +36,7 @@ namespace ts.codefix {
}
}
function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, info: Info): void {
changes.replaceNode(sourceFile, info.importNode, makeImport(info.name, /*namedImports*/ undefined, info.moduleSpecifier));
function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, info: Info, preferences: UserPreferences): void {
changes.replaceNode(sourceFile, info.importNode, makeImport(info.name, /*namedImports*/ undefined, info.moduleSpecifier, preferences));
}
}
+7
View File
@@ -895,6 +895,7 @@ namespace ts.Completions {
node = (parent as QualifiedName).left;
break;
case SyntaxKind.ImportType:
case SyntaxKind.MetaProperty:
node = parent;
break;
default:
@@ -1061,6 +1062,12 @@ namespace ts.Completions {
}
}
if (isMetaProperty(node) && (node.keywordToken === SyntaxKind.NewKeyword || node.keywordToken === SyntaxKind.ImportKeyword)) {
const completion = (node.keywordToken === SyntaxKind.NewKeyword) ? "target" : "meta";
symbols.push(typeChecker.createSymbol(SymbolFlags.Property, escapeLeadingUnderscores(completion)));
return;
}
if (!isTypeLocation) {
addTypeProperties(typeChecker.getTypeAtLocation(node)!);
}
+12 -11
View File
@@ -10,7 +10,7 @@ namespace ts.refactor {
getEditsForAction(context, actionName): RefactorEditInfo {
Debug.assert(actionName === refactorName);
const statements = Debug.assertDefined(getStatementsToMove(context));
const edits = textChanges.ChangeTracker.with(context, t => doChange(context.file, context.program, statements, t, context.host));
const edits = textChanges.ChangeTracker.with(context, t => doChange(context.file, context.program, statements, t, context.host, context.preferences));
return { edits, renameFilename: undefined, renameLocation: undefined };
}
});
@@ -37,7 +37,7 @@ namespace ts.refactor {
return statements.slice(startNodeIndex, afterEndNodeIndex === -1 ? statements.length : afterEndNodeIndex);
}
function doChange(oldFile: SourceFile, program: Program, toMove: ToMove, changes: textChanges.ChangeTracker, host: LanguageServiceHost): void {
function doChange(oldFile: SourceFile, program: Program, toMove: ToMove, changes: textChanges.ChangeTracker, host: LanguageServiceHost, preferences: UserPreferences): void {
const checker = program.getTypeChecker();
const usage = getUsageInfo(oldFile, toMove.all, checker);
@@ -47,7 +47,7 @@ namespace ts.refactor {
const newFileNameWithExtension = newModuleName + extension;
// If previous file was global, this is easy.
changes.createNewFile(oldFile, combinePaths(currentDirectory, newFileNameWithExtension), getNewStatements(oldFile, usage, changes, toMove, program, newModuleName));
changes.createNewFile(oldFile, combinePaths(currentDirectory, newFileNameWithExtension), getNewStatements(oldFile, usage, changes, toMove, program, newModuleName, preferences));
addNewFileToTsconfig(program, changes, oldFile.fileName, newFileNameWithExtension, hostGetCanonicalFileName(host));
}
@@ -103,7 +103,7 @@ namespace ts.refactor {
}
function getNewStatements(
oldFile: SourceFile, usage: UsageInfo, changes: textChanges.ChangeTracker, toMove: ToMove, program: Program, newModuleName: string,
oldFile: SourceFile, usage: UsageInfo, changes: textChanges.ChangeTracker, toMove: ToMove, program: Program, newModuleName: string, preferences: UserPreferences,
): ReadonlyArray<Statement> {
const checker = program.getTypeChecker();
@@ -113,7 +113,7 @@ namespace ts.refactor {
}
const useEs6ModuleSyntax = !!oldFile.externalModuleIndicator;
const importsFromNewFile = createOldFileImportsFromNewFile(usage.oldFileImportsFromNewFile, newModuleName, useEs6ModuleSyntax);
const importsFromNewFile = createOldFileImportsFromNewFile(usage.oldFileImportsFromNewFile, newModuleName, useEs6ModuleSyntax, preferences);
if (importsFromNewFile) {
changes.insertNodeBefore(oldFile, oldFile.statements[0], importsFromNewFile, /*blankLineBetween*/ true);
}
@@ -124,7 +124,7 @@ namespace ts.refactor {
updateImportsInOtherFiles(changes, program, oldFile, usage.movedSymbols, newModuleName);
return [
...getNewFileImportsAndAddExportInOldFile(oldFile, usage.oldImportsNeededByNewFile, usage.newFileImportsFromOldFile, changes, checker, useEs6ModuleSyntax),
...getNewFileImportsAndAddExportInOldFile(oldFile, usage.oldImportsNeededByNewFile, usage.newFileImportsFromOldFile, changes, checker, useEs6ModuleSyntax, preferences),
...addExports(oldFile, toMove.all, usage.oldFileImportsFromNewFile, useEs6ModuleSyntax),
];
}
@@ -196,7 +196,7 @@ namespace ts.refactor {
| ImportEqualsDeclaration
| VariableStatement;
function createOldFileImportsFromNewFile(newFileNeedExport: ReadonlySymbolSet, newFileNameWithExtension: string, useEs6Imports: boolean): Statement | undefined {
function createOldFileImportsFromNewFile(newFileNeedExport: ReadonlySymbolSet, newFileNameWithExtension: string, useEs6Imports: boolean, preferences: UserPreferences): Statement | undefined {
let defaultImport: Identifier | undefined;
const imports: string[] = [];
newFileNeedExport.forEach(symbol => {
@@ -207,14 +207,14 @@ namespace ts.refactor {
imports.push(symbol.name);
}
});
return makeImportOrRequire(defaultImport, imports, newFileNameWithExtension, useEs6Imports);
return makeImportOrRequire(defaultImport, imports, newFileNameWithExtension, useEs6Imports, preferences);
}
function makeImportOrRequire(defaultImport: Identifier | undefined, imports: ReadonlyArray<string>, path: string, useEs6Imports: boolean): Statement | undefined {
function makeImportOrRequire(defaultImport: Identifier | undefined, imports: ReadonlyArray<string>, path: string, useEs6Imports: boolean, preferences: UserPreferences): Statement | undefined {
path = ensurePathIsNonModuleName(path);
if (useEs6Imports) {
const specifiers = imports.map(i => createImportSpecifier(/*propertyName*/ undefined, createIdentifier(i)));
return makeImportIfNecessary(defaultImport, specifiers, path);
return makeImportIfNecessary(defaultImport, specifiers, path, preferences);
}
else {
Debug.assert(!defaultImport); // If there's a default export, it should have been an es6 module.
@@ -320,6 +320,7 @@ namespace ts.refactor {
changes: textChanges.ChangeTracker,
checker: TypeChecker,
useEs6ModuleSyntax: boolean,
preferences: UserPreferences,
): ReadonlyArray<SupportedImportStatement> {
const copiedOldImports: SupportedImportStatement[] = [];
for (const oldStatement of oldFile.statements) {
@@ -351,7 +352,7 @@ namespace ts.refactor {
}
});
append(copiedOldImports, makeImportOrRequire(oldFileDefault, oldFileNamedImports, removeFileExtension(getBaseFileName(oldFile.fileName)), useEs6ModuleSyntax));
append(copiedOldImports, makeImportOrRequire(oldFileDefault, oldFileNamedImports, removeFileExtension(getBaseFileName(oldFile.fileName)), useEs6ModuleSyntax, preferences));
return copiedOldImports;
}
+7 -3
View File
@@ -687,7 +687,7 @@ namespace ts.textChanges {
this.finishTrailingCommaAfterDeletingNodesInList();
const changes = changesToText.getTextChangesFromChanges(this.changes, this.newLineCharacter, this.formatContext, validate);
for (const { oldFile, fileName, statements } of this.newFiles) {
changes.push(changesToText.newFileChanges(oldFile, fileName, statements, this.newLineCharacter));
changes.push(changesToText.newFileChanges(oldFile, fileName, statements, this.newLineCharacter, this.formatContext));
}
return changes;
}
@@ -726,8 +726,12 @@ namespace ts.textChanges {
});
}
export function newFileChanges(oldFile: SourceFile, fileName: string, statements: ReadonlyArray<Statement>, newLineCharacter: string): FileTextChanges {
const text = statements.map(s => getNonformattedText(s, oldFile, newLineCharacter).text).join(newLineCharacter);
export function newFileChanges(oldFile: SourceFile, fileName: string, statements: ReadonlyArray<Statement>, newLineCharacter: string, formatContext: formatting.FormatContext): FileTextChanges {
// TODO: this emits the file, parses it back, then formats it that -- may be a less roundabout way to do this
const nonFormattedText = statements.map(s => getNonformattedText(s, oldFile, newLineCharacter).text).join(newLineCharacter);
const sourceFile = createSourceFile(fileName, nonFormattedText, ScriptTarget.ESNext);
const changes = formatting.formatDocument(sourceFile, formatContext);
const text = applyChanges(nonFormattedText, changes);
return { fileName, textChanges: [createTextChange(createTextSpan(0, 0), text)], isNewFile: true };
}
+5 -5
View File
@@ -1252,18 +1252,18 @@ namespace ts {
return createGetCanonicalFileName(hostUsesCaseSensitiveFileNames(host));
}
export function makeImportIfNecessary(defaultImport: Identifier | undefined, namedImports: ReadonlyArray<ImportSpecifier> | undefined, moduleSpecifier: string): ImportDeclaration | undefined {
return defaultImport || namedImports && namedImports.length ? makeImport(defaultImport, namedImports, moduleSpecifier) : undefined;
export function makeImportIfNecessary(defaultImport: Identifier | undefined, namedImports: ReadonlyArray<ImportSpecifier> | undefined, moduleSpecifier: string, preferences: UserPreferences): ImportDeclaration | undefined {
return defaultImport || namedImports && namedImports.length ? makeImport(defaultImport, namedImports, moduleSpecifier, preferences) : undefined;
}
export function makeImport(defaultImport: Identifier | undefined, namedImports: ReadonlyArray<ImportSpecifier> | undefined, moduleSpecifier: string | Expression): ImportDeclaration {
export function makeImport(defaultImport: Identifier | undefined, namedImports: ReadonlyArray<ImportSpecifier> | undefined, moduleSpecifier: string | Expression, preferences: UserPreferences): ImportDeclaration {
return createImportDeclaration(
/*decorators*/ undefined,
/*modifiers*/ undefined,
defaultImport || namedImports
? createImportClause(defaultImport, namedImports && namedImports.length ? createNamedImports(namedImports) : undefined)
: undefined,
typeof moduleSpecifier === "string" ? createLiteral(moduleSpecifier) : moduleSpecifier);
typeof moduleSpecifier === "string" ? createLiteral(moduleSpecifier, preferences.quotePreference === "single") : moduleSpecifier);
}
export function symbolNameNoDefault(symbol: Symbol): string | undefined {
@@ -1473,7 +1473,7 @@ namespace ts {
export function typeToDisplayParts(typechecker: TypeChecker, type: Type, enclosingDeclaration?: Node, flags: TypeFormatFlags = TypeFormatFlags.None): SymbolDisplayPart[] {
return mapToDisplayParts(writer => {
typechecker.writeType(type, enclosingDeclaration, flags | TypeFormatFlags.MultilineObjectLiterals, writer);
typechecker.writeType(type, enclosingDeclaration, flags | TypeFormatFlags.MultilineObjectLiterals | TypeFormatFlags.UseAliasDefinedOutsideCurrentScope, writer);
});
}
@@ -19,8 +19,8 @@ for (; ;) {
//// [SystemModuleForStatementNoInitializer.js]
System.register([], function (exports_1, context_1) {
var i, limit;
"use strict";
var i, limit;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -17,8 +17,8 @@ module M {
//// [aliasesInSystemModule1.js]
System.register(["foo"], function (exports_1, context_1) {
var alias, cls, cls2, x, y, z, M;
"use strict";
var alias, cls, cls2, x, y, z, M;
var __moduleName = context_1 && context_1.id;
return {
setters: [
@@ -16,8 +16,8 @@ module M {
//// [aliasesInSystemModule2.js]
System.register(["foo"], function (exports_1, context_1) {
var foo_1, cls, cls2, x, y, z, M;
"use strict";
var foo_1, cls, cls2, x, y, z, M;
var __moduleName = context_1 && context_1.id;
return {
setters: [
@@ -11,8 +11,8 @@ export class Foo {
//// [a.js]
System.register(["./b"], function (exports_1, context_1) {
var b_1, x;
"use strict";
var b_1, x;
var __moduleName = context_1 && context_1.id;
return {
setters: [
@@ -12,8 +12,8 @@ export class Foo {
//// [b.js]
System.register([], function (exports_1, context_1) {
var Foo;
"use strict";
var Foo;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -29,8 +29,8 @@ System.register([], function (exports_1, context_1) {
});
//// [a.js]
System.register(["./b"], function (exports_1, context_1) {
var b_1, x;
"use strict";
var b_1, x;
var __moduleName = context_1 && context_1.id;
return {
setters: [
@@ -13,8 +13,8 @@ export var x = new Foo();
//// [a.js]
System.register(["./b"], function (exports_1, context_1) {
var b_1, x;
"use strict";
var b_1, x;
var __moduleName = context_1 && context_1.id;
return {
setters: [
@@ -13,8 +13,8 @@ export var x = new Foo();
//// [a.js]
System.register(["./b"], function (exports_1, context_1) {
var b_1, x;
"use strict";
var b_1, x;
var __moduleName = context_1 && context_1.id;
return {
setters: [
@@ -12,8 +12,8 @@ Foo.foo();
//// [a.js]
System.register(["./b"], function (exports_1, context_1) {
var b_1;
"use strict";
var b_1;
var __moduleName = context_1 && context_1.id;
return {
setters: [
@@ -12,8 +12,8 @@ Foo.foo();
//// [a.js]
System.register(["./b"], function (exports_1, context_1) {
var b_1;
"use strict";
var b_1;
var __moduleName = context_1 && context_1.id;
return {
setters: [
@@ -8,8 +8,8 @@ export default function() {}
//// [a.js]
System.register([], function (exports_1, context_1) {
var default_1;
"use strict";
var default_1;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -1,8 +1,8 @@
=== tests/cases/conformance/jsdoc/namespaced.js ===
/**
* @callback NS.Nested.Inner
* @param {string} space - spaaaaaaaaace
* @param {string} peace - peaaaaaaaaace
* @param {Object} space - spaaaaaaaaace
* @param {Object} peace - peaaaaaaaaace
* @return {string | number}
*/
var x = 1;
@@ -1,8 +1,8 @@
=== tests/cases/conformance/jsdoc/namespaced.js ===
/**
* @callback NS.Nested.Inner
* @param {string} space - spaaaaaaaaace
* @param {string} peace - peaaaaaaaaace
* @param {Object} space - spaaaaaaaaace
* @param {Object} peace - peaaaaaaaaace
* @return {string | number}
*/
var x = 1;
@@ -11,9 +11,9 @@ var x = 1;
/** @type {NS.Nested.Inner} */
function f(space, peace) {
>f : (space: string, peace: string) => string
>space : string
>peace : string
>f : (space: any, peace: any) => string
>space : any
>peace : any
return '1'
>'1' : "1"
@@ -144,8 +144,8 @@ for (const y = 0; y < 1;) {
//// [capturedLetConstInLoop4.js]
System.register([], function (exports_1, context_1) {
var v0, v00, v1, v2, v3, v4, v5, v6, v7, v8, v0_c, v00_c, v1_c, v2_c, v3_c, v4_c, v5_c, v6_c, v7_c, v8_c;
"use strict";
var v0, v00, v1, v2, v3, v4, v5, v6, v7, v8, v0_c, v00_c, v1_c, v2_c, v3_c, v4_c, v5_c, v6_c, v7_c, v8_c;
var __moduleName = context_1 && context_1.id;
//======let
function exportedFoo() {
@@ -1,25 +0,0 @@
tests/cases/compiler/a.js(14,10): error TS2424: Class 'A' defines instance member function 'foo', but extended class 'B' defines it as instance member property.
==== tests/cases/compiler/a.js (1 errors) ====
// @ts-check
class A {
constructor() {
}
foo() {
return 4;
}
}
class B extends A {
constructor() {
super();
this.foo = () => 3;
~~~
!!! error TS2424: Class 'A' defines instance member function 'foo', but extended class 'B' defines it as instance member property.
}
}
const i = new B();
i.foo();
@@ -9,6 +9,7 @@ export class Testing123 {
//// [a.js]
System.register([], function (exports_1, context_1) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -16,7 +17,6 @@ System.register([], function (exports_1, context_1) {
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var Testing123_1, Testing123;
"use strict";
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -6,6 +6,7 @@ export class Testing123 { }
//// [a.js]
System.register([], function (exports_1, context_1) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -13,7 +14,6 @@ System.register([], function (exports_1, context_1) {
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var Testing123_1, Testing123;
"use strict";
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -14,6 +14,7 @@ export default class {}
//// [a.js]
System.register([], function (exports_1, context_1) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -21,7 +22,6 @@ System.register([], function (exports_1, context_1) {
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var decorator, Foo;
"use strict";
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -37,6 +37,7 @@ System.register([], function (exports_1, context_1) {
});
//// [b.js]
System.register([], function (exports_1, context_1) {
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -44,7 +45,6 @@ System.register([], function (exports_1, context_1) {
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var decorator, default_1;
"use strict";
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -10,8 +10,8 @@ console.log(A + B + C + D + E + F)
//// [deduplicateImportsInSystem.js]
System.register(["f1", "f2", "f3"], function (exports_1, context_1) {
var f1_1, f2_1, f3_1, f2_2, f2_3, f1_2;
"use strict";
var f1_1, f2_1, f3_1, f2_2, f2_3, f1_2;
var __moduleName = context_1 && context_1.id;
return {
setters: [
@@ -9,8 +9,8 @@ export default function foo() {}
//// [a.js]
System.register([], function (exports_1, context_1) {
var Foo;
"use strict";
var Foo;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -26,8 +26,8 @@ export { nonexportedFoo };
export { exportedFoo as foo, nonexportedFoo as nfoo };
//// [destructuringAssignmentWithExportedName.js]
var _a, _b, _c, _d, _e;
"use strict";
var _a, _b, _c, _d, _e;
Object.defineProperty(exports, "__esModule", { value: true });
exports.foo = exports.exportedFoo;
let nonexportedFoo;
@@ -7,8 +7,8 @@ export let { toString } = 1;
//// [destructuringInVariableDeclarations7.js]
System.register([], function (exports_1, context_1) {
var toString;
"use strict";
var toString;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -8,8 +8,8 @@ export {};
//// [destructuringInVariableDeclarations8.js]
System.register([], function (exports_1, context_1) {
var toString;
"use strict";
var toString;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -9,8 +9,8 @@ export function bar() {
//// [dottedNamesInSystem.js]
System.register([], function (exports_1, context_1) {
var A;
"use strict";
var A;
var __moduleName = context_1 && context_1.id;
function bar() {
return A.B.C.foo();
+1 -1
View File
@@ -15,8 +15,8 @@ export default class A
//// [es5-system.js]
System.register([], function (exports_1, context_1) {
var A;
"use strict";
var A;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
+1 -1
View File
@@ -3,8 +3,8 @@ export var __esModule = 1;
//// [es5-system2.js]
System.register([], function (exports_1, context_1) {
var __esModule;
"use strict";
var __esModule;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -35,8 +35,8 @@ export let h1: D = new D;
//// [exportNonInitializedVariablesSystem.js]
System.register([], function (exports_1, context_1) {
var a, b, c, d, A, e, f, B, C, a1, b1, c1, d1, D, e1, f1, g1, h1;
"use strict";
var a, b, c, d, A, e, f, B, C, a1, b1, c1, d1, D, e1, f1, g1, h1;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -13,8 +13,8 @@ var x = 1;
//// [file0.js]
System.register([], function (exports_1, context_1) {
var v;
"use strict";
var v;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -35,8 +35,8 @@ System.register([], function (exports_1, context_1) {
});
//// [file2.js]
System.register(["file0"], function (exports_1, context_1) {
var x;
"use strict";
var x;
var __moduleName = context_1 && context_1.id;
function exportStar_1(m) {
var exports = {};
@@ -19,8 +19,8 @@ System.register([], function (exports_1, context_1) {
});
//// [file2.js]
System.register([], function (exports_1, context_1) {
var x;
"use strict";
var x;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -19,8 +19,8 @@ System.register([], function (exports_1, context_1) {
});
//// [file2.js]
System.register([], function (exports_1, context_1) {
var x;
"use strict";
var x;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -30,6 +30,7 @@ export const l = async () => {
//// [test.js]
System.register([], function (exports_1, context_1) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -66,7 +67,6 @@ System.register([], function (exports_1, context_1) {
}
};
var _this, cl1, obj, cl2, l;
"use strict";
_this = this;
var __moduleName = context_1 && context_1.id;
function fn() {
@@ -30,6 +30,7 @@ export const l = async () => {
//// [test.js]
System.register([], function (exports_1, context_1) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -66,7 +67,6 @@ System.register([], function (exports_1, context_1) {
}
};
var _this, cl1, obj, cl2, l;
"use strict";
_this = this;
var __moduleName = context_1 && context_1.id;
function fn() {
@@ -30,6 +30,7 @@ export const l = async () => {
//// [test.js]
System.register([], function (exports_1, context_1) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
@@ -39,7 +40,6 @@ System.register([], function (exports_1, context_1) {
});
};
var cl1, obj, cl2, l;
"use strict";
var __moduleName = context_1 && context_1.id;
function fn() {
return __awaiter(this, void 0, void 0, function* () {
@@ -42,8 +42,8 @@ System.register([], function (exports_1, context_1) {
});
//// [1.js]
System.register([], function (exports_1, context_1) {
var p1, p2, C, D;
"use strict";
var p1, p2, C, D;
var __moduleName = context_1 && context_1.id;
function foo() {
var p2 = context_1.import("./0");
@@ -42,8 +42,8 @@ System.register([], function (exports_1, context_1) {
});
//// [1.js]
System.register([], function (exports_1, context_1) {
var p1, p2, C, D;
"use strict";
var p1, p2, C, D;
var __moduleName = context_1 && context_1.id;
function foo() {
const p2 = context_1.import("./0");
@@ -30,8 +30,8 @@ System.register([], function (exports_1, context_1) {
});
//// [1.js]
System.register([], function (exports_1, context_1) {
var p1, p2;
"use strict";
var p1, p2;
var __moduleName = context_1 && context_1.id;
function foo() {
const p2 = context_1.import("./0");
@@ -18,8 +18,8 @@ foo(import("./0"));
//// [0.js]
System.register([], function (exports_1, context_1) {
var B;
"use strict";
var B;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -15,8 +15,8 @@ foo();
//// [0.js]
System.register([], function (exports_1, context_1) {
var B;
"use strict";
var B;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -42,8 +42,8 @@ export class D {
//// [0.js]
System.register([], function (exports_1, context_1) {
var B;
"use strict";
var B;
var __moduleName = context_1 && context_1.id;
function foo() { return "foo"; }
exports_1("foo", foo);
@@ -71,8 +71,8 @@ System.register([], function (exports_1, context_1) {
});
//// [2.js]
System.register([], function (exports_1, context_1) {
var C, D;
"use strict";
var C, D;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -19,8 +19,8 @@ export declare function __awaiter(thisArg: any, _arguments: any, P: Function, ge
//// [a.js]
System.register([], function (exports_1, context_1) {
var A;
"use strict";
var A;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -36,8 +36,8 @@ System.register([], function (exports_1, context_1) {
});
//// [b.js]
System.register(["tslib", "./a"], function (exports_1, context_1) {
var tslib_1, a_1, B;
"use strict";
var tslib_1, a_1, B;
var __moduleName = context_1 && context_1.id;
var exportedNames_1 = {
"B": true
@@ -1,36 +0,0 @@
tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(8,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(8,9): error TS2416: Property 'x' in type 'b' is not assignable to the same property in base type 'a'.
Type 'string' is not assignable to type '() => string'.
tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(8,9): error TS2423: Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member accessor.
tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(11,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(11,9): error TS2416: Property 'x' in type 'b' is not assignable to the same property in base type 'a'.
Type 'string' is not assignable to type '() => string'.
==== tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts (5 errors) ====
class a {
x() {
return "20";
}
}
class b extends a {
get x() {
~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
~
!!! error TS2416: Property 'x' in type 'b' is not assignable to the same property in base type 'a'.
!!! error TS2416: Type 'string' is not assignable to type '() => string'.
~
!!! error TS2423: Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member accessor.
return "20";
}
set x(aValue: string) {
~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
~
!!! error TS2416: Property 'x' in type 'b' is not assignable to the same property in base type 'a'.
!!! error TS2416: Type 'string' is not assignable to type '() => string'.
}
}
@@ -7,10 +7,10 @@ class a {
class b extends a {
get x() {
return "20";
return () => "20";
}
set x(aValue: string) {
set x(aValue) {
}
}
@@ -40,7 +40,7 @@ var b = /** @class */ (function (_super) {
}
Object.defineProperty(b.prototype, "x", {
get: function () {
return "20";
return function () { return "20"; };
},
set: function (aValue) {
},
@@ -16,11 +16,11 @@ class b extends a {
get x() {
>x : Symbol(b.x, Decl(inheritanceMemberAccessorOverridingMethod.ts, 6, 19), Decl(inheritanceMemberAccessorOverridingMethod.ts, 9, 5))
return "20";
return () => "20";
}
set x(aValue: string) {
set x(aValue) {
>x : Symbol(b.x, Decl(inheritanceMemberAccessorOverridingMethod.ts, 6, 19), Decl(inheritanceMemberAccessorOverridingMethod.ts, 9, 5))
>aValue : Symbol(aValue, Decl(inheritanceMemberAccessorOverridingMethod.ts, 10, 10))
}
}
@@ -15,14 +15,15 @@ class b extends a {
>a : a
get x() {
>x : string
>x : () => string
return "20";
return () => "20";
>() => "20" : () => string
>"20" : "20"
}
set x(aValue: string) {
>x : string
>aValue : string
set x(aValue) {
>x : () => string
>aValue : () => string
}
}
@@ -1,15 +0,0 @@
tests/cases/compiler/inheritanceMemberPropertyOverridingMethod.ts(8,5): error TS2424: Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member property.
==== tests/cases/compiler/inheritanceMemberPropertyOverridingMethod.ts (1 errors) ====
class a {
x() {
return "20";
}
}
class b extends a {
x: () => string;
~
!!! error TS2424: Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member property.
}
@@ -8,8 +8,8 @@ import * from Zero from "./0"
//// [0.js]
System.register([], function (exports_1, context_1) {
var C;
"use strict";
var C;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -25,8 +25,8 @@ System.register([], function (exports_1, context_1) {
});
//// [1.js]
System.register([], function (exports_1, context_1) {
var from;
"use strict";
var from;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -5,8 +5,8 @@ export class Foo {}
//// [modulePrologueSystem.js]
System.register([], function (exports_1, context_1) {
var Foo;
"use strict";
var Foo;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -12,8 +12,8 @@ export default function foo() { new Foo(); }
//// [output.js]
System.register("b", ["a"], function (exports_1, context_1) {
var a_1;
"use strict";
var a_1;
var __moduleName = context_1 && context_1.id;
function foo() { new a_1.default(); }
exports_1("default", foo);
@@ -28,8 +28,8 @@ System.register("b", ["a"], function (exports_1, context_1) {
};
});
System.register("a", ["b"], function (exports_2, context_2) {
var b_1, Foo;
"use strict";
var b_1, Foo;
var __moduleName = context_2 && context_2.id;
return {
setters: [
@@ -19,8 +19,8 @@ var __extends = (this && this.__extends) || (function () {
};
})();
System.register("ref/a", [], function (exports_1, context_1) {
var A;
"use strict";
var A;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -35,8 +35,8 @@ System.register("ref/a", [], function (exports_1, context_1) {
};
});
System.register("b", ["ref/a"], function (exports_2, context_2) {
var a_1, B;
"use strict";
var a_1, B;
var __moduleName = context_2 && context_2.id;
return {
setters: [
@@ -19,8 +19,8 @@ sourceFile:tests/cases/compiler/ref/a.ts
>>> };
>>>})();
>>>System.register("ref/a", [], function (exports_1, context_1) {
>>> var A;
>>> "use strict";
>>> var A;
>>> var __moduleName = context_1 && context_1.id;
>>> return {
>>> setters: [],
@@ -86,8 +86,8 @@ sourceFile:tests/cases/compiler/b.ts
>>> };
>>>});
>>>System.register("b", ["ref/a"], function (exports_2, context_2) {
>>> var a_1, B;
>>> "use strict";
>>> var a_1, B;
>>> var __moduleName = context_2 && context_2.id;
>>> return {
>>> setters: [
@@ -31,8 +31,8 @@ if (++y) {
//// [prefixUnaryOperatorsOnExportedVariables.js]
System.register([], function (exports_1, context_1) {
var x, y;
"use strict";
var x, y;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -0,0 +1,37 @@
//// [propertyOverridingPrototype.ts]
class Base {
foo() {
}
}
class Derived extends Base {
foo: () => { };
}
//// [propertyOverridingPrototype.js]
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var Base = /** @class */ (function () {
function Base() {
}
Base.prototype.foo = function () {
};
return Base;
}());
var Derived = /** @class */ (function (_super) {
__extends(Derived, _super);
function Derived() {
return _super !== null && _super.apply(this, arguments) || this;
}
return Derived;
}(Base));
@@ -0,0 +1,18 @@
=== tests/cases/compiler/propertyOverridingPrototype.ts ===
class Base {
>Base : Symbol(Base, Decl(propertyOverridingPrototype.ts, 0, 0))
foo() {
>foo : Symbol(Base.foo, Decl(propertyOverridingPrototype.ts, 0, 12))
}
}
class Derived extends Base {
>Derived : Symbol(Derived, Decl(propertyOverridingPrototype.ts, 3, 1))
>Base : Symbol(Base, Decl(propertyOverridingPrototype.ts, 0, 0))
foo: () => { };
>foo : Symbol(Derived.foo, Decl(propertyOverridingPrototype.ts, 5, 28))
}
@@ -0,0 +1,18 @@
=== tests/cases/compiler/propertyOverridingPrototype.ts ===
class Base {
>Base : Base
foo() {
>foo : () => void
}
}
class Derived extends Base {
>Derived : Derived
>Base : Base
foo: () => { };
>foo : () => {}
}
@@ -6,8 +6,8 @@ export default Home
//// [systemDefaultExportCommentValidity.js]
System.register([], function (exports_1, context_1) {
var Home;
"use strict";
var Home;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -17,8 +17,8 @@ const _: string = repeat(new Date().toUTCString() + " ", 2);
//// [greeter.js]
System.register(["core-js/fn/string/repeat"], function (exports_1, context_1) {
var repeat_1, _;
"use strict";
var repeat_1, _;
var __moduleName = context_1 && context_1.id;
return {
setters: [
@@ -10,8 +10,8 @@ import * as a from "a";
//// [a.js]
System.register([], function (exports_1, context_1) {
var a;
"use strict";
var a;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
@@ -5,8 +5,8 @@ for (var key in obj)
//// [systemJsForInNoException.js]
System.register([], function (exports_1, context_1) {
var obj, key;
"use strict";
var obj, key;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
+1 -1
View File
@@ -3,8 +3,8 @@ export var x = 1;
//// [systemModule1.js]
System.register([], function (exports_1, context_1) {
var x;
"use strict";
var x;
var __moduleName = context_1 && context_1.id;
return {
setters: [],
+1 -1
View File
@@ -10,8 +10,8 @@ export {n2 as n3}
//// [systemModule10.js]
System.register(["file1", "file2"], function (exports_1, context_1) {
var file1_1, n2;
"use strict";
var file1_1, n2;
var __moduleName = context_1 && context_1.id;
return {
setters: [
@@ -10,8 +10,8 @@ export {n2 as n3}
//// [systemModule10_ES5.js]
System.register(["file1", "file2"], function (exports_1, context_1) {
var file1_1, n2;
"use strict";
var file1_1, n2;
var __moduleName = context_1 && context_1.id;
return {
setters: [
+3 -3
View File
@@ -38,8 +38,8 @@ export * from 'a';
//// [file1.js]
// set of tests cases that checks generation of local storage for exported names
System.register(["bar"], function (exports_1, context_1) {
var x;
"use strict";
var x;
var __moduleName = context_1 && context_1.id;
function foo() { }
exports_1("foo", foo);
@@ -66,8 +66,8 @@ System.register(["bar"], function (exports_1, context_1) {
});
//// [file2.js]
System.register(["bar"], function (exports_1, context_1) {
var x, y;
"use strict";
var x, y;
var __moduleName = context_1 && context_1.id;
var exportedNames_1 = {
"x": true,
@@ -125,8 +125,8 @@ System.register(["a", "bar"], function (exports_1, context_1) {
});
//// [file4.js]
System.register(["a"], function (exports_1, context_1) {
var x, z, z1;
"use strict";
var x, z, z1;
var __moduleName = context_1 && context_1.id;
function foo() { }
exports_1("foo", foo);

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