mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge pull request #2471 from Microsoft/revisedNameGen2
Revised name generation #2, fixes #2449, #2447
This commit is contained in:
+23
-141
@@ -5,6 +5,12 @@ module ts {
|
||||
let nextNodeId = 1;
|
||||
let nextMergeId = 1;
|
||||
|
||||
// @internal
|
||||
export function getNodeId(node: Node): number {
|
||||
if (!node.id) node.id = nextNodeId++;
|
||||
return node.id;
|
||||
}
|
||||
|
||||
/* @internal */ export let checkTime = 0;
|
||||
|
||||
/* @internal */
|
||||
@@ -264,8 +270,8 @@ module ts {
|
||||
}
|
||||
|
||||
function getNodeLinks(node: Node): NodeLinks {
|
||||
if (!node.id) node.id = nextNodeId++;
|
||||
return nodeLinks[node.id] || (nodeLinks[node.id] = {});
|
||||
let nodeId = getNodeId(node);
|
||||
return nodeLinks[nodeId] || (nodeLinks[nodeId] = {});
|
||||
}
|
||||
|
||||
function getSourceFile(node: Node): SourceFile {
|
||||
@@ -10963,134 +10969,7 @@ module ts {
|
||||
return symbol.flags & SymbolFlags.ValueModule && symbol.declarations.length === 1 && symbol.declarations[0].kind === SyntaxKind.SourceFile;
|
||||
}
|
||||
|
||||
function isNodeDescendentOf(node: Node, ancestor: Node): boolean {
|
||||
while (node) {
|
||||
if (node === ancestor) return true;
|
||||
node = node.parent;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function isUniqueLocalName(name: string, container: Node): boolean {
|
||||
for (let node = container; isNodeDescendentOf(node, container); node = node.nextContainer) {
|
||||
if (node.locals && hasProperty(node.locals, name)) {
|
||||
// We conservatively include alias symbols to cover cases where they're emitted as locals
|
||||
if (node.locals[name].flags & (SymbolFlags.Value | SymbolFlags.ExportValue | SymbolFlags.Alias)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function getGeneratedNamesForSourceFile(sourceFile: SourceFile): Map<string> {
|
||||
let links = getNodeLinks(sourceFile);
|
||||
let generatedNames = links.generatedNames;
|
||||
if (!generatedNames) {
|
||||
generatedNames = links.generatedNames = {};
|
||||
generateNames(sourceFile);
|
||||
}
|
||||
return generatedNames;
|
||||
|
||||
function generateNames(node: Node) {
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.FunctionDeclaration:
|
||||
case SyntaxKind.ClassDeclaration:
|
||||
generateNameForFunctionOrClassDeclaration(<Declaration>node);
|
||||
break;
|
||||
case SyntaxKind.ModuleDeclaration:
|
||||
generateNameForModuleOrEnum(<ModuleDeclaration>node);
|
||||
generateNames((<ModuleDeclaration>node).body);
|
||||
break;
|
||||
case SyntaxKind.EnumDeclaration:
|
||||
generateNameForModuleOrEnum(<EnumDeclaration>node);
|
||||
break;
|
||||
case SyntaxKind.ImportDeclaration:
|
||||
generateNameForImportDeclaration(<ImportDeclaration>node);
|
||||
break;
|
||||
case SyntaxKind.ExportDeclaration:
|
||||
generateNameForExportDeclaration(<ExportDeclaration>node);
|
||||
break;
|
||||
case SyntaxKind.ExportAssignment:
|
||||
generateNameForExportAssignment(<ExportAssignment>node);
|
||||
break;
|
||||
case SyntaxKind.SourceFile:
|
||||
case SyntaxKind.ModuleBlock:
|
||||
forEach((<SourceFile | ModuleBlock>node).statements, generateNames);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function isExistingName(name: string) {
|
||||
return hasProperty(globals, name) || hasProperty(sourceFile.identifiers, name) || hasProperty(generatedNames, name);
|
||||
}
|
||||
|
||||
function makeUniqueName(baseName: string): string {
|
||||
let name = generateUniqueName(baseName, isExistingName);
|
||||
return generatedNames[name] = name;
|
||||
}
|
||||
|
||||
function assignGeneratedName(node: Node, name: string) {
|
||||
getNodeLinks(node).generatedName = unescapeIdentifier(name);
|
||||
}
|
||||
|
||||
function generateNameForFunctionOrClassDeclaration(node: Declaration) {
|
||||
if (!node.name) {
|
||||
assignGeneratedName(node, makeUniqueName("default"));
|
||||
}
|
||||
}
|
||||
|
||||
function generateNameForModuleOrEnum(node: ModuleDeclaration | EnumDeclaration) {
|
||||
if (node.name.kind === SyntaxKind.Identifier) {
|
||||
let name = node.name.text;
|
||||
// Use module/enum name itself if it is unique, otherwise make a unique variation
|
||||
assignGeneratedName(node, isUniqueLocalName(name, node) ? name : makeUniqueName(name));
|
||||
}
|
||||
}
|
||||
|
||||
function generateNameForImportOrExportDeclaration(node: ImportDeclaration | ExportDeclaration) {
|
||||
let expr = getExternalModuleName(node);
|
||||
let baseName = expr.kind === SyntaxKind.StringLiteral ?
|
||||
escapeIdentifier(makeIdentifierFromModuleName((<LiteralExpression>expr).text)) : "module";
|
||||
assignGeneratedName(node, makeUniqueName(baseName));
|
||||
}
|
||||
|
||||
function generateNameForImportDeclaration(node: ImportDeclaration) {
|
||||
if (node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === SyntaxKind.NamedImports) {
|
||||
generateNameForImportOrExportDeclaration(node);
|
||||
}
|
||||
}
|
||||
|
||||
function generateNameForExportDeclaration(node: ExportDeclaration) {
|
||||
if (node.moduleSpecifier) {
|
||||
generateNameForImportOrExportDeclaration(node);
|
||||
}
|
||||
}
|
||||
|
||||
function generateNameForExportAssignment(node: ExportAssignment) {
|
||||
if (node.expression && node.expression.kind !== SyntaxKind.Identifier) {
|
||||
assignGeneratedName(node, makeUniqueName("default"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getGeneratedNameForNode(node: Node) {
|
||||
let links = getNodeLinks(node);
|
||||
if (!links.generatedName) {
|
||||
getGeneratedNamesForSourceFile(getSourceFile(node));
|
||||
}
|
||||
return links.generatedName;
|
||||
}
|
||||
|
||||
function getLocalNameOfContainer(container: ModuleDeclaration | EnumDeclaration): string {
|
||||
return getGeneratedNameForNode(container);
|
||||
}
|
||||
|
||||
function getLocalNameForImportDeclaration(node: ImportDeclaration): string {
|
||||
return getGeneratedNameForNode(node);
|
||||
}
|
||||
|
||||
function getAliasNameSubstitution(symbol: Symbol): string {
|
||||
function getAliasNameSubstitution(symbol: Symbol, getGeneratedNameForNode: (Node: Node) => string): string {
|
||||
let declaration = getDeclarationOfAliasSymbol(symbol);
|
||||
if (declaration && declaration.kind === SyntaxKind.ImportSpecifier) {
|
||||
let moduleName = getGeneratedNameForNode(<ImportDeclaration>declaration.parent.parent.parent);
|
||||
@@ -11099,7 +10978,7 @@ module ts {
|
||||
}
|
||||
}
|
||||
|
||||
function getExportNameSubstitution(symbol: Symbol, location: Node): string {
|
||||
function getExportNameSubstitution(symbol: Symbol, location: Node, getGeneratedNameForNode: (Node: Node) => string): string {
|
||||
if (isExternalModuleSymbol(symbol.parent)) {
|
||||
var symbolName = unescapeIdentifier(symbol.name);
|
||||
// If this is es6 or higher, just use the name of the export
|
||||
@@ -11121,24 +11000,24 @@ module ts {
|
||||
}
|
||||
}
|
||||
|
||||
function getExpressionNameSubstitution(node: Identifier): string {
|
||||
function getExpressionNameSubstitution(node: Identifier, getGeneratedNameForNode: (Node: Node) => string): string {
|
||||
let symbol = getNodeLinks(node).resolvedSymbol;
|
||||
if (symbol) {
|
||||
// Whan an identifier resolves to a parented symbol, it references an exported entity from
|
||||
// another declaration of the same internal module.
|
||||
if (symbol.parent) {
|
||||
return getExportNameSubstitution(symbol, node.parent);
|
||||
return getExportNameSubstitution(symbol, node.parent, getGeneratedNameForNode);
|
||||
}
|
||||
// If we reference an exported entity within the same module declaration, then whether
|
||||
// we prefix depends on the kind of entity. SymbolFlags.ExportHasLocal encompasses all the
|
||||
// kinds that we do NOT prefix.
|
||||
let exportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
|
||||
if (symbol !== exportSymbol && !(exportSymbol.flags & SymbolFlags.ExportHasLocal)) {
|
||||
return getExportNameSubstitution(exportSymbol, node.parent);
|
||||
return getExportNameSubstitution(exportSymbol, node.parent, getGeneratedNameForNode);
|
||||
}
|
||||
// Named imports from ES6 import declarations are rewritten
|
||||
if (symbol.flags & SymbolFlags.Alias && languageVersion < ScriptTarget.ES6) {
|
||||
return getAliasNameSubstitution(symbol);
|
||||
return getAliasNameSubstitution(symbol, getGeneratedNameForNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11241,10 +11120,13 @@ module ts {
|
||||
getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);
|
||||
}
|
||||
|
||||
function isUnknownIdentifier(location: Node, name: string): boolean {
|
||||
Debug.assert(!nodeIsSynthesized(location), "isUnknownIdentifier called with a synthesized location");
|
||||
return !resolveName(location, name, SymbolFlags.Value, /*nodeNotFoundMessage*/ undefined, /*nameArg*/ undefined) &&
|
||||
!hasProperty(getGeneratedNamesForSourceFile(getSourceFile(location)), name);
|
||||
function hasGlobalName(name: string): boolean {
|
||||
return hasProperty(globals, name);
|
||||
}
|
||||
|
||||
function resolvesToSomeValue(location: Node, name: string): boolean {
|
||||
Debug.assert(!nodeIsSynthesized(location), "resolvesToSomeValue called with a synthesized location");
|
||||
return !!resolveName(location, name, SymbolFlags.Value, /*nodeNotFoundMessage*/ undefined, /*nameArg*/ undefined);
|
||||
}
|
||||
|
||||
function getBlockScopedVariableId(n: Identifier): number {
|
||||
@@ -11274,8 +11156,8 @@ module ts {
|
||||
|
||||
function createResolver(): EmitResolver {
|
||||
return {
|
||||
getGeneratedNameForNode,
|
||||
getExpressionNameSubstitution,
|
||||
hasGlobalName,
|
||||
hasExportDefaultValue,
|
||||
isReferencedAliasDeclaration,
|
||||
getNodeCheckFlags,
|
||||
@@ -11288,7 +11170,7 @@ module ts {
|
||||
isSymbolAccessible,
|
||||
isEntityNameVisible,
|
||||
getConstantValue,
|
||||
isUnknownIdentifier,
|
||||
resolvesToSomeValue,
|
||||
collectLinkedAliases,
|
||||
getBlockScopedVariableId,
|
||||
};
|
||||
|
||||
+269
-132
@@ -19,6 +19,14 @@ module ts {
|
||||
return isExternalModule(sourceFile) || isDeclarationFile(sourceFile);
|
||||
}
|
||||
|
||||
// flag enum used to request and track usages of few dedicated temp variables
|
||||
// enum values are used to set/check bit values and thus should not have bit collisions.
|
||||
const enum TempVariableKind {
|
||||
auto = 0,
|
||||
_i = 1,
|
||||
_n = 2,
|
||||
}
|
||||
|
||||
// @internal
|
||||
// targetSourceFile is when users only want one file in entire project to be emitted. This is used in compileOnSave feature
|
||||
export function emitFiles(resolver: EmitResolver, host: EmitHost, targetSourceFile: SourceFile): EmitResult {
|
||||
@@ -60,6 +68,26 @@ module ts {
|
||||
sourceMaps: sourceMapDataList
|
||||
};
|
||||
|
||||
function isNodeDescendentOf(node: Node, ancestor: Node): boolean {
|
||||
while (node) {
|
||||
if (node === ancestor) return true;
|
||||
node = node.parent;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function isUniqueLocalName(name: string, container: Node): boolean {
|
||||
for (let node = container; isNodeDescendentOf(node, container); node = node.nextContainer) {
|
||||
if (node.locals && hasProperty(node.locals, name)) {
|
||||
// We conservatively include alias symbols to cover cases where they're emitted as locals
|
||||
if (node.locals[name].flags & (SymbolFlags.Value | SymbolFlags.ExportValue | SymbolFlags.Alias)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function emitJavaScript(jsFilePath: string, root?: SourceFile) {
|
||||
let writer = createTextWriter(newLine);
|
||||
let write = writer.write;
|
||||
@@ -71,15 +99,17 @@ module ts {
|
||||
|
||||
let currentSourceFile: SourceFile;
|
||||
|
||||
let lastFrame: ScopeFrame;
|
||||
let currentScopeNames: Map<string>;
|
||||
|
||||
let generatedBlockScopeNames: string[];
|
||||
let generatedNameSet: Map<string>;
|
||||
let nodeToGeneratedName: string[];
|
||||
let blockScopedVariableToGeneratedName: string[];
|
||||
|
||||
let extendsEmitted = false;
|
||||
|
||||
let tempCount = 0;
|
||||
let tempVariables: Identifier[];
|
||||
let tempParameters: Identifier[];
|
||||
let predefinedTempsInUse = TempVariableKind.auto;
|
||||
|
||||
let externalImports: ExternalImportInfo[];
|
||||
let exportSpecifiers: Map<ExportSpecifier[]>;
|
||||
let exportDefault: FunctionDeclaration | ClassDeclaration | ExportAssignment | ExportSpecifier;
|
||||
@@ -144,81 +174,197 @@ module ts {
|
||||
emit(sourceFile);
|
||||
}
|
||||
|
||||
// enters the new lexical environment
|
||||
// return value should be passed to matching call to exitNameScope.
|
||||
function enterNameScope(): boolean {
|
||||
let names = currentScopeNames;
|
||||
currentScopeNames = undefined;
|
||||
if (names) {
|
||||
lastFrame = { names, previous: lastFrame };
|
||||
return true;
|
||||
function generateNameForNode(node: Node) {
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.FunctionDeclaration:
|
||||
case SyntaxKind.ClassDeclaration:
|
||||
generateNameForFunctionOrClassDeclaration(<Declaration>node);
|
||||
break;
|
||||
case SyntaxKind.ModuleDeclaration:
|
||||
generateNameForModuleOrEnum(<ModuleDeclaration>node);
|
||||
generateNameForNode((<ModuleDeclaration>node).body);
|
||||
break;
|
||||
case SyntaxKind.EnumDeclaration:
|
||||
generateNameForModuleOrEnum(<EnumDeclaration>node);
|
||||
break;
|
||||
case SyntaxKind.ImportDeclaration:
|
||||
generateNameForImportDeclaration(<ImportDeclaration>node);
|
||||
break;
|
||||
case SyntaxKind.ExportDeclaration:
|
||||
generateNameForExportDeclaration(<ExportDeclaration>node);
|
||||
break;
|
||||
case SyntaxKind.ExportAssignment:
|
||||
generateNameForExportAssignment(<ExportAssignment>node);
|
||||
break;
|
||||
case SyntaxKind.SourceFile:
|
||||
case SyntaxKind.ModuleBlock:
|
||||
forEach((<SourceFile | ModuleBlock>node).statements, generateNameForNode);
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function exitNameScope(popFrame: boolean): void {
|
||||
if (popFrame) {
|
||||
currentScopeNames = lastFrame.names;
|
||||
lastFrame = lastFrame.previous;
|
||||
function isUniqueName(name: string): boolean {
|
||||
return !resolver.hasGlobalName(name) &&
|
||||
!hasProperty(currentSourceFile.identifiers, name) &&
|
||||
(!generatedNameSet || !hasProperty(generatedNameSet, name))
|
||||
}
|
||||
|
||||
// in cases like
|
||||
// for (var x of []) {
|
||||
// _i;
|
||||
// }
|
||||
// we should be able to detect if let _i was shadowed by some temp variable that was allocated in scope
|
||||
function nameConflictsWithSomeTempVariable(name: string): boolean {
|
||||
// temp variable names always start with '_'
|
||||
if (name.length < 2 || name.charCodeAt(0) !== CharacterCodes._) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (name === "_i") {
|
||||
return !!(predefinedTempsInUse & TempVariableKind._i);
|
||||
}
|
||||
|
||||
if (name === "_n") {
|
||||
return !!(predefinedTempsInUse & TempVariableKind._n);
|
||||
}
|
||||
|
||||
if (name.length === 2 && name.charCodeAt(1) >= CharacterCodes.a && name.charCodeAt(1) <= CharacterCodes.z) {
|
||||
// handles _a .. _z
|
||||
let n = name.charCodeAt(1) - CharacterCodes.a;
|
||||
return n < tempCount;
|
||||
}
|
||||
else {
|
||||
currentScopeNames = undefined;
|
||||
// handles _1, _2...
|
||||
let n = +name.substring(1);
|
||||
return !isNaN(n) && n >= 0 && n < (tempCount - 26);
|
||||
}
|
||||
}
|
||||
|
||||
function generateUniqueNameForLocation(location: Node, baseName: string): string {
|
||||
let name: string
|
||||
// first try to check if base name can be used as is
|
||||
if (!isExistingName(location, baseName)) {
|
||||
name = baseName;
|
||||
}
|
||||
else {
|
||||
name = generateUniqueName(baseName, n => isExistingName(location, n));
|
||||
}
|
||||
|
||||
return recordNameInCurrentScope(name);
|
||||
}
|
||||
|
||||
function recordNameInCurrentScope(name: string): string {
|
||||
if (!currentScopeNames) {
|
||||
currentScopeNames = {};
|
||||
}
|
||||
|
||||
return currentScopeNames[name] = name;
|
||||
}
|
||||
|
||||
function isExistingName(location: Node, name: string) {
|
||||
// check if resolver is aware of this name (if name was seen during the typecheck)
|
||||
if (!resolver.isUnknownIdentifier(location, name)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// check if name is present in generated names that were introduced by the emitter
|
||||
if (currentScopeNames && hasProperty(currentScopeNames, name)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// check generated names in outer scopes
|
||||
// let x;
|
||||
// function foo() {
|
||||
// let x; // 1
|
||||
// function bar() {
|
||||
// {
|
||||
// let x; // 2
|
||||
// }
|
||||
// console.log(x); // 3
|
||||
// }
|
||||
//}
|
||||
// here both x(1) and x(2) should be renamed and their names should be different
|
||||
// so x in (3) will refer to x(1)
|
||||
let frame = lastFrame;
|
||||
while (frame) {
|
||||
if (hasProperty(frame.names, name)) {
|
||||
return true;
|
||||
// This function generates a name using the following pattern:
|
||||
// _a .. _h, _j ... _z, _0, _1, ...
|
||||
// It is guaranteed that generated name will not shadow any existing user-defined names,
|
||||
// however it can hide another name generated by this function higher in the scope.
|
||||
// NOTE: names generated by 'makeTempVariableName' and 'makeUniqueName' will never conflict.
|
||||
// see comment for 'makeTempVariableName' for more information.
|
||||
function makeTempVariableName(location: Node, tempVariableKind: TempVariableKind): string {
|
||||
let tempName: string;
|
||||
if (tempVariableKind !== TempVariableKind.auto && !(predefinedTempsInUse & tempVariableKind)) {
|
||||
tempName = tempVariableKind === TempVariableKind._i ? "_i" : "_n";
|
||||
if (!resolver.resolvesToSomeValue(location, tempName)) {
|
||||
predefinedTempsInUse |= tempVariableKind;
|
||||
return tempName;
|
||||
}
|
||||
frame = frame.previous;
|
||||
}
|
||||
return false;
|
||||
|
||||
do {
|
||||
// Note: we avoid generating _i and _n as those are common names we want in other places.
|
||||
var char = CharacterCodes.a + tempCount;
|
||||
if (char !== CharacterCodes.i && char !== CharacterCodes.n) {
|
||||
if (tempCount < 26) {
|
||||
tempName = "_" + String.fromCharCode(char);
|
||||
}
|
||||
else {
|
||||
tempName = "_" + (tempCount - 26);
|
||||
}
|
||||
}
|
||||
|
||||
tempCount++;
|
||||
}
|
||||
while (resolver.resolvesToSomeValue(location, tempName));
|
||||
|
||||
return tempName;
|
||||
}
|
||||
|
||||
// Generates a name that is unique within current file and does not collide with
|
||||
// any names in global scope.
|
||||
// NOTE: names generated by 'makeTempVariableName' and 'makeUniqueName' will never conflict
|
||||
// because of the way how these names are generated
|
||||
// - makeUniqueName builds a name by picking a base name (which should not be empty string)
|
||||
// and appending suffix '_<number>'
|
||||
// - makeTempVariableName creates a name using the following pattern:
|
||||
// _a .. _h, _j ... _z, _0, _1, ...
|
||||
// This means that names from 'makeTempVariableName' will have only one underscore at the beginning
|
||||
// and names from 'makeUniqieName' will have at least one underscore in the middle
|
||||
// so they will never collide.
|
||||
function makeUniqueName(baseName: string): string {
|
||||
Debug.assert(!!baseName);
|
||||
|
||||
// Find the first unique 'name_n', where n is a positive number
|
||||
if (baseName.charCodeAt(baseName.length - 1) !== CharacterCodes._) {
|
||||
baseName += "_";
|
||||
}
|
||||
|
||||
let i = 1;
|
||||
let generatedName: string;
|
||||
while (true) {
|
||||
generatedName = baseName + i;
|
||||
if (isUniqueName(generatedName)) {
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
if (!generatedNameSet) {
|
||||
generatedNameSet = {};
|
||||
}
|
||||
return generatedNameSet[generatedName] = generatedName;
|
||||
}
|
||||
|
||||
function renameNode(node: Node, name: string): string {
|
||||
var nodeId = getNodeId(node);
|
||||
|
||||
if (!nodeToGeneratedName) {
|
||||
nodeToGeneratedName = [];
|
||||
}
|
||||
|
||||
return nodeToGeneratedName[nodeId] = unescapeIdentifier(name);
|
||||
}
|
||||
|
||||
function generateNameForFunctionOrClassDeclaration(node: Declaration) {
|
||||
if (!node.name) {
|
||||
renameNode(node, makeUniqueName("default"));
|
||||
}
|
||||
}
|
||||
|
||||
function generateNameForModuleOrEnum(node: ModuleDeclaration | EnumDeclaration) {
|
||||
if (node.name.kind === SyntaxKind.Identifier) {
|
||||
let name = node.name.text;
|
||||
// Use module/enum name itself if it is unique, otherwise make a unique variation
|
||||
renameNode(node, isUniqueLocalName(name, node) ? name : makeUniqueName(name));
|
||||
}
|
||||
}
|
||||
|
||||
function generateNameForImportOrExportDeclaration(node: ImportDeclaration | ExportDeclaration) {
|
||||
let expr = getExternalModuleName(node);
|
||||
let baseName = expr.kind === SyntaxKind.StringLiteral ?
|
||||
escapeIdentifier(makeIdentifierFromModuleName((<LiteralExpression>expr).text)) : "module";
|
||||
renameNode(node, makeUniqueName(baseName));
|
||||
}
|
||||
|
||||
function generateNameForImportDeclaration(node: ImportDeclaration) {
|
||||
if (node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === SyntaxKind.NamedImports) {
|
||||
generateNameForImportOrExportDeclaration(node);
|
||||
}
|
||||
}
|
||||
|
||||
function generateNameForExportDeclaration(node: ExportDeclaration) {
|
||||
if (node.moduleSpecifier) {
|
||||
generateNameForImportOrExportDeclaration(node);
|
||||
}
|
||||
}
|
||||
|
||||
function generateNameForExportAssignment(node: ExportAssignment) {
|
||||
if (node.expression && node.expression.kind !== SyntaxKind.Identifier) {
|
||||
renameNode(node, makeUniqueName("default"));
|
||||
}
|
||||
}
|
||||
|
||||
function getGeneratedNameForNode(node: Node) {
|
||||
let nodeId = getNodeId(node);
|
||||
if (!nodeToGeneratedName || !nodeToGeneratedName[nodeId]) {
|
||||
generateNameForNode(node);
|
||||
}
|
||||
return nodeToGeneratedName ? nodeToGeneratedName[nodeId] : undefined;
|
||||
}
|
||||
|
||||
function initializeEmitterWithSourceMaps() {
|
||||
@@ -585,32 +731,10 @@ module ts {
|
||||
writeFile(host, diagnostics, jsFilePath, emitOutput, writeByteOrderMark);
|
||||
}
|
||||
|
||||
// Create a temporary variable with a unique unused name. The forLoopVariable parameter signals that the
|
||||
// name should be one that is appropriate for a for loop variable.
|
||||
function createTempVariable(location: Node, preferredName?: string): Identifier {
|
||||
for (var name = preferredName; !name || isExistingName(location, name); tempCount++) {
|
||||
// _a .. _h, _j ... _z, _0, _1, ...
|
||||
|
||||
// Note: we avoid generating _i and _n as those are common names we want in other places.
|
||||
var char = CharacterCodes.a + tempCount;
|
||||
if (char === CharacterCodes.i || char === CharacterCodes.n) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tempCount < 26) {
|
||||
name = "_" + String.fromCharCode(char);
|
||||
}
|
||||
else {
|
||||
name = "_" + (tempCount - 26);
|
||||
}
|
||||
}
|
||||
|
||||
// This is necessary so that a name generated via renameNonTopLevelLetAndConst will see the name
|
||||
// we just generated.
|
||||
recordNameInCurrentScope(name);
|
||||
|
||||
// Create a temporary variable with a unique unused name.
|
||||
function createTempVariable(location: Node, tempVariableKind = TempVariableKind.auto): Identifier {
|
||||
let result = <Identifier>createSynthesizedNode(SyntaxKind.Identifier);
|
||||
result.text = name;
|
||||
result.text = makeTempVariableName(location, tempVariableKind);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -621,8 +745,8 @@ module ts {
|
||||
tempVariables.push(name);
|
||||
}
|
||||
|
||||
function createAndRecordTempVariable(location: Node, preferredName?: string): Identifier {
|
||||
let temp = createTempVariable(location, preferredName);
|
||||
function createAndRecordTempVariable(location: Node, tempVariableKind?: TempVariableKind): Identifier {
|
||||
let temp = createTempVariable(location, tempVariableKind);
|
||||
recordTempDeclaration(temp);
|
||||
|
||||
return temp;
|
||||
@@ -1085,7 +1209,7 @@ module ts {
|
||||
}
|
||||
|
||||
function emitExpressionIdentifier(node: Identifier) {
|
||||
let substitution = resolver.getExpressionNameSubstitution(node);
|
||||
let substitution = resolver.getExpressionNameSubstitution(node, getGeneratedNameForNode);
|
||||
if (substitution) {
|
||||
write(substitution);
|
||||
}
|
||||
@@ -1095,7 +1219,7 @@ module ts {
|
||||
}
|
||||
|
||||
function getGeneratedNameForIdentifier(node: Identifier): string {
|
||||
if (nodeIsSynthesized(node) || !generatedBlockScopeNames) {
|
||||
if (nodeIsSynthesized(node) || !blockScopedVariableToGeneratedName) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -1104,7 +1228,7 @@ module ts {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return generatedBlockScopeNames[variableId];
|
||||
return blockScopedVariableToGeneratedName[variableId];
|
||||
}
|
||||
|
||||
function emitIdentifier(node: Identifier, allowGeneratedIdentifiers: boolean) {
|
||||
@@ -1332,7 +1456,7 @@ module ts {
|
||||
// manage by just emitting strings (which is a lot more performant).
|
||||
//let prefix = createIdentifier(resolver.getExpressionNamePrefix((<ShorthandPropertyAssignment>property).name));
|
||||
//return createPropertyAccessExpression(prefix, (<ShorthandPropertyAssignment>property).name);
|
||||
return createIdentifier(resolver.getExpressionNameSubstitution((<ShorthandPropertyAssignment>property).name));
|
||||
return createIdentifier(resolver.getExpressionNameSubstitution((<ShorthandPropertyAssignment>property).name, getGeneratedNameForNode));
|
||||
|
||||
case SyntaxKind.MethodDeclaration:
|
||||
return createFunctionExpression((<MethodDeclaration>property).parameters, (<MethodDeclaration>property).body);
|
||||
@@ -1546,7 +1670,7 @@ module ts {
|
||||
emitExpressionIdentifier(node.name);
|
||||
}
|
||||
}
|
||||
else if (resolver.getExpressionNameSubstitution(node.name)) {
|
||||
else if (resolver.getExpressionNameSubstitution(node.name, getGeneratedNameForNode)) {
|
||||
// Emit identifier as an identifier
|
||||
write(": ");
|
||||
// Even though this is stored as identifier treat it as an expression
|
||||
@@ -2079,10 +2203,10 @@ module ts {
|
||||
//
|
||||
// we don't want to emit a temporary variable for the RHS, just use it directly.
|
||||
let rhsIsIdentifier = node.expression.kind === SyntaxKind.Identifier;
|
||||
let counter = createTempVariable(node, /*preferredName*/ "_i");
|
||||
let counter = createTempVariable(node, TempVariableKind._i);
|
||||
let rhsReference = rhsIsIdentifier ? <Identifier>node.expression : createTempVariable(node);
|
||||
|
||||
var cachedLength = compilerOptions.cacheDownlevelForOfLength ? createTempVariable(node, /*preferredName:*/ "_n") : undefined;
|
||||
var cachedLength = compilerOptions.cacheDownlevelForOfLength ? createTempVariable(node, TempVariableKind._n) : undefined;
|
||||
|
||||
// This is the let keyword for the counter and rhsReference. The let keyword for
|
||||
// the LHS will be emitted inside the body.
|
||||
@@ -2323,7 +2447,7 @@ module ts {
|
||||
|
||||
function emitContainingModuleName(node: Node) {
|
||||
let container = getContainingModule(node);
|
||||
write(container ? resolver.getGeneratedNameForNode(container) : "exports");
|
||||
write(container ? getGeneratedNameForNode(container) : "exports");
|
||||
}
|
||||
|
||||
function emitModuleMemberName(node: Declaration) {
|
||||
@@ -2331,7 +2455,7 @@ module ts {
|
||||
if (getCombinedNodeFlags(node) & NodeFlags.Export) {
|
||||
var container = getContainingModule(node);
|
||||
if (container) {
|
||||
write(resolver.getGeneratedNameForNode(container));
|
||||
write(getGeneratedNameForNode(container));
|
||||
write(".");
|
||||
}
|
||||
else if (languageVersion < ScriptTarget.ES6) {
|
||||
@@ -2673,9 +2797,14 @@ module ts {
|
||||
|
||||
// here it is known that node is a block scoped variable
|
||||
let list = getAncestor(node, SyntaxKind.VariableDeclarationList);
|
||||
if (list.parent.kind === SyntaxKind.VariableStatement && list.parent.parent.kind === SyntaxKind.SourceFile) {
|
||||
// do not rename variables that are defined on source file level
|
||||
return;
|
||||
if (list.parent.kind === SyntaxKind.VariableStatement) {
|
||||
let isSourceFileLevelBinding = list.parent.parent.kind === SyntaxKind.SourceFile;
|
||||
let isModuleLevelBinding = list.parent.parent.kind === SyntaxKind.ModuleBlock;
|
||||
let isFunctionLevelBinding =
|
||||
list.parent.parent.kind === SyntaxKind.Block && isFunctionLike(list.parent.parent.parent);
|
||||
if (isSourceFileLevelBinding || isModuleLevelBinding || isFunctionLevelBinding) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let blockScopeContainer = getEnclosingBlockScopeContainer(node);
|
||||
@@ -2683,12 +2812,19 @@ module ts {
|
||||
? blockScopeContainer
|
||||
: blockScopeContainer.parent;
|
||||
|
||||
let generatedName = generateUniqueNameForLocation(parent, (<Identifier>node).text);
|
||||
let variableId = resolver.getBlockScopedVariableId(<Identifier>node);
|
||||
if (!generatedBlockScopeNames) {
|
||||
generatedBlockScopeNames = [];
|
||||
var hasConflictsInEnclosingScope =
|
||||
resolver.resolvesToSomeValue(parent, (<Identifier>node).text) ||
|
||||
nameConflictsWithSomeTempVariable((<Identifier>node).text);
|
||||
|
||||
if (hasConflictsInEnclosingScope) {
|
||||
let variableId = resolver.getBlockScopedVariableId(<Identifier>node);
|
||||
if (!blockScopedVariableToGeneratedName) {
|
||||
blockScopedVariableToGeneratedName = [];
|
||||
}
|
||||
|
||||
let generatedName = makeUniqueName((<Identifier>node).text);
|
||||
blockScopedVariableToGeneratedName[variableId] = generatedName;
|
||||
}
|
||||
generatedBlockScopeNames[variableId] = generatedName;
|
||||
}
|
||||
|
||||
function isES6ModuleMemberDeclaration(node: Node) {
|
||||
@@ -2770,7 +2906,7 @@ module ts {
|
||||
if (languageVersion < ScriptTarget.ES6 && hasRestParameters(node)) {
|
||||
let restIndex = node.parameters.length - 1;
|
||||
let restParam = node.parameters[restIndex];
|
||||
let tempName = createTempVariable(node, /*preferredName:*/ "_i").text;
|
||||
let tempName = createTempVariable(node, TempVariableKind._i).text;
|
||||
writeLine();
|
||||
emitLeadingComments(restParam);
|
||||
emitStart(restParam);
|
||||
@@ -2820,7 +2956,7 @@ module ts {
|
||||
emitNodeWithoutSourceMap(node.name);
|
||||
}
|
||||
else {
|
||||
write(resolver.getGeneratedNameForNode(node));
|
||||
write(getGeneratedNameForNode(node));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2906,11 +3042,12 @@ module ts {
|
||||
let saveTempCount = tempCount;
|
||||
let saveTempVariables = tempVariables;
|
||||
let saveTempParameters = tempParameters;
|
||||
let savePredefinedTempsInUse = predefinedTempsInUse;
|
||||
|
||||
tempCount = 0;
|
||||
tempVariables = undefined;
|
||||
tempParameters = undefined;
|
||||
|
||||
let popFrame = enterNameScope()
|
||||
predefinedTempsInUse = TempVariableKind.auto;
|
||||
|
||||
// When targeting ES6, emit arrow function natively in ES6
|
||||
if (shouldEmitAsArrowFunction(node)) {
|
||||
@@ -2943,8 +3080,7 @@ module ts {
|
||||
write(";");
|
||||
}
|
||||
|
||||
exitNameScope(popFrame);
|
||||
|
||||
predefinedTempsInUse = savePredefinedTempsInUse;
|
||||
tempCount = saveTempCount;
|
||||
tempVariables = saveTempVariables;
|
||||
tempParameters = saveTempParameters;
|
||||
@@ -3241,11 +3377,12 @@ module ts {
|
||||
let saveTempCount = tempCount;
|
||||
let saveTempVariables = tempVariables;
|
||||
let saveTempParameters = tempParameters;
|
||||
let savePredefinedTempsInUse = predefinedTempsInUse;
|
||||
tempCount = 0;
|
||||
tempVariables = undefined;
|
||||
tempParameters = undefined;
|
||||
predefinedTempsInUse = TempVariableKind.auto;
|
||||
|
||||
let popFrame = enterNameScope();
|
||||
// Check if we have property assignment inside class declaration.
|
||||
// If there is property assignment, we need to emit constructor whether users define it or not
|
||||
// If there is no property assignment, we can omit constructor if users do not define it
|
||||
@@ -3354,8 +3491,7 @@ module ts {
|
||||
emitTrailingComments(ctor);
|
||||
}
|
||||
|
||||
exitNameScope(popFrame);
|
||||
|
||||
predefinedTempsInUse = savePredefinedTempsInUse;
|
||||
tempCount = saveTempCount;
|
||||
tempVariables = saveTempVariables;
|
||||
tempParameters = saveTempParameters;
|
||||
@@ -3494,7 +3630,7 @@ module ts {
|
||||
emitStart(node);
|
||||
write("(function (");
|
||||
emitStart(node.name);
|
||||
write(resolver.getGeneratedNameForNode(node));
|
||||
write(getGeneratedNameForNode(node));
|
||||
emitEnd(node.name);
|
||||
write(") {");
|
||||
increaseIndent();
|
||||
@@ -3531,9 +3667,9 @@ module ts {
|
||||
function emitEnumMember(node: EnumMember) {
|
||||
let enumParent = <EnumDeclaration>node.parent;
|
||||
emitStart(node);
|
||||
write(resolver.getGeneratedNameForNode(enumParent));
|
||||
write(getGeneratedNameForNode(enumParent));
|
||||
write("[");
|
||||
write(resolver.getGeneratedNameForNode(enumParent));
|
||||
write(getGeneratedNameForNode(enumParent));
|
||||
write("[");
|
||||
emitExpressionForPropertyName(node.name);
|
||||
write("] = ");
|
||||
@@ -3586,19 +3722,20 @@ module ts {
|
||||
emitStart(node);
|
||||
write("(function (");
|
||||
emitStart(node.name);
|
||||
write(resolver.getGeneratedNameForNode(node));
|
||||
write(getGeneratedNameForNode(node));
|
||||
emitEnd(node.name);
|
||||
write(") ");
|
||||
if (node.body.kind === SyntaxKind.ModuleBlock) {
|
||||
let saveTempCount = tempCount;
|
||||
let saveTempVariables = tempVariables;
|
||||
let savePredefinedTempsInUse = predefinedTempsInUse;
|
||||
tempCount = 0;
|
||||
tempVariables = undefined;
|
||||
let popFrame = enterNameScope();
|
||||
predefinedTempsInUse = TempVariableKind.auto;
|
||||
|
||||
emit(node.body);
|
||||
|
||||
exitNameScope(popFrame);
|
||||
predefinedTempsInUse = savePredefinedTempsInUse;
|
||||
tempCount = saveTempCount;
|
||||
tempVariables = saveTempVariables;
|
||||
}
|
||||
@@ -3762,7 +3899,7 @@ module ts {
|
||||
}
|
||||
else if (namedImports) {
|
||||
write("var ");
|
||||
write(resolver.getGeneratedNameForNode(<ImportDeclaration>node));
|
||||
write(getGeneratedNameForNode(<ImportDeclaration>node));
|
||||
write(" = ");
|
||||
emitRequire(moduleName);
|
||||
}
|
||||
@@ -3817,7 +3954,7 @@ module ts {
|
||||
if (languageVersion < ScriptTarget.ES6 || node.parent.kind !== SyntaxKind.SourceFile) {
|
||||
if (node.moduleSpecifier) {
|
||||
emitStart(node);
|
||||
let generatedName = resolver.getGeneratedNameForNode(node);
|
||||
let generatedName = getGeneratedNameForNode(node);
|
||||
if (compilerOptions.module !== ModuleKind.AMD) {
|
||||
write("var ");
|
||||
write(generatedName);
|
||||
@@ -3920,7 +4057,7 @@ module ts {
|
||||
return {
|
||||
rootNode: <ImportDeclaration>node,
|
||||
namedImports: <NamedImports>importClause.namedBindings,
|
||||
localName: resolver.getGeneratedNameForNode(<ImportDeclaration>node)
|
||||
localName: getGeneratedNameForNode(<ImportDeclaration>node)
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -4025,7 +4162,7 @@ module ts {
|
||||
emit(info.declarationNode.name);
|
||||
}
|
||||
else {
|
||||
write(resolver.getGeneratedNameForNode(<ImportDeclaration | ExportDeclaration>info.rootNode));
|
||||
write(getGeneratedNameForNode(<ImportDeclaration | ExportDeclaration>info.rootNode));
|
||||
}
|
||||
});
|
||||
forEach(node.amdDependencies, amdDependency => {
|
||||
|
||||
@@ -1203,8 +1203,8 @@ module ts {
|
||||
}
|
||||
|
||||
export interface EmitResolver {
|
||||
getGeneratedNameForNode(node: Node): string;
|
||||
getExpressionNameSubstitution(node: Identifier): string;
|
||||
hasGlobalName(name: string): boolean;
|
||||
getExpressionNameSubstitution(node: Identifier, getGeneratedNameForNode: (node: Node) => string): string;
|
||||
hasExportDefaultValue(node: SourceFile): boolean;
|
||||
isReferencedAliasDeclaration(node: Node): boolean;
|
||||
isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean;
|
||||
@@ -1219,7 +1219,7 @@ module ts {
|
||||
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
|
||||
// Returns the constant value this property access resolves to, or 'undefined' for a non-constant
|
||||
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
resolvesToSomeValue(location: Node, name: string): boolean;
|
||||
getBlockScopedVariableId(node: Identifier): number;
|
||||
}
|
||||
|
||||
|
||||
@@ -1212,28 +1212,6 @@ module ts {
|
||||
return node;
|
||||
}
|
||||
|
||||
export function generateUniqueName(baseName: string, isExistingName: (name: string) => boolean): string {
|
||||
// First try '_name'
|
||||
if (baseName.charCodeAt(0) !== CharacterCodes._) {
|
||||
baseName = "_" + baseName;
|
||||
if (!isExistingName(baseName)) {
|
||||
return baseName;
|
||||
}
|
||||
}
|
||||
// Find the first unique '_name_n', where n is a positive number
|
||||
if (baseName.charCodeAt(baseName.length - 1) !== CharacterCodes._) {
|
||||
baseName += "_";
|
||||
}
|
||||
let i = 1;
|
||||
while (true) {
|
||||
let name = baseName + i;
|
||||
if (!isExistingName(name)) {
|
||||
return name;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
// @internal
|
||||
export function createDiagnosticCollection(): DiagnosticCollection {
|
||||
let nonFileDiagnostics: Diagnostic[] = [];
|
||||
|
||||
@@ -938,8 +938,8 @@ declare module "typescript" {
|
||||
errorModuleName?: string;
|
||||
}
|
||||
interface EmitResolver {
|
||||
getGeneratedNameForNode(node: Node): string;
|
||||
getExpressionNameSubstitution(node: Identifier): string;
|
||||
hasGlobalName(name: string): boolean;
|
||||
getExpressionNameSubstitution(node: Identifier, getGeneratedNameForNode: (node: Node) => string): string;
|
||||
hasExportDefaultValue(node: SourceFile): boolean;
|
||||
isReferencedAliasDeclaration(node: Node): boolean;
|
||||
isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean;
|
||||
@@ -953,7 +953,7 @@ declare module "typescript" {
|
||||
isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult;
|
||||
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
|
||||
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
resolvesToSomeValue(location: Node, name: string): boolean;
|
||||
getBlockScopedVariableId(node: Identifier): number;
|
||||
}
|
||||
const enum SymbolFlags {
|
||||
|
||||
@@ -3003,16 +3003,18 @@ declare module "typescript" {
|
||||
interface EmitResolver {
|
||||
>EmitResolver : EmitResolver
|
||||
|
||||
getGeneratedNameForNode(node: Node): string;
|
||||
hasGlobalName(name: string): boolean;
|
||||
>hasGlobalName : (name: string) => boolean
|
||||
>name : string
|
||||
|
||||
getExpressionNameSubstitution(node: Identifier, getGeneratedNameForNode: (node: Node) => string): string;
|
||||
>getExpressionNameSubstitution : (node: Identifier, getGeneratedNameForNode: (node: Node) => string) => string
|
||||
>node : Identifier
|
||||
>Identifier : Identifier
|
||||
>getGeneratedNameForNode : (node: Node) => string
|
||||
>node : Node
|
||||
>Node : Node
|
||||
|
||||
getExpressionNameSubstitution(node: Identifier): string;
|
||||
>getExpressionNameSubstitution : (node: Identifier) => string
|
||||
>node : Identifier
|
||||
>Identifier : Identifier
|
||||
|
||||
hasExportDefaultValue(node: SourceFile): boolean;
|
||||
>hasExportDefaultValue : (node: SourceFile) => boolean
|
||||
>node : SourceFile
|
||||
@@ -3109,8 +3111,8 @@ declare module "typescript" {
|
||||
>PropertyAccessExpression : PropertyAccessExpression
|
||||
>ElementAccessExpression : ElementAccessExpression
|
||||
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
>isUnknownIdentifier : (location: Node, name: string) => boolean
|
||||
resolvesToSomeValue(location: Node, name: string): boolean;
|
||||
>resolvesToSomeValue : (location: Node, name: string) => boolean
|
||||
>location : Node
|
||||
>Node : Node
|
||||
>name : string
|
||||
|
||||
@@ -969,8 +969,8 @@ declare module "typescript" {
|
||||
errorModuleName?: string;
|
||||
}
|
||||
interface EmitResolver {
|
||||
getGeneratedNameForNode(node: Node): string;
|
||||
getExpressionNameSubstitution(node: Identifier): string;
|
||||
hasGlobalName(name: string): boolean;
|
||||
getExpressionNameSubstitution(node: Identifier, getGeneratedNameForNode: (node: Node) => string): string;
|
||||
hasExportDefaultValue(node: SourceFile): boolean;
|
||||
isReferencedAliasDeclaration(node: Node): boolean;
|
||||
isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean;
|
||||
@@ -984,7 +984,7 @@ declare module "typescript" {
|
||||
isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult;
|
||||
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
|
||||
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
resolvesToSomeValue(location: Node, name: string): boolean;
|
||||
getBlockScopedVariableId(node: Identifier): number;
|
||||
}
|
||||
const enum SymbolFlags {
|
||||
|
||||
@@ -3149,16 +3149,18 @@ declare module "typescript" {
|
||||
interface EmitResolver {
|
||||
>EmitResolver : EmitResolver
|
||||
|
||||
getGeneratedNameForNode(node: Node): string;
|
||||
hasGlobalName(name: string): boolean;
|
||||
>hasGlobalName : (name: string) => boolean
|
||||
>name : string
|
||||
|
||||
getExpressionNameSubstitution(node: Identifier, getGeneratedNameForNode: (node: Node) => string): string;
|
||||
>getExpressionNameSubstitution : (node: Identifier, getGeneratedNameForNode: (node: Node) => string) => string
|
||||
>node : Identifier
|
||||
>Identifier : Identifier
|
||||
>getGeneratedNameForNode : (node: Node) => string
|
||||
>node : Node
|
||||
>Node : Node
|
||||
|
||||
getExpressionNameSubstitution(node: Identifier): string;
|
||||
>getExpressionNameSubstitution : (node: Identifier) => string
|
||||
>node : Identifier
|
||||
>Identifier : Identifier
|
||||
|
||||
hasExportDefaultValue(node: SourceFile): boolean;
|
||||
>hasExportDefaultValue : (node: SourceFile) => boolean
|
||||
>node : SourceFile
|
||||
@@ -3255,8 +3257,8 @@ declare module "typescript" {
|
||||
>PropertyAccessExpression : PropertyAccessExpression
|
||||
>ElementAccessExpression : ElementAccessExpression
|
||||
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
>isUnknownIdentifier : (location: Node, name: string) => boolean
|
||||
resolvesToSomeValue(location: Node, name: string): boolean;
|
||||
>resolvesToSomeValue : (location: Node, name: string) => boolean
|
||||
>location : Node
|
||||
>Node : Node
|
||||
>name : string
|
||||
|
||||
@@ -970,8 +970,8 @@ declare module "typescript" {
|
||||
errorModuleName?: string;
|
||||
}
|
||||
interface EmitResolver {
|
||||
getGeneratedNameForNode(node: Node): string;
|
||||
getExpressionNameSubstitution(node: Identifier): string;
|
||||
hasGlobalName(name: string): boolean;
|
||||
getExpressionNameSubstitution(node: Identifier, getGeneratedNameForNode: (node: Node) => string): string;
|
||||
hasExportDefaultValue(node: SourceFile): boolean;
|
||||
isReferencedAliasDeclaration(node: Node): boolean;
|
||||
isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean;
|
||||
@@ -985,7 +985,7 @@ declare module "typescript" {
|
||||
isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult;
|
||||
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
|
||||
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
resolvesToSomeValue(location: Node, name: string): boolean;
|
||||
getBlockScopedVariableId(node: Identifier): number;
|
||||
}
|
||||
const enum SymbolFlags {
|
||||
|
||||
@@ -3099,16 +3099,18 @@ declare module "typescript" {
|
||||
interface EmitResolver {
|
||||
>EmitResolver : EmitResolver
|
||||
|
||||
getGeneratedNameForNode(node: Node): string;
|
||||
hasGlobalName(name: string): boolean;
|
||||
>hasGlobalName : (name: string) => boolean
|
||||
>name : string
|
||||
|
||||
getExpressionNameSubstitution(node: Identifier, getGeneratedNameForNode: (node: Node) => string): string;
|
||||
>getExpressionNameSubstitution : (node: Identifier, getGeneratedNameForNode: (node: Node) => string) => string
|
||||
>node : Identifier
|
||||
>Identifier : Identifier
|
||||
>getGeneratedNameForNode : (node: Node) => string
|
||||
>node : Node
|
||||
>Node : Node
|
||||
|
||||
getExpressionNameSubstitution(node: Identifier): string;
|
||||
>getExpressionNameSubstitution : (node: Identifier) => string
|
||||
>node : Identifier
|
||||
>Identifier : Identifier
|
||||
|
||||
hasExportDefaultValue(node: SourceFile): boolean;
|
||||
>hasExportDefaultValue : (node: SourceFile) => boolean
|
||||
>node : SourceFile
|
||||
@@ -3205,8 +3207,8 @@ declare module "typescript" {
|
||||
>PropertyAccessExpression : PropertyAccessExpression
|
||||
>ElementAccessExpression : ElementAccessExpression
|
||||
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
>isUnknownIdentifier : (location: Node, name: string) => boolean
|
||||
resolvesToSomeValue(location: Node, name: string): boolean;
|
||||
>resolvesToSomeValue : (location: Node, name: string) => boolean
|
||||
>location : Node
|
||||
>Node : Node
|
||||
>name : string
|
||||
|
||||
@@ -1007,8 +1007,8 @@ declare module "typescript" {
|
||||
errorModuleName?: string;
|
||||
}
|
||||
interface EmitResolver {
|
||||
getGeneratedNameForNode(node: Node): string;
|
||||
getExpressionNameSubstitution(node: Identifier): string;
|
||||
hasGlobalName(name: string): boolean;
|
||||
getExpressionNameSubstitution(node: Identifier, getGeneratedNameForNode: (node: Node) => string): string;
|
||||
hasExportDefaultValue(node: SourceFile): boolean;
|
||||
isReferencedAliasDeclaration(node: Node): boolean;
|
||||
isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean;
|
||||
@@ -1022,7 +1022,7 @@ declare module "typescript" {
|
||||
isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult;
|
||||
isEntityNameVisible(entityName: EntityName, enclosingDeclaration: Node): SymbolVisibilityResult;
|
||||
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
resolvesToSomeValue(location: Node, name: string): boolean;
|
||||
getBlockScopedVariableId(node: Identifier): number;
|
||||
}
|
||||
const enum SymbolFlags {
|
||||
|
||||
@@ -3272,16 +3272,18 @@ declare module "typescript" {
|
||||
interface EmitResolver {
|
||||
>EmitResolver : EmitResolver
|
||||
|
||||
getGeneratedNameForNode(node: Node): string;
|
||||
hasGlobalName(name: string): boolean;
|
||||
>hasGlobalName : (name: string) => boolean
|
||||
>name : string
|
||||
|
||||
getExpressionNameSubstitution(node: Identifier, getGeneratedNameForNode: (node: Node) => string): string;
|
||||
>getExpressionNameSubstitution : (node: Identifier, getGeneratedNameForNode: (node: Node) => string) => string
|
||||
>node : Identifier
|
||||
>Identifier : Identifier
|
||||
>getGeneratedNameForNode : (node: Node) => string
|
||||
>node : Node
|
||||
>Node : Node
|
||||
|
||||
getExpressionNameSubstitution(node: Identifier): string;
|
||||
>getExpressionNameSubstitution : (node: Identifier) => string
|
||||
>node : Identifier
|
||||
>Identifier : Identifier
|
||||
|
||||
hasExportDefaultValue(node: SourceFile): boolean;
|
||||
>hasExportDefaultValue : (node: SourceFile) => boolean
|
||||
>node : SourceFile
|
||||
@@ -3378,8 +3380,8 @@ declare module "typescript" {
|
||||
>PropertyAccessExpression : PropertyAccessExpression
|
||||
>ElementAccessExpression : ElementAccessExpression
|
||||
|
||||
isUnknownIdentifier(location: Node, name: string): boolean;
|
||||
>isUnknownIdentifier : (location: Node, name: string) => boolean
|
||||
resolvesToSomeValue(location: Node, name: string): boolean;
|
||||
>resolvesToSomeValue : (location: Node, name: string) => boolean
|
||||
>location : Node
|
||||
>Node : Node
|
||||
>name : string
|
||||
|
||||
@@ -11,7 +11,7 @@ for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
v;
|
||||
for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
var _v = _c[_b];
|
||||
var x = _v;
|
||||
var v_1 = _c[_b];
|
||||
var x = v_1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@ for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
v;
|
||||
for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
var _v = _c[_b];
|
||||
var x = _v;
|
||||
_v++;
|
||||
var v_1 = _c[_b];
|
||||
var x = v_1;
|
||||
v_1++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
for (var _b = 0, _c = [
|
||||
v
|
||||
]; _b < _c.length; _b++) {
|
||||
var _v = _c[_b];
|
||||
var x = _v;
|
||||
_v++;
|
||||
var v_1 = _c[_b];
|
||||
var x = v_1;
|
||||
v_1++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,6 @@ for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
v;
|
||||
}
|
||||
for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
var _v = _c[_b];
|
||||
_v;
|
||||
var v = _c[_b];
|
||||
v;
|
||||
}
|
||||
|
||||
@@ -14,9 +14,9 @@ for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
v;
|
||||
function foo() {
|
||||
for (var _b = 0, _c = []; _b < _c.length; _b++) {
|
||||
var _v = _c[_b];
|
||||
_v;
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v_1 = _a[_i];
|
||||
v_1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@ for (let v of []) {
|
||||
//// [ES5For-of20.js]
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var v = _a[_i];
|
||||
var _v;
|
||||
var v_1;
|
||||
for (var _b = 0, _c = [
|
||||
v
|
||||
]; _b < _c.length; _b++) {
|
||||
var _v_1 = _c[_b];
|
||||
var _v_2;
|
||||
var v_2 = _c[_b];
|
||||
var v_3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,5 +12,5 @@ var a = [
|
||||
];
|
||||
for (var _i = 0; _i < a.length; _i++) {
|
||||
var v = a[_i];
|
||||
var _a = 0;
|
||||
var a_1 = 0;
|
||||
}
|
||||
|
||||
@@ -35,19 +35,19 @@ var ag2 = new A.A2<string, number>();
|
||||
|
||||
//// [ModuleWithExportedAndNonExportedClasses.js]
|
||||
var A;
|
||||
(function (_A) {
|
||||
(function (A_1) {
|
||||
var A = (function () {
|
||||
function A() {
|
||||
}
|
||||
return A;
|
||||
})();
|
||||
_A.A = A;
|
||||
A_1.A = A;
|
||||
var AG = (function () {
|
||||
function AG() {
|
||||
}
|
||||
return AG;
|
||||
})();
|
||||
_A.AG = AG;
|
||||
A_1.AG = AG;
|
||||
var A2 = (function () {
|
||||
function A2() {
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ var M;
|
||||
})();
|
||||
M.C = C;
|
||||
var C;
|
||||
(function (_C) {
|
||||
_C.C = M.C;
|
||||
(function (C_1) {
|
||||
C_1.C = M.C;
|
||||
})(C = M.C || (M.C = {}));
|
||||
})(M || (M = {}));
|
||||
|
||||
@@ -47,14 +47,14 @@ module M { // Shouldnt be _M
|
||||
|
||||
//// [collisionCodeGenModuleWithAccessorChildren.js]
|
||||
var M;
|
||||
(function (_M) {
|
||||
_M.x = 3;
|
||||
(function (M_1) {
|
||||
M_1.x = 3;
|
||||
var c = (function () {
|
||||
function c() {
|
||||
}
|
||||
Object.defineProperty(c.prototype, "Z", {
|
||||
set: function (M) {
|
||||
this.y = _M.x;
|
||||
this.y = M_1.x;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
@@ -63,14 +63,14 @@ var M;
|
||||
})();
|
||||
})(M || (M = {}));
|
||||
var M;
|
||||
(function (_M_1) {
|
||||
(function (M_2) {
|
||||
var d = (function () {
|
||||
function d() {
|
||||
}
|
||||
Object.defineProperty(d.prototype, "Z", {
|
||||
set: function (p) {
|
||||
var M = 10;
|
||||
this.y = _M_1.x;
|
||||
this.y = M_2.x;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
@@ -94,14 +94,14 @@ var M;
|
||||
})();
|
||||
})(M || (M = {}));
|
||||
var M;
|
||||
(function (_M_2) {
|
||||
(function (M_3) {
|
||||
var f = (function () {
|
||||
function f() {
|
||||
}
|
||||
Object.defineProperty(f.prototype, "Z", {
|
||||
get: function () {
|
||||
var M = 10;
|
||||
return _M_2.x;
|
||||
return M_3.x;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: true
|
||||
|
||||
@@ -25,31 +25,31 @@ module M {
|
||||
|
||||
//// [collisionCodeGenModuleWithConstructorChildren.js]
|
||||
var M;
|
||||
(function (_M) {
|
||||
_M.x = 3;
|
||||
(function (M_1) {
|
||||
M_1.x = 3;
|
||||
var c = (function () {
|
||||
function c(M, p) {
|
||||
if (p === void 0) { p = _M.x; }
|
||||
if (p === void 0) { p = M_1.x; }
|
||||
}
|
||||
return c;
|
||||
})();
|
||||
})(M || (M = {}));
|
||||
var M;
|
||||
(function (_M_1) {
|
||||
(function (M_2) {
|
||||
var d = (function () {
|
||||
function d(M, p) {
|
||||
if (p === void 0) { p = _M_1.x; }
|
||||
if (p === void 0) { p = M_2.x; }
|
||||
this.M = M;
|
||||
}
|
||||
return d;
|
||||
})();
|
||||
})(M || (M = {}));
|
||||
var M;
|
||||
(function (_M_2) {
|
||||
(function (M_3) {
|
||||
var d2 = (function () {
|
||||
function d2() {
|
||||
var M = 10;
|
||||
var p = _M_2.x;
|
||||
var p = M_3.x;
|
||||
}
|
||||
return d2;
|
||||
})();
|
||||
|
||||
@@ -21,24 +21,24 @@ module M {
|
||||
|
||||
//// [collisionCodeGenModuleWithFunctionChildren.js]
|
||||
var M;
|
||||
(function (_M) {
|
||||
_M.x = 3;
|
||||
(function (M_1) {
|
||||
M_1.x = 3;
|
||||
function fn(M, p) {
|
||||
if (p === void 0) { p = _M.x; }
|
||||
if (p === void 0) { p = M_1.x; }
|
||||
}
|
||||
})(M || (M = {}));
|
||||
var M;
|
||||
(function (_M_1) {
|
||||
(function (M_2) {
|
||||
function fn2() {
|
||||
var M;
|
||||
var p = _M_1.x;
|
||||
var p = M_2.x;
|
||||
}
|
||||
})(M || (M = {}));
|
||||
var M;
|
||||
(function (_M_2) {
|
||||
(function (M_3) {
|
||||
function fn3() {
|
||||
function M() {
|
||||
var p = _M_2.x;
|
||||
var p = M_3.x;
|
||||
}
|
||||
}
|
||||
})(M || (M = {}));
|
||||
|
||||
@@ -17,29 +17,29 @@ var foo = new m2._m2();
|
||||
|
||||
//// [collisionCodeGenModuleWithMemberClassConflict.js]
|
||||
var m1;
|
||||
(function (_m1) {
|
||||
(function (m1_1) {
|
||||
var m1 = (function () {
|
||||
function m1() {
|
||||
}
|
||||
return m1;
|
||||
})();
|
||||
_m1.m1 = m1;
|
||||
m1_1.m1 = m1;
|
||||
})(m1 || (m1 = {}));
|
||||
var foo = new m1.m1();
|
||||
var m2;
|
||||
(function (_m2_1) {
|
||||
(function (m2_1) {
|
||||
var m2 = (function () {
|
||||
function m2() {
|
||||
}
|
||||
return m2;
|
||||
})();
|
||||
_m2_1.m2 = m2;
|
||||
m2_1.m2 = m2;
|
||||
var _m2 = (function () {
|
||||
function _m2() {
|
||||
}
|
||||
return _m2;
|
||||
})();
|
||||
_m2_1._m2 = _m2;
|
||||
m2_1._m2 = _m2;
|
||||
})(m2 || (m2 = {}));
|
||||
var foo = new m2.m2();
|
||||
var foo = new m2._m2();
|
||||
|
||||
@@ -7,8 +7,8 @@ var foo = m1.m1;
|
||||
|
||||
//// [collisionCodeGenModuleWithMemberVariable.js]
|
||||
var m1;
|
||||
(function (_m1) {
|
||||
_m1.m1 = 10;
|
||||
var b = _m1.m1;
|
||||
(function (m1_1) {
|
||||
m1_1.m1 = 10;
|
||||
var b = m1_1.m1;
|
||||
})(m1 || (m1 = {}));
|
||||
var foo = m1.m1;
|
||||
|
||||
@@ -34,37 +34,37 @@ module M { // Shouldnt bn _M
|
||||
|
||||
//// [collisionCodeGenModuleWithMethodChildren.js]
|
||||
var M;
|
||||
(function (_M) {
|
||||
_M.x = 3;
|
||||
(function (M_1) {
|
||||
M_1.x = 3;
|
||||
var c = (function () {
|
||||
function c() {
|
||||
}
|
||||
c.prototype.fn = function (M, p) {
|
||||
if (p === void 0) { p = _M.x; }
|
||||
if (p === void 0) { p = M_1.x; }
|
||||
};
|
||||
return c;
|
||||
})();
|
||||
})(M || (M = {}));
|
||||
var M;
|
||||
(function (_M_1) {
|
||||
(function (M_2) {
|
||||
var d = (function () {
|
||||
function d() {
|
||||
}
|
||||
d.prototype.fn2 = function () {
|
||||
var M;
|
||||
var p = _M_1.x;
|
||||
var p = M_2.x;
|
||||
};
|
||||
return d;
|
||||
})();
|
||||
})(M || (M = {}));
|
||||
var M;
|
||||
(function (_M_2) {
|
||||
(function (M_3) {
|
||||
var e = (function () {
|
||||
function e() {
|
||||
}
|
||||
e.prototype.fn3 = function () {
|
||||
function M() {
|
||||
var p = _M_2.x;
|
||||
var p = M_3.x;
|
||||
}
|
||||
};
|
||||
return e;
|
||||
|
||||
@@ -44,16 +44,16 @@ module M {
|
||||
|
||||
//// [collisionCodeGenModuleWithModuleChildren.js]
|
||||
var M;
|
||||
(function (_M) {
|
||||
_M.x = 3;
|
||||
(function (M_1) {
|
||||
M_1.x = 3;
|
||||
var m1;
|
||||
(function (m1) {
|
||||
var M = 10;
|
||||
var p = _M.x;
|
||||
var p = M_1.x;
|
||||
})(m1 || (m1 = {}));
|
||||
})(M || (M = {}));
|
||||
var M;
|
||||
(function (_M_1) {
|
||||
(function (M_2) {
|
||||
var m2;
|
||||
(function (m2) {
|
||||
var M = (function () {
|
||||
@@ -61,17 +61,17 @@ var M;
|
||||
}
|
||||
return M;
|
||||
})();
|
||||
var p = _M_1.x;
|
||||
var p = M_2.x;
|
||||
var p2 = new M();
|
||||
})(m2 || (m2 = {}));
|
||||
})(M || (M = {}));
|
||||
var M;
|
||||
(function (_M_2) {
|
||||
(function (M_3) {
|
||||
var m3;
|
||||
(function (m3) {
|
||||
function M() {
|
||||
}
|
||||
var p = _M_2.x;
|
||||
var p = M_3.x;
|
||||
var p2 = M();
|
||||
})(m3 || (m3 = {}));
|
||||
})(M || (M = {}));
|
||||
@@ -84,12 +84,12 @@ var M;
|
||||
})(m3 || (m3 = {}));
|
||||
})(M || (M = {}));
|
||||
var M;
|
||||
(function (_M_3) {
|
||||
(function (M_4) {
|
||||
var m4;
|
||||
(function (m4) {
|
||||
var M;
|
||||
(function (M) {
|
||||
var p = _M_3.x;
|
||||
var p = M_4.x;
|
||||
})(M || (M = {}));
|
||||
})(m4 || (m4 = {}));
|
||||
})(M || (M = {}));
|
||||
|
||||
@@ -31,13 +31,13 @@ var foo2 = new m2.m2();
|
||||
|
||||
//// [collisionCodeGenModuleWithModuleReopening.js]
|
||||
var m1;
|
||||
(function (_m1) {
|
||||
(function (m1_1) {
|
||||
var m1 = (function () {
|
||||
function m1() {
|
||||
}
|
||||
return m1;
|
||||
})();
|
||||
_m1.m1 = m1;
|
||||
m1_1.m1 = m1;
|
||||
})(m1 || (m1 = {}));
|
||||
var foo = new m1.m1();
|
||||
var m1;
|
||||
@@ -65,16 +65,16 @@ var m2;
|
||||
})(m2 || (m2 = {}));
|
||||
var foo3 = new m2.c1();
|
||||
var m2;
|
||||
(function (_m2) {
|
||||
(function (m2_1) {
|
||||
var m2 = (function () {
|
||||
function m2() {
|
||||
}
|
||||
return m2;
|
||||
})();
|
||||
_m2.m2 = m2;
|
||||
m2_1.m2 = m2;
|
||||
var b = new m2();
|
||||
var d = _m2.b10;
|
||||
var c = new _m2.c1();
|
||||
var d = m2_1.b10;
|
||||
var c = new m2_1.c1();
|
||||
})(m2 || (m2 = {}));
|
||||
var foo3 = new m2.c1();
|
||||
var foo2 = new m2.m2();
|
||||
|
||||
@@ -10,7 +10,7 @@ var foo = new m1.c1();
|
||||
|
||||
//// [collisionCodeGenModuleWithPrivateMember.js]
|
||||
var m1;
|
||||
(function (_m1) {
|
||||
(function (m1_1) {
|
||||
var m1 = (function () {
|
||||
function m1() {
|
||||
}
|
||||
@@ -22,6 +22,6 @@ var m1;
|
||||
}
|
||||
return c1;
|
||||
})();
|
||||
_m1.c1 = c1;
|
||||
m1_1.c1 = c1;
|
||||
})(m1 || (m1 = {}));
|
||||
var foo = new m1.c1();
|
||||
|
||||
@@ -11,12 +11,12 @@ var x = new 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكو
|
||||
|
||||
//// [collisionCodeGenModuleWithUnicodeNames.js]
|
||||
var 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123;
|
||||
(function (_才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123) {
|
||||
(function (才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123_1) {
|
||||
var 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 = (function () {
|
||||
function 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123() {
|
||||
}
|
||||
return 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123;
|
||||
})();
|
||||
_才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123.才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 = 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123;
|
||||
才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123_1.才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 = 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123;
|
||||
})(才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 || (才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123 = {}));
|
||||
var x = new 才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123.才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüß才能ソЫⅨ蒤郳र्क्ड्राüışğİliيونيكودöÄüßAbcd123();
|
||||
|
||||
@@ -13,13 +13,13 @@ export = b;
|
||||
var m;
|
||||
(function (m) {
|
||||
var c;
|
||||
(function (_c) {
|
||||
(function (c_1) {
|
||||
var c = (function () {
|
||||
function c() {
|
||||
}
|
||||
return c;
|
||||
})();
|
||||
_c.c = c;
|
||||
c_1.c = c;
|
||||
})(c = m.c || (m.c = {}));
|
||||
})(m || (m = {}));
|
||||
var a = m.c;
|
||||
|
||||
@@ -73,8 +73,8 @@ function f15() {
|
||||
var _f = f15(), a4 = _f.a4, b4 = _f.b4, c4 = _f.c4;
|
||||
var m;
|
||||
(function (m) {
|
||||
_g = f15(), m.a4 = _g.a4, m.b4 = _g.b4, m.c4 = _g.c4;
|
||||
var _g;
|
||||
_a = f15(), m.a4 = _a.a4, m.b4 = _a.b4, m.c4 = _a.c4;
|
||||
var _a;
|
||||
})(m || (m = {}));
|
||||
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ function f15() {
|
||||
var _c = f15(), a4 = _c.a4, b4 = _c.b4, c4 = _c.c4;
|
||||
var m;
|
||||
(function (m) {
|
||||
_d = f15(), m.a4 = _d.a4, m.b4 = _d.b4, m.c4 = _d.c4;
|
||||
var _d;
|
||||
_a = f15(), m.a4 = _a.a4, m.b4 = _a.b4, m.c4 = _a.c4;
|
||||
var _a;
|
||||
})(m || (m = {}));
|
||||
|
||||
|
||||
|
||||
@@ -14,13 +14,13 @@ export = m;
|
||||
var m;
|
||||
(function (m) {
|
||||
var c;
|
||||
(function (_c) {
|
||||
(function (c_1) {
|
||||
var c = (function () {
|
||||
function c() {
|
||||
}
|
||||
return c;
|
||||
})();
|
||||
_c.c = c;
|
||||
c_1.c = c;
|
||||
})(c = m.c || (m.c = {}));
|
||||
m.a;
|
||||
})(m || (m = {}));
|
||||
|
||||
@@ -59,24 +59,24 @@ use(y);
|
||||
var x = 10;
|
||||
var z0, z1, z2, z3;
|
||||
{
|
||||
var _x = 20;
|
||||
use(_x);
|
||||
var _z0 = ([
|
||||
var x_1 = 20;
|
||||
use(x_1);
|
||||
var z0_1 = ([
|
||||
1
|
||||
])[0];
|
||||
use(_z0);
|
||||
var _z1 = ([
|
||||
use(z0_1);
|
||||
var z1_1 = ([
|
||||
1
|
||||
])[0];
|
||||
use(_z1);
|
||||
var _z2 = ({
|
||||
use(z1_1);
|
||||
var z2_1 = ({
|
||||
a: 1
|
||||
}).a;
|
||||
use(_z2);
|
||||
var _z3 = ({
|
||||
use(z2_1);
|
||||
var z3_1 = ({
|
||||
a: 1
|
||||
}).a;
|
||||
use(_z3);
|
||||
use(z3_1);
|
||||
}
|
||||
use(x);
|
||||
use(z0);
|
||||
@@ -86,38 +86,38 @@ use(z3);
|
||||
var z6;
|
||||
var y = true;
|
||||
{
|
||||
var _y = "";
|
||||
var _z6 = ([
|
||||
var y_1 = "";
|
||||
var z6_1 = ([
|
||||
true
|
||||
])[0];
|
||||
{
|
||||
var _y_1 = 1;
|
||||
var _z6_1 = ({
|
||||
var y_2 = 1;
|
||||
var z6_2 = ({
|
||||
a: 1
|
||||
}).a;
|
||||
use(_y_1);
|
||||
use(_z6_1);
|
||||
use(y_2);
|
||||
use(z6_2);
|
||||
}
|
||||
use(_y);
|
||||
use(_z6);
|
||||
use(y_1);
|
||||
use(z6_1);
|
||||
}
|
||||
use(y);
|
||||
use(z6);
|
||||
var z = false;
|
||||
var z5 = 1;
|
||||
{
|
||||
var _z = "";
|
||||
var _z5 = ([
|
||||
var z_1 = "";
|
||||
var z5_1 = ([
|
||||
5
|
||||
])[0];
|
||||
{
|
||||
var _z_1 = 1;
|
||||
var _z5_1 = ({
|
||||
var _z = 1;
|
||||
var _z5 = ({
|
||||
a: 1
|
||||
}).a;
|
||||
// try to step on generated name
|
||||
use(_z_1);
|
||||
use(_z);
|
||||
}
|
||||
use(_z);
|
||||
use(z_1);
|
||||
}
|
||||
use(y);
|
||||
|
||||
@@ -59,28 +59,28 @@ use(y);
|
||||
var x = 10;
|
||||
var z0, z1, z2, z3;
|
||||
{
|
||||
var _x = 20;
|
||||
use(_x);
|
||||
var _z0 = ([
|
||||
var x_1 = 20;
|
||||
use(x_1);
|
||||
var z0_1 = ([
|
||||
1
|
||||
])[0];
|
||||
use(_z0);
|
||||
var _z1 = ([
|
||||
use(z0_1);
|
||||
var z1_1 = ([
|
||||
{
|
||||
a: 1
|
||||
}
|
||||
])[0].a;
|
||||
use(_z1);
|
||||
var _z2 = ({
|
||||
use(z1_1);
|
||||
var z2_1 = ({
|
||||
a: 1
|
||||
}).a;
|
||||
use(_z2);
|
||||
var _z3 = ({
|
||||
use(z2_1);
|
||||
var z3_1 = ({
|
||||
a: {
|
||||
b: 1
|
||||
}
|
||||
}).a.b;
|
||||
use(_z3);
|
||||
use(z3_1);
|
||||
}
|
||||
use(x);
|
||||
use(z0);
|
||||
@@ -90,38 +90,38 @@ use(z3);
|
||||
var z6;
|
||||
var y = true;
|
||||
{
|
||||
var _y = "";
|
||||
var _z6 = ([
|
||||
var y_1 = "";
|
||||
var z6_1 = ([
|
||||
true
|
||||
])[0];
|
||||
{
|
||||
var _y_1 = 1;
|
||||
var _z6_1 = ({
|
||||
var y_2 = 1;
|
||||
var z6_2 = ({
|
||||
a: 1
|
||||
}).a;
|
||||
use(_y_1);
|
||||
use(_z6_1);
|
||||
use(y_2);
|
||||
use(z6_2);
|
||||
}
|
||||
use(_y);
|
||||
use(_z6);
|
||||
use(y_1);
|
||||
use(z6_1);
|
||||
}
|
||||
use(y);
|
||||
use(z6);
|
||||
var z = false;
|
||||
var z5 = 1;
|
||||
{
|
||||
var _z = "";
|
||||
var _z5 = ([
|
||||
var z_1 = "";
|
||||
var z5_1 = ([
|
||||
5
|
||||
])[0];
|
||||
{
|
||||
var _z_1 = 1;
|
||||
var _z5_1 = ({
|
||||
var _z = 1;
|
||||
var _z5 = ({
|
||||
a: 1
|
||||
}).a;
|
||||
// try to step on generated name
|
||||
use(_z_1);
|
||||
use(_z);
|
||||
}
|
||||
use(_z);
|
||||
use(z_1);
|
||||
}
|
||||
use(y);
|
||||
|
||||
@@ -236,29 +236,29 @@ use(x);
|
||||
use(y);
|
||||
use(z);
|
||||
function foo1() {
|
||||
var _x = 1;
|
||||
use(_x);
|
||||
var _y = ([
|
||||
var x = 1;
|
||||
use(x);
|
||||
var y = ([
|
||||
1
|
||||
])[0];
|
||||
use(_y);
|
||||
var _z = ({
|
||||
use(y);
|
||||
var z = ({
|
||||
a: 1
|
||||
}).a;
|
||||
use(_z);
|
||||
use(z);
|
||||
}
|
||||
function foo2() {
|
||||
{
|
||||
var _x = 1;
|
||||
use(_x);
|
||||
var _y = ([
|
||||
var x_1 = 1;
|
||||
use(x_1);
|
||||
var y_1 = ([
|
||||
1
|
||||
])[0];
|
||||
use(_y);
|
||||
var _z = ({
|
||||
use(y_1);
|
||||
var z_1 = ({
|
||||
a: 1
|
||||
}).a;
|
||||
use(_z);
|
||||
use(z_1);
|
||||
}
|
||||
use(x);
|
||||
}
|
||||
@@ -266,29 +266,29 @@ var A = (function () {
|
||||
function A() {
|
||||
}
|
||||
A.prototype.m1 = function () {
|
||||
var _x = 1;
|
||||
use(_x);
|
||||
var _y = ([
|
||||
var x = 1;
|
||||
use(x);
|
||||
var y = ([
|
||||
1
|
||||
])[0];
|
||||
use(_y);
|
||||
var _z = ({
|
||||
use(y);
|
||||
var z = ({
|
||||
a: 1
|
||||
}).a;
|
||||
use(_z);
|
||||
use(z);
|
||||
};
|
||||
A.prototype.m2 = function () {
|
||||
{
|
||||
var _x = 1;
|
||||
use(_x);
|
||||
var _y = ([
|
||||
var x_2 = 1;
|
||||
use(x_2);
|
||||
var y_2 = ([
|
||||
1
|
||||
])[0];
|
||||
use(_y);
|
||||
var _z = ({
|
||||
use(y_2);
|
||||
var z_2 = ({
|
||||
a: 1
|
||||
}).a;
|
||||
use(_z);
|
||||
use(z_2);
|
||||
}
|
||||
use(x);
|
||||
};
|
||||
@@ -298,200 +298,200 @@ var B = (function () {
|
||||
function B() {
|
||||
}
|
||||
B.prototype.m1 = function () {
|
||||
var _x = 1;
|
||||
use(_x);
|
||||
var _y = ([
|
||||
var x = 1;
|
||||
use(x);
|
||||
var y = ([
|
||||
1
|
||||
])[0];
|
||||
use(_y);
|
||||
var _z = ({
|
||||
use(y);
|
||||
var z = ({
|
||||
a: 1
|
||||
}).a;
|
||||
use(_z);
|
||||
use(z);
|
||||
};
|
||||
B.prototype.m2 = function () {
|
||||
{
|
||||
var _x = 1;
|
||||
use(_x);
|
||||
var _y = ([
|
||||
var x_3 = 1;
|
||||
use(x_3);
|
||||
var y_3 = ([
|
||||
1
|
||||
])[0];
|
||||
use(_y);
|
||||
var _z = ({
|
||||
use(y_3);
|
||||
var z_3 = ({
|
||||
a: 1
|
||||
}).a;
|
||||
use(_z);
|
||||
use(z_3);
|
||||
}
|
||||
use(x);
|
||||
};
|
||||
return B;
|
||||
})();
|
||||
function bar1() {
|
||||
var _x = 1;
|
||||
use(_x);
|
||||
var _y = ([
|
||||
var x = 1;
|
||||
use(x);
|
||||
var y = ([
|
||||
1
|
||||
])[0];
|
||||
use(_y);
|
||||
var _z = ({
|
||||
use(y);
|
||||
var z = ({
|
||||
a: 1
|
||||
}).a;
|
||||
use(_z);
|
||||
use(z);
|
||||
}
|
||||
function bar2() {
|
||||
{
|
||||
var _x = 1;
|
||||
use(_x);
|
||||
var _y = ([
|
||||
var x_4 = 1;
|
||||
use(x_4);
|
||||
var y_4 = ([
|
||||
1
|
||||
])[0];
|
||||
use(_y);
|
||||
var _z = ({
|
||||
use(y_4);
|
||||
var z_4 = ({
|
||||
a: 1
|
||||
}).a;
|
||||
use(_z);
|
||||
use(z_4);
|
||||
}
|
||||
use(x);
|
||||
}
|
||||
var M1;
|
||||
(function (M1) {
|
||||
var _x = 1;
|
||||
use(_x);
|
||||
var _y = ([
|
||||
var x = 1;
|
||||
use(x);
|
||||
var y = ([
|
||||
1
|
||||
])[0];
|
||||
use(_y);
|
||||
var _z = ({
|
||||
use(y);
|
||||
var z = ({
|
||||
a: 1
|
||||
}).a;
|
||||
use(_z);
|
||||
use(z);
|
||||
})(M1 || (M1 = {}));
|
||||
var M2;
|
||||
(function (M2) {
|
||||
{
|
||||
var _x = 1;
|
||||
use(_x);
|
||||
var _y = ([
|
||||
var x_5 = 1;
|
||||
use(x_5);
|
||||
var y_5 = ([
|
||||
1
|
||||
])[0];
|
||||
use(_y);
|
||||
var _z = ({
|
||||
use(y_5);
|
||||
var z_5 = ({
|
||||
a: 1
|
||||
}).a;
|
||||
use(_z);
|
||||
use(z_5);
|
||||
}
|
||||
use(x);
|
||||
})(M2 || (M2 = {}));
|
||||
var M3;
|
||||
(function (M3) {
|
||||
var _x = 1;
|
||||
use(_x);
|
||||
var _y = ([
|
||||
var x = 1;
|
||||
use(x);
|
||||
var y = ([
|
||||
1
|
||||
])[0];
|
||||
use(_y);
|
||||
var _z = ({
|
||||
use(y);
|
||||
var z = ({
|
||||
a: 1
|
||||
}).a;
|
||||
use(_z);
|
||||
use(z);
|
||||
})(M3 || (M3 = {}));
|
||||
var M4;
|
||||
(function (M4) {
|
||||
{
|
||||
var _x = 1;
|
||||
use(_x);
|
||||
var _y = ([
|
||||
var x_6 = 1;
|
||||
use(x_6);
|
||||
var y_6 = ([
|
||||
1
|
||||
])[0];
|
||||
use(_y);
|
||||
var _z = ({
|
||||
use(y_6);
|
||||
var z_6 = ({
|
||||
a: 1
|
||||
}).a;
|
||||
use(_z);
|
||||
use(z_6);
|
||||
}
|
||||
use(x);
|
||||
use(y);
|
||||
use(z);
|
||||
})(M4 || (M4 = {}));
|
||||
function foo3() {
|
||||
for (var _x = void 0;;) {
|
||||
use(_x);
|
||||
for (var x_7 = void 0;;) {
|
||||
use(x_7);
|
||||
}
|
||||
for (var _y = ([])[0];;) {
|
||||
use(_y);
|
||||
for (var y_7 = ([])[0];;) {
|
||||
use(y_7);
|
||||
}
|
||||
for (var _z = ({
|
||||
for (var z_7 = ({
|
||||
a: 1
|
||||
}).a;;) {
|
||||
use(_z);
|
||||
use(z_7);
|
||||
}
|
||||
use(x);
|
||||
}
|
||||
function foo4() {
|
||||
for (var _x = 1;;) {
|
||||
use(_x);
|
||||
for (var x_8 = 1;;) {
|
||||
use(x_8);
|
||||
}
|
||||
for (var _y = ([])[0];;) {
|
||||
use(_y);
|
||||
for (var y_8 = ([])[0];;) {
|
||||
use(y_8);
|
||||
}
|
||||
for (var _z = ({
|
||||
for (var z_8 = ({
|
||||
a: 1
|
||||
}).a;;) {
|
||||
use(_z);
|
||||
use(z_8);
|
||||
}
|
||||
use(x);
|
||||
}
|
||||
function foo5() {
|
||||
for (var _x in []) {
|
||||
use(_x);
|
||||
for (var x_9 in []) {
|
||||
use(x_9);
|
||||
}
|
||||
use(x);
|
||||
}
|
||||
function foo6() {
|
||||
for (var _x in []) {
|
||||
use(_x);
|
||||
for (var x_10 in []) {
|
||||
use(x_10);
|
||||
}
|
||||
use(x);
|
||||
}
|
||||
function foo7() {
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var _x = _a[_i];
|
||||
use(_x);
|
||||
var x_11 = _a[_i];
|
||||
use(x_11);
|
||||
}
|
||||
use(x);
|
||||
}
|
||||
function foo8() {
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var _x = _a[_i][0];
|
||||
use(_x);
|
||||
var x_12 = _a[_i][0];
|
||||
use(x_12);
|
||||
}
|
||||
use(x);
|
||||
}
|
||||
function foo9() {
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var _x = _a[_i].a;
|
||||
use(_x);
|
||||
var x_13 = _a[_i].a;
|
||||
use(x_13);
|
||||
}
|
||||
use(x);
|
||||
}
|
||||
function foo10() {
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var _x = _a[_i];
|
||||
use(_x);
|
||||
var x_14 = _a[_i];
|
||||
use(x_14);
|
||||
}
|
||||
use(x);
|
||||
}
|
||||
function foo11() {
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var _x = _a[_i][0];
|
||||
use(_x);
|
||||
var x_15 = _a[_i][0];
|
||||
use(x_15);
|
||||
}
|
||||
use(x);
|
||||
}
|
||||
function foo12() {
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var _x = _a[_i].a;
|
||||
use(_x);
|
||||
var x_16 = _a[_i].a;
|
||||
use(x_16);
|
||||
}
|
||||
use(x);
|
||||
}
|
||||
|
||||
@@ -70,54 +70,54 @@ for (const x of []) {
|
||||
//// [downlevelLetConst17.js]
|
||||
'use strict';
|
||||
var x;
|
||||
for (var _x = 10;;) {
|
||||
use(_x);
|
||||
for (var x_1 = 10;;) {
|
||||
use(x_1);
|
||||
}
|
||||
use(x);
|
||||
for (var _x_1 = 10;;) {
|
||||
use(_x_1);
|
||||
for (var x_2 = 10;;) {
|
||||
use(x_2);
|
||||
}
|
||||
for (;;) {
|
||||
var _x_2 = 10;
|
||||
use(_x_2);
|
||||
_x_2 = 1;
|
||||
var x_3 = 10;
|
||||
use(x_3);
|
||||
x_3 = 1;
|
||||
}
|
||||
for (;;) {
|
||||
var _x_3 = 10;
|
||||
use(_x_3);
|
||||
var x_4 = 10;
|
||||
use(x_4);
|
||||
}
|
||||
for (var _x_4 = void 0;;) {
|
||||
use(_x_4);
|
||||
_x_4 = 1;
|
||||
for (var x_5 = void 0;;) {
|
||||
use(x_5);
|
||||
x_5 = 1;
|
||||
}
|
||||
for (;;) {
|
||||
var _x_5 = void 0;
|
||||
use(_x_5);
|
||||
_x_5 = 1;
|
||||
var x_6 = void 0;
|
||||
use(x_6);
|
||||
x_6 = 1;
|
||||
}
|
||||
while (true) {
|
||||
var _x_6 = void 0;
|
||||
use(_x_6);
|
||||
var x_7 = void 0;
|
||||
use(x_7);
|
||||
}
|
||||
while (true) {
|
||||
var _x_7 = true;
|
||||
use(_x_7);
|
||||
var x_8 = true;
|
||||
use(x_8);
|
||||
}
|
||||
do {
|
||||
var _x_8 = void 0;
|
||||
use(_x_8);
|
||||
var x_9 = void 0;
|
||||
use(x_9);
|
||||
} while (true);
|
||||
do {
|
||||
var _x_9 = void 0;
|
||||
use(_x_9);
|
||||
var x_10 = void 0;
|
||||
use(x_10);
|
||||
} while (true);
|
||||
for (var _x_10 in []) {
|
||||
use(_x_10);
|
||||
for (var x_11 in []) {
|
||||
use(x_11);
|
||||
}
|
||||
for (var _x_11 in []) {
|
||||
use(_x_11);
|
||||
for (var x_12 in []) {
|
||||
use(x_12);
|
||||
}
|
||||
for (var _i = 0, _a = []; _i < _a.length; _i++) {
|
||||
var _x_12 = _a[_i];
|
||||
use(_x_12);
|
||||
var x_13 = _a[_i];
|
||||
use(x_13);
|
||||
}
|
||||
|
||||
@@ -38,40 +38,40 @@ for (var x = void 0;;) {
|
||||
}
|
||||
;
|
||||
}
|
||||
for (var _x = void 0;;) {
|
||||
for (var x = void 0;;) {
|
||||
function foo() {
|
||||
_x;
|
||||
x;
|
||||
}
|
||||
;
|
||||
}
|
||||
for (var _x_1 = void 0;;) {
|
||||
for (var x = void 0;;) {
|
||||
(function () {
|
||||
_x_1;
|
||||
x;
|
||||
})();
|
||||
}
|
||||
for (var _x_2 = 1;;) {
|
||||
for (var x = 1;;) {
|
||||
(function () {
|
||||
_x_2;
|
||||
x;
|
||||
})();
|
||||
}
|
||||
for (var _x_3 = void 0;;) {
|
||||
for (var x = void 0;;) {
|
||||
({
|
||||
foo: function () {
|
||||
_x_3;
|
||||
x;
|
||||
}
|
||||
});
|
||||
}
|
||||
for (var _x_4 = void 0;;) {
|
||||
for (var x = void 0;;) {
|
||||
({
|
||||
get foo() {
|
||||
return _x_4;
|
||||
return x;
|
||||
}
|
||||
});
|
||||
}
|
||||
for (var _x_5 = void 0;;) {
|
||||
for (var x = void 0;;) {
|
||||
({
|
||||
set foo(v) {
|
||||
_x_5;
|
||||
x;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -24,14 +24,14 @@ use(x)
|
||||
var x;
|
||||
function a() {
|
||||
{
|
||||
var _x;
|
||||
use(_x);
|
||||
var x_1;
|
||||
use(x_1);
|
||||
function b() {
|
||||
{
|
||||
var _x_1;
|
||||
use(_x_1);
|
||||
var x_2;
|
||||
use(x_2);
|
||||
}
|
||||
use(_x);
|
||||
use(x_1);
|
||||
}
|
||||
}
|
||||
use(x);
|
||||
|
||||
@@ -56,8 +56,8 @@ var y = (function () {
|
||||
module.exports = x;
|
||||
//// [foo3.js]
|
||||
var x;
|
||||
(function (_x) {
|
||||
_x.x = 10;
|
||||
(function (x_1) {
|
||||
x_1.x = 10;
|
||||
})(x || (x = {}));
|
||||
var y = (function () {
|
||||
function y() {
|
||||
|
||||
@@ -6,14 +6,14 @@ export default class {
|
||||
|
||||
|
||||
//// [es5ExportDefaultClassDeclaration2.js]
|
||||
var _default = (function () {
|
||||
function _default() {
|
||||
var default_1 = (function () {
|
||||
function default_1() {
|
||||
}
|
||||
_default.prototype.method = function () {
|
||||
default_1.prototype.method = function () {
|
||||
};
|
||||
return _default;
|
||||
return default_1;
|
||||
})();
|
||||
module.exports = _default;
|
||||
module.exports = default_1;
|
||||
|
||||
|
||||
//// [es5ExportDefaultClassDeclaration2.d.ts]
|
||||
|
||||
@@ -6,7 +6,7 @@ export default function () { }
|
||||
//// [es5ExportDefaultFunctionDeclaration2.js]
|
||||
function () {
|
||||
}
|
||||
module.exports = _default;
|
||||
module.exports = default_1;
|
||||
|
||||
|
||||
//// [es5ExportDefaultFunctionDeclaration2.d.ts]
|
||||
|
||||
@@ -29,8 +29,8 @@ var m;
|
||||
})(m = exports.m || (exports.m = {}));
|
||||
exports.x = 10;
|
||||
//// [client.js]
|
||||
var _server = require("server");
|
||||
for (var _a in _server) if (!exports.hasOwnProperty(_a)) exports[_a] = _server[_a];
|
||||
var server_1 = require("server");
|
||||
for (var _a in server_1) if (!exports.hasOwnProperty(_a)) exports[_a] = server_1[_a];
|
||||
|
||||
|
||||
//// [server.d.ts]
|
||||
|
||||
@@ -33,17 +33,17 @@ var m;
|
||||
})(m = exports.m || (exports.m = {}));
|
||||
exports.x = 10;
|
||||
//// [client.js]
|
||||
var _server = require("server");
|
||||
exports.c = _server.c;
|
||||
var _server_1 = require("server");
|
||||
exports.c2 = _server_1.c;
|
||||
var _server_2 = require("server");
|
||||
exports.i = _server_2.i;
|
||||
exports.instantiatedModule = _server_2.m;
|
||||
var _server_3 = require("server");
|
||||
exports.uninstantiated = _server_3.uninstantiated;
|
||||
var _server_4 = require("server");
|
||||
exports.x = _server_4.x;
|
||||
var server_1 = require("server");
|
||||
exports.c = server_1.c;
|
||||
var server_2 = require("server");
|
||||
exports.c2 = server_2.c;
|
||||
var server_3 = require("server");
|
||||
exports.i = server_3.i;
|
||||
exports.instantiatedModule = server_3.m;
|
||||
var server_4 = require("server");
|
||||
exports.uninstantiated = server_4.uninstantiated;
|
||||
var server_5 = require("server");
|
||||
exports.x = server_5.x;
|
||||
|
||||
|
||||
//// [server.d.ts]
|
||||
|
||||
@@ -62,17 +62,17 @@ var x11 = (function () {
|
||||
})();
|
||||
exports.x11 = x11;
|
||||
//// [client.js]
|
||||
var _server_1 = require("server");
|
||||
exports.x1 = new _server_1.a();
|
||||
var _server_2 = require("server");
|
||||
exports.x2 = new _server_2.a11();
|
||||
var _server_3 = require("server");
|
||||
exports.x4 = new _server_3.x();
|
||||
exports.x5 = new _server_3.a12();
|
||||
var _server_4 = require("server");
|
||||
exports.x3 = new _server_4.x11();
|
||||
var _server_5 = require("server");
|
||||
exports.x6 = new _server_5.m();
|
||||
var server_1 = require("server");
|
||||
exports.x1 = new server_1.a();
|
||||
var server_2 = require("server");
|
||||
exports.x2 = new server_2.a11();
|
||||
var server_3 = require("server");
|
||||
exports.x4 = new server_3.x();
|
||||
exports.x5 = new server_3.a12();
|
||||
var server_4 = require("server");
|
||||
exports.x3 = new server_4.x11();
|
||||
var server_5 = require("server");
|
||||
exports.x6 = new server_5.m();
|
||||
|
||||
|
||||
//// [server.d.ts]
|
||||
|
||||
@@ -26,17 +26,17 @@ exports.a = 10;
|
||||
exports.x = exports.a;
|
||||
exports.m = exports.a;
|
||||
//// [es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.js]
|
||||
var _es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_1 = require("es6ImportDefaultBindingFollowedWithNamedImportInEs5_0");
|
||||
var x1 = _es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_1.a;
|
||||
var _es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_2 = require("es6ImportDefaultBindingFollowedWithNamedImportInEs5_0");
|
||||
var x1 = _es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_2.a;
|
||||
var _es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_3 = require("es6ImportDefaultBindingFollowedWithNamedImportInEs5_0");
|
||||
var x1 = _es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_3.x;
|
||||
var x1 = _es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_3.a;
|
||||
var _es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_4 = require("es6ImportDefaultBindingFollowedWithNamedImportInEs5_0");
|
||||
var x1 = _es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_4.x;
|
||||
var _es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_5 = require("es6ImportDefaultBindingFollowedWithNamedImportInEs5_0");
|
||||
var x1 = _es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_5.m;
|
||||
var es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_1 = require("es6ImportDefaultBindingFollowedWithNamedImportInEs5_0");
|
||||
var x1 = es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_1.a;
|
||||
var es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_2 = require("es6ImportDefaultBindingFollowedWithNamedImportInEs5_0");
|
||||
var x1 = es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_2.a;
|
||||
var es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_3 = require("es6ImportDefaultBindingFollowedWithNamedImportInEs5_0");
|
||||
var x1 = es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_3.x;
|
||||
var x1 = es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_3.a;
|
||||
var es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_4 = require("es6ImportDefaultBindingFollowedWithNamedImportInEs5_0");
|
||||
var x1 = es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_4.x;
|
||||
var es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_5 = require("es6ImportDefaultBindingFollowedWithNamedImportInEs5_0");
|
||||
var x1 = es6ImportDefaultBindingFollowedWithNamedImportInEs5_0_5.m;
|
||||
|
||||
|
||||
//// [es6ImportDefaultBindingFollowedWithNamedImportInEs5_0.d.ts]
|
||||
|
||||
+7
-7
@@ -28,13 +28,13 @@ define(["require", "exports"], function (require, exports) {
|
||||
exports.m = exports.a;
|
||||
});
|
||||
//// [client.js]
|
||||
define(["require", "exports", "server", "server", "server", "server", "server"], function (require, exports, _server_1, _server_2, _server_3, _server_4, _server_5) {
|
||||
exports.x1 = _server_1.a;
|
||||
exports.x1 = _server_2.a;
|
||||
exports.x1 = _server_3.x;
|
||||
exports.x1 = _server_3.a;
|
||||
exports.x1 = _server_4.x;
|
||||
exports.x1 = _server_5.m;
|
||||
define(["require", "exports", "server", "server", "server", "server", "server"], function (require, exports, server_1, server_2, server_3, server_4, server_5) {
|
||||
exports.x1 = server_1.a;
|
||||
exports.x1 = server_2.a;
|
||||
exports.x1 = server_3.x;
|
||||
exports.x1 = server_3.a;
|
||||
exports.x1 = server_4.x;
|
||||
exports.x1 = server_5.m;
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -53,19 +53,19 @@ define(["require", "exports"], function (require, exports) {
|
||||
exports.aaaa = 10;
|
||||
});
|
||||
//// [es6ImportNamedImportAmd_1.js]
|
||||
define(["require", "exports", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0"], function (require, exports, _es6ImportNamedImportAmd_0_1, _es6ImportNamedImportAmd_0_2, _es6ImportNamedImportAmd_0_3, _es6ImportNamedImportAmd_0_4, _es6ImportNamedImportAmd_0_5, _es6ImportNamedImportAmd_0_6, _es6ImportNamedImportAmd_0_7, _es6ImportNamedImportAmd_0_8, _es6ImportNamedImportAmd_0_9) {
|
||||
var xxxx = _es6ImportNamedImportAmd_0_1.a;
|
||||
var xxxx = _es6ImportNamedImportAmd_0_2.a;
|
||||
var xxxx = _es6ImportNamedImportAmd_0_3.x;
|
||||
var xxxx = _es6ImportNamedImportAmd_0_3.a;
|
||||
var xxxx = _es6ImportNamedImportAmd_0_4.x;
|
||||
var xxxx = _es6ImportNamedImportAmd_0_5.m;
|
||||
var xxxx = _es6ImportNamedImportAmd_0_6.a1;
|
||||
var xxxx = _es6ImportNamedImportAmd_0_6.x1;
|
||||
var xxxx = _es6ImportNamedImportAmd_0_7.a1;
|
||||
var xxxx = _es6ImportNamedImportAmd_0_7.x1;
|
||||
var z111 = _es6ImportNamedImportAmd_0_8.z1;
|
||||
var z2 = _es6ImportNamedImportAmd_0_9.z2; // z2 shouldn't give redeclare error
|
||||
define(["require", "exports", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0", "es6ImportNamedImportAmd_0"], function (require, exports, es6ImportNamedImportAmd_0_1, es6ImportNamedImportAmd_0_2, es6ImportNamedImportAmd_0_3, es6ImportNamedImportAmd_0_4, es6ImportNamedImportAmd_0_5, es6ImportNamedImportAmd_0_6, es6ImportNamedImportAmd_0_7, es6ImportNamedImportAmd_0_8, es6ImportNamedImportAmd_0_9) {
|
||||
var xxxx = es6ImportNamedImportAmd_0_1.a;
|
||||
var xxxx = es6ImportNamedImportAmd_0_2.a;
|
||||
var xxxx = es6ImportNamedImportAmd_0_3.x;
|
||||
var xxxx = es6ImportNamedImportAmd_0_3.a;
|
||||
var xxxx = es6ImportNamedImportAmd_0_4.x;
|
||||
var xxxx = es6ImportNamedImportAmd_0_5.m;
|
||||
var xxxx = es6ImportNamedImportAmd_0_6.a1;
|
||||
var xxxx = es6ImportNamedImportAmd_0_6.x1;
|
||||
var xxxx = es6ImportNamedImportAmd_0_7.a1;
|
||||
var xxxx = es6ImportNamedImportAmd_0_7.x1;
|
||||
var z111 = es6ImportNamedImportAmd_0_8.z1;
|
||||
var z2 = es6ImportNamedImportAmd_0_9.z2; // z2 shouldn't give redeclare error
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -132,27 +132,27 @@ var aaaa1 = (function () {
|
||||
})();
|
||||
exports.aaaa1 = aaaa1;
|
||||
//// [client.js]
|
||||
var _server_1 = require("server");
|
||||
exports.xxxx = new _server_1.a();
|
||||
var _server_2 = require("server");
|
||||
exports.xxxx1 = new _server_2.a11();
|
||||
var _server_3 = require("server");
|
||||
exports.xxxx2 = new _server_3.x();
|
||||
exports.xxxx3 = new _server_3.a12();
|
||||
var _server_4 = require("server");
|
||||
exports.xxxx4 = new _server_4.x11();
|
||||
var _server_5 = require("server");
|
||||
exports.xxxx5 = new _server_5.m();
|
||||
var _server_6 = require("server");
|
||||
exports.xxxx6 = new _server_6.a1();
|
||||
exports.xxxx7 = new _server_6.x1();
|
||||
var _server_7 = require("server");
|
||||
exports.xxxx8 = new _server_7.a111();
|
||||
exports.xxxx9 = new _server_7.x111();
|
||||
var _server_8 = require("server");
|
||||
exports.z111 = new _server_8.z1();
|
||||
var _server_9 = require("server");
|
||||
exports.z2 = new _server_9.z2(); // z2 shouldn't give redeclare error
|
||||
var server_1 = require("server");
|
||||
exports.xxxx = new server_1.a();
|
||||
var server_2 = require("server");
|
||||
exports.xxxx1 = new server_2.a11();
|
||||
var server_3 = require("server");
|
||||
exports.xxxx2 = new server_3.x();
|
||||
exports.xxxx3 = new server_3.a12();
|
||||
var server_4 = require("server");
|
||||
exports.xxxx4 = new server_4.x11();
|
||||
var server_5 = require("server");
|
||||
exports.xxxx5 = new server_5.m();
|
||||
var server_6 = require("server");
|
||||
exports.xxxx6 = new server_6.a1();
|
||||
exports.xxxx7 = new server_6.x1();
|
||||
var server_7 = require("server");
|
||||
exports.xxxx8 = new server_7.a111();
|
||||
exports.xxxx9 = new server_7.x111();
|
||||
var server_8 = require("server");
|
||||
exports.z111 = new server_8.z1();
|
||||
var server_9 = require("server");
|
||||
exports.z2 = new server_9.z2(); // z2 shouldn't give redeclare error
|
||||
|
||||
|
||||
//// [server.d.ts]
|
||||
|
||||
@@ -51,27 +51,27 @@ exports.z1 = 10;
|
||||
exports.z2 = 10;
|
||||
exports.aaaa = 10;
|
||||
//// [es6ImportNamedImportInEs5_1.js]
|
||||
var _es6ImportNamedImportInEs5_0_1 = require("es6ImportNamedImportInEs5_0");
|
||||
var xxxx = _es6ImportNamedImportInEs5_0_1.a;
|
||||
var _es6ImportNamedImportInEs5_0_2 = require("es6ImportNamedImportInEs5_0");
|
||||
var xxxx = _es6ImportNamedImportInEs5_0_2.a;
|
||||
var _es6ImportNamedImportInEs5_0_3 = require("es6ImportNamedImportInEs5_0");
|
||||
var xxxx = _es6ImportNamedImportInEs5_0_3.x;
|
||||
var xxxx = _es6ImportNamedImportInEs5_0_3.a;
|
||||
var _es6ImportNamedImportInEs5_0_4 = require("es6ImportNamedImportInEs5_0");
|
||||
var xxxx = _es6ImportNamedImportInEs5_0_4.x;
|
||||
var _es6ImportNamedImportInEs5_0_5 = require("es6ImportNamedImportInEs5_0");
|
||||
var xxxx = _es6ImportNamedImportInEs5_0_5.m;
|
||||
var _es6ImportNamedImportInEs5_0_6 = require("es6ImportNamedImportInEs5_0");
|
||||
var xxxx = _es6ImportNamedImportInEs5_0_6.a1;
|
||||
var xxxx = _es6ImportNamedImportInEs5_0_6.x1;
|
||||
var _es6ImportNamedImportInEs5_0_7 = require("es6ImportNamedImportInEs5_0");
|
||||
var xxxx = _es6ImportNamedImportInEs5_0_7.a1;
|
||||
var xxxx = _es6ImportNamedImportInEs5_0_7.x1;
|
||||
var _es6ImportNamedImportInEs5_0_8 = require("es6ImportNamedImportInEs5_0");
|
||||
var z111 = _es6ImportNamedImportInEs5_0_8.z1;
|
||||
var _es6ImportNamedImportInEs5_0_9 = require("es6ImportNamedImportInEs5_0");
|
||||
var z2 = _es6ImportNamedImportInEs5_0_9.z2; // z2 shouldn't give redeclare error
|
||||
var es6ImportNamedImportInEs5_0_1 = require("es6ImportNamedImportInEs5_0");
|
||||
var xxxx = es6ImportNamedImportInEs5_0_1.a;
|
||||
var es6ImportNamedImportInEs5_0_2 = require("es6ImportNamedImportInEs5_0");
|
||||
var xxxx = es6ImportNamedImportInEs5_0_2.a;
|
||||
var es6ImportNamedImportInEs5_0_3 = require("es6ImportNamedImportInEs5_0");
|
||||
var xxxx = es6ImportNamedImportInEs5_0_3.x;
|
||||
var xxxx = es6ImportNamedImportInEs5_0_3.a;
|
||||
var es6ImportNamedImportInEs5_0_4 = require("es6ImportNamedImportInEs5_0");
|
||||
var xxxx = es6ImportNamedImportInEs5_0_4.x;
|
||||
var es6ImportNamedImportInEs5_0_5 = require("es6ImportNamedImportInEs5_0");
|
||||
var xxxx = es6ImportNamedImportInEs5_0_5.m;
|
||||
var es6ImportNamedImportInEs5_0_6 = require("es6ImportNamedImportInEs5_0");
|
||||
var xxxx = es6ImportNamedImportInEs5_0_6.a1;
|
||||
var xxxx = es6ImportNamedImportInEs5_0_6.x1;
|
||||
var es6ImportNamedImportInEs5_0_7 = require("es6ImportNamedImportInEs5_0");
|
||||
var xxxx = es6ImportNamedImportInEs5_0_7.a1;
|
||||
var xxxx = es6ImportNamedImportInEs5_0_7.x1;
|
||||
var es6ImportNamedImportInEs5_0_8 = require("es6ImportNamedImportInEs5_0");
|
||||
var z111 = es6ImportNamedImportInEs5_0_8.z1;
|
||||
var es6ImportNamedImportInEs5_0_9 = require("es6ImportNamedImportInEs5_0");
|
||||
var z2 = es6ImportNamedImportInEs5_0_9.z2; // z2 shouldn't give redeclare error
|
||||
|
||||
|
||||
//// [es6ImportNamedImportInEs5_0.d.ts]
|
||||
|
||||
@@ -23,8 +23,8 @@ var a;
|
||||
a.c = c;
|
||||
})(a = exports.a || (exports.a = {}));
|
||||
//// [es6ImportNamedImportInIndirectExportAssignment_1.js]
|
||||
var _es6ImportNamedImportInIndirectExportAssignment_0 = require("es6ImportNamedImportInIndirectExportAssignment_0");
|
||||
var x = _es6ImportNamedImportInIndirectExportAssignment_0.a;
|
||||
var es6ImportNamedImportInIndirectExportAssignment_0_1 = require("es6ImportNamedImportInIndirectExportAssignment_0");
|
||||
var x = es6ImportNamedImportInIndirectExportAssignment_0_1.a;
|
||||
module.exports = x;
|
||||
|
||||
|
||||
|
||||
@@ -50,27 +50,27 @@ exports.z1 = 10;
|
||||
exports.z2 = 10;
|
||||
exports.aaaa = 10;
|
||||
//// [client.js]
|
||||
var _server_1 = require("server");
|
||||
exports.xxxx = _server_1.a;
|
||||
var _server_2 = require("server");
|
||||
exports.xxxx = _server_2.a;
|
||||
var _server_3 = require("server");
|
||||
exports.xxxx = _server_3.x;
|
||||
exports.xxxx = _server_3.a;
|
||||
var _server_4 = require("server");
|
||||
exports.xxxx = _server_4.x;
|
||||
var _server_5 = require("server");
|
||||
exports.xxxx = _server_5.m;
|
||||
var _server_6 = require("server");
|
||||
exports.xxxx = _server_6.a1;
|
||||
exports.xxxx = _server_6.x1;
|
||||
var _server_7 = require("server");
|
||||
exports.xxxx = _server_7.a1;
|
||||
exports.xxxx = _server_7.x1;
|
||||
var _server_8 = require("server");
|
||||
exports.z111 = _server_8.z1;
|
||||
var _server_9 = require("server");
|
||||
exports.z2 = _server_9.z2; // z2 shouldn't give redeclare error
|
||||
var server_1 = require("server");
|
||||
exports.xxxx = server_1.a;
|
||||
var server_2 = require("server");
|
||||
exports.xxxx = server_2.a;
|
||||
var server_3 = require("server");
|
||||
exports.xxxx = server_3.x;
|
||||
exports.xxxx = server_3.a;
|
||||
var server_4 = require("server");
|
||||
exports.xxxx = server_4.x;
|
||||
var server_5 = require("server");
|
||||
exports.xxxx = server_5.m;
|
||||
var server_6 = require("server");
|
||||
exports.xxxx = server_6.a1;
|
||||
exports.xxxx = server_6.x1;
|
||||
var server_7 = require("server");
|
||||
exports.xxxx = server_7.a1;
|
||||
exports.xxxx = server_7.x1;
|
||||
var server_8 = require("server");
|
||||
exports.z111 = server_8.z1;
|
||||
var server_9 = require("server");
|
||||
exports.z2 = server_9.z2; // z2 shouldn't give redeclare error
|
||||
|
||||
|
||||
//// [server.d.ts]
|
||||
|
||||
@@ -36,8 +36,8 @@ var C2 = (function () {
|
||||
})();
|
||||
exports.C2 = C2;
|
||||
//// [client.js]
|
||||
var _server = require("server"); // Shouldnt emit I and C2 into the js file and emit C and I in .d.ts file
|
||||
exports.cVal = new _server.C();
|
||||
var server_1 = require("server"); // Shouldnt emit I and C2 into the js file and emit C and I in .d.ts file
|
||||
exports.cVal = new server_1.C();
|
||||
|
||||
|
||||
//// [server.d.ts]
|
||||
|
||||
@@ -18,5 +18,5 @@ var s: string = d; // Error
|
||||
var d = require("mod");
|
||||
var s = d; // Error
|
||||
//// [reference2.js]
|
||||
var _mod = require("mod");
|
||||
var s = _mod.default; // Error
|
||||
var mod_1 = require("mod");
|
||||
var s = mod_1.default; // Error
|
||||
|
||||
@@ -754,7 +754,7 @@ define(["require", "exports"], function (require, exports) {
|
||||
return C;
|
||||
})();
|
||||
var M;
|
||||
(function (_M) {
|
||||
(function (M_1) {
|
||||
var V;
|
||||
function F() {
|
||||
}
|
||||
@@ -844,10 +844,10 @@ define(["require", "exports"], function (require, exports) {
|
||||
;
|
||||
;
|
||||
})(M || (M = {}));
|
||||
_M.eV;
|
||||
M_1.eV;
|
||||
function eF() {
|
||||
}
|
||||
_M.eF = eF;
|
||||
M_1.eF = eF;
|
||||
;
|
||||
var eC = (function () {
|
||||
function eC() {
|
||||
@@ -902,7 +902,7 @@ define(["require", "exports"], function (require, exports) {
|
||||
});
|
||||
return eC;
|
||||
})();
|
||||
_M.eC = eC;
|
||||
M_1.eC = eC;
|
||||
var eM;
|
||||
(function (eM) {
|
||||
var V;
|
||||
@@ -934,7 +934,7 @@ define(["require", "exports"], function (require, exports) {
|
||||
;
|
||||
;
|
||||
;
|
||||
})(eM = _M.eM || (_M.eM = {}));
|
||||
})(eM = M_1.eM || (M_1.eM = {}));
|
||||
;
|
||||
})(M || (M = {}));
|
||||
exports.eV;
|
||||
@@ -997,7 +997,7 @@ define(["require", "exports"], function (require, exports) {
|
||||
})();
|
||||
exports.eC = eC;
|
||||
var eM;
|
||||
(function (_eM) {
|
||||
(function (eM_1) {
|
||||
var V;
|
||||
function F() {
|
||||
}
|
||||
@@ -1087,10 +1087,10 @@ define(["require", "exports"], function (require, exports) {
|
||||
;
|
||||
;
|
||||
})(M || (M = {}));
|
||||
_eM.eV;
|
||||
eM_1.eV;
|
||||
function eF() {
|
||||
}
|
||||
_eM.eF = eF;
|
||||
eM_1.eF = eF;
|
||||
;
|
||||
var eC = (function () {
|
||||
function eC() {
|
||||
@@ -1145,7 +1145,7 @@ define(["require", "exports"], function (require, exports) {
|
||||
});
|
||||
return eC;
|
||||
})();
|
||||
_eM.eC = eC;
|
||||
eM_1.eC = eC;
|
||||
var eM;
|
||||
(function (eM) {
|
||||
var V;
|
||||
@@ -1177,7 +1177,7 @@ define(["require", "exports"], function (require, exports) {
|
||||
;
|
||||
;
|
||||
;
|
||||
})(eM = _eM.eM || (_eM.eM = {}));
|
||||
})(eM = eM_1.eM || (eM_1.eM = {}));
|
||||
;
|
||||
})(eM = exports.eM || (exports.eM = {}));
|
||||
;
|
||||
|
||||
@@ -9,8 +9,8 @@ var x = '';
|
||||
|
||||
//// [importAndVariableDeclarationConflict1.js]
|
||||
var m;
|
||||
(function (_m) {
|
||||
_m.m = '';
|
||||
(function (m_1) {
|
||||
m_1.m = '';
|
||||
})(m || (m = {}));
|
||||
var x = m.m;
|
||||
var x = '';
|
||||
|
||||
@@ -13,8 +13,8 @@ class C {
|
||||
|
||||
//// [importAndVariableDeclarationConflict2.js]
|
||||
var m;
|
||||
(function (_m) {
|
||||
_m.m = '';
|
||||
(function (m_1) {
|
||||
m_1.m = '';
|
||||
})(m || (m = {}));
|
||||
var x = m.m;
|
||||
var C = (function () {
|
||||
|
||||
@@ -9,8 +9,8 @@ import x = m.m;
|
||||
|
||||
//// [importAndVariableDeclarationConflict3.js]
|
||||
var m;
|
||||
(function (_m) {
|
||||
_m.m = '';
|
||||
(function (m_1) {
|
||||
m_1.m = '';
|
||||
})(m || (m = {}));
|
||||
var x = m.m;
|
||||
var x = m.m;
|
||||
|
||||
@@ -9,8 +9,8 @@ import x = m.m;
|
||||
|
||||
//// [importAndVariableDeclarationConflict4.js]
|
||||
var m;
|
||||
(function (_m) {
|
||||
_m.m = '';
|
||||
(function (m_1) {
|
||||
m_1.m = '';
|
||||
})(m || (m = {}));
|
||||
var x = '';
|
||||
var x = m.m;
|
||||
|
||||
@@ -18,13 +18,13 @@ module C {
|
||||
|
||||
//// [importedModuleAddToGlobal.js]
|
||||
var B;
|
||||
(function (_B) {
|
||||
(function (B_1) {
|
||||
var B = (function () {
|
||||
function B() {
|
||||
}
|
||||
return B;
|
||||
})();
|
||||
_B.B = B;
|
||||
B_1.B = B;
|
||||
})(B || (B = {}));
|
||||
var C;
|
||||
(function (C) {
|
||||
|
||||
@@ -19,28 +19,28 @@ if (true) {
|
||||
//// [initializePropertiesWithRenamedLet.js]
|
||||
var x0;
|
||||
if (true) {
|
||||
var _x0;
|
||||
var x0_1;
|
||||
var obj1 = {
|
||||
x0: _x0
|
||||
x0: x0_1
|
||||
};
|
||||
var obj2 = {
|
||||
x0: _x0
|
||||
x0: x0_1
|
||||
};
|
||||
}
|
||||
var x, y, z;
|
||||
if (true) {
|
||||
var _x = ({
|
||||
var x_1 = ({
|
||||
x: 0
|
||||
}).x;
|
||||
var _y = ({
|
||||
var y_1 = ({
|
||||
y: 0
|
||||
}).y;
|
||||
var _z;
|
||||
var z_1;
|
||||
(_a = {
|
||||
z: 0
|
||||
}, _z = _a.z, _a);
|
||||
}, z_1 = _a.z, _a);
|
||||
(_b = {
|
||||
z: 0
|
||||
}, _z = _b.z, _b);
|
||||
}, z_1 = _b.z, _b);
|
||||
}
|
||||
var _a, _b;
|
||||
|
||||
@@ -72,67 +72,67 @@ module schema {
|
||||
//// [isDeclarationVisibleNodeKinds.js]
|
||||
// Function types
|
||||
var schema;
|
||||
(function (_schema) {
|
||||
(function (schema_1) {
|
||||
function createValidator1(schema) {
|
||||
return undefined;
|
||||
}
|
||||
_schema.createValidator1 = createValidator1;
|
||||
schema_1.createValidator1 = createValidator1;
|
||||
})(schema || (schema = {}));
|
||||
// Constructor types
|
||||
var schema;
|
||||
(function (_schema_1) {
|
||||
(function (schema_2) {
|
||||
function createValidator2(schema) {
|
||||
return undefined;
|
||||
}
|
||||
_schema_1.createValidator2 = createValidator2;
|
||||
schema_2.createValidator2 = createValidator2;
|
||||
})(schema || (schema = {}));
|
||||
// union types
|
||||
var schema;
|
||||
(function (_schema_2) {
|
||||
(function (schema_3) {
|
||||
function createValidator3(schema) {
|
||||
return undefined;
|
||||
}
|
||||
_schema_2.createValidator3 = createValidator3;
|
||||
schema_3.createValidator3 = createValidator3;
|
||||
})(schema || (schema = {}));
|
||||
// Array types
|
||||
var schema;
|
||||
(function (_schema_3) {
|
||||
(function (schema_4) {
|
||||
function createValidator4(schema) {
|
||||
return undefined;
|
||||
}
|
||||
_schema_3.createValidator4 = createValidator4;
|
||||
schema_4.createValidator4 = createValidator4;
|
||||
})(schema || (schema = {}));
|
||||
// TypeLiterals
|
||||
var schema;
|
||||
(function (_schema_4) {
|
||||
(function (schema_5) {
|
||||
function createValidator5(schema) {
|
||||
return undefined;
|
||||
}
|
||||
_schema_4.createValidator5 = createValidator5;
|
||||
schema_5.createValidator5 = createValidator5;
|
||||
})(schema || (schema = {}));
|
||||
// Tuple types
|
||||
var schema;
|
||||
(function (_schema_5) {
|
||||
(function (schema_6) {
|
||||
function createValidator6(schema) {
|
||||
return undefined;
|
||||
}
|
||||
_schema_5.createValidator6 = createValidator6;
|
||||
schema_6.createValidator6 = createValidator6;
|
||||
})(schema || (schema = {}));
|
||||
// Paren Types
|
||||
var schema;
|
||||
(function (_schema_6) {
|
||||
(function (schema_7) {
|
||||
function createValidator7(schema) {
|
||||
return undefined;
|
||||
}
|
||||
_schema_6.createValidator7 = createValidator7;
|
||||
schema_7.createValidator7 = createValidator7;
|
||||
})(schema || (schema = {}));
|
||||
// Type reference
|
||||
var schema;
|
||||
(function (_schema_7) {
|
||||
(function (schema_8) {
|
||||
function createValidator8(schema) {
|
||||
return undefined;
|
||||
}
|
||||
_schema_7.createValidator8 = createValidator8;
|
||||
schema_8.createValidator8 = createValidator8;
|
||||
})(schema || (schema = {}));
|
||||
var schema;
|
||||
(function (schema) {
|
||||
|
||||
@@ -34,28 +34,28 @@ var y = 20;
|
||||
var x = 10;
|
||||
var y = 20;
|
||||
{
|
||||
var _x = 1;
|
||||
var _y = 2;
|
||||
console.log(_x);
|
||||
switch (_x) {
|
||||
var x_1 = 1;
|
||||
var y_1 = 2;
|
||||
console.log(x_1);
|
||||
switch (x_1) {
|
||||
case 10:
|
||||
var _x_1 = 20;
|
||||
var x_2 = 20;
|
||||
}
|
||||
switch (_y) {
|
||||
switch (y_1) {
|
||||
case 10:
|
||||
var _y_1 = 20;
|
||||
var y_2 = 20;
|
||||
}
|
||||
}
|
||||
{
|
||||
var _x_2 = 1;
|
||||
var _y_2 = 2;
|
||||
console.log(_x_2);
|
||||
switch (_x_2) {
|
||||
var x_3 = 1;
|
||||
var y_3 = 2;
|
||||
console.log(x_3);
|
||||
switch (x_3) {
|
||||
case 10:
|
||||
var _x_3 = 20;
|
||||
var x_4 = 20;
|
||||
}
|
||||
switch (_y_2) {
|
||||
switch (y_3) {
|
||||
case 10:
|
||||
var _y_3 = 20;
|
||||
var y_4 = 20;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ function a() {
|
||||
var parent = true;
|
||||
var parent2 = true;
|
||||
function a() {
|
||||
var _parent = 1;
|
||||
var _parent2 = 2;
|
||||
var parent = 1;
|
||||
var parent2 = 2;
|
||||
function b(parent, parent2) {
|
||||
use(parent);
|
||||
use(parent2);
|
||||
|
||||
@@ -20,7 +20,7 @@ var l3, l4, l5, l6;
|
||||
var l7 = false;
|
||||
var l8 = 23;
|
||||
var l9 = 0, l10 = "", l11 = null;
|
||||
for (var _l11 in {}) {
|
||||
for (var l11_1 in {}) {
|
||||
}
|
||||
for (var l12 = 0; l12 < 9; l12++) {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
//// [letKeepNamesOfTopLevelItems.ts]
|
||||
let x;
|
||||
function foo() {
|
||||
let x;
|
||||
}
|
||||
|
||||
module A {
|
||||
let x;
|
||||
}
|
||||
|
||||
//// [letKeepNamesOfTopLevelItems.js]
|
||||
var x;
|
||||
function foo() {
|
||||
var x;
|
||||
}
|
||||
var A;
|
||||
(function (A) {
|
||||
var x;
|
||||
})(A || (A = {}));
|
||||
@@ -0,0 +1,17 @@
|
||||
=== tests/cases/compiler/letKeepNamesOfTopLevelItems.ts ===
|
||||
let x;
|
||||
>x : any
|
||||
|
||||
function foo() {
|
||||
>foo : () => void
|
||||
|
||||
let x;
|
||||
>x : any
|
||||
}
|
||||
|
||||
module A {
|
||||
>A : typeof A
|
||||
|
||||
let x;
|
||||
>x : any
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
tests/cases/compiler/letShadowedByNameInNestedScope.ts(6,9): error TS2304: Cannot find name 'console'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/letShadowedByNameInNestedScope.ts (1 errors) ====
|
||||
var x;
|
||||
function foo() {
|
||||
let x = 0;
|
||||
(function () {
|
||||
var _x = 1;
|
||||
console.log(x);
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'console'.
|
||||
})();
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
//// [letShadowedByNameInNestedScope.ts]
|
||||
var x;
|
||||
function foo() {
|
||||
let x = 0;
|
||||
(function () {
|
||||
var _x = 1;
|
||||
console.log(x);
|
||||
})();
|
||||
}
|
||||
|
||||
//// [letShadowedByNameInNestedScope.js]
|
||||
var x;
|
||||
function foo() {
|
||||
var x = 0;
|
||||
(function () {
|
||||
var _x = 1;
|
||||
console.log(x);
|
||||
})();
|
||||
}
|
||||
@@ -19,10 +19,10 @@ export module X {
|
||||
var X;
|
||||
(function (X) {
|
||||
var Y;
|
||||
(function (_Y) {
|
||||
(function (Y_1) {
|
||||
var A = (function () {
|
||||
function A(Y) {
|
||||
new _Y.B();
|
||||
new Y_1.B();
|
||||
}
|
||||
return A;
|
||||
})();
|
||||
|
||||
@@ -22,11 +22,11 @@ var my;
|
||||
})(data = my.data || (my.data = {}));
|
||||
})(my || (my = {}));
|
||||
var my;
|
||||
(function (_my) {
|
||||
(function (my_1) {
|
||||
var data;
|
||||
(function (_data) {
|
||||
(function (data_1) {
|
||||
function data(my) {
|
||||
_data.foo.buz();
|
||||
data_1.foo.buz();
|
||||
}
|
||||
})(data = _my.data || (_my.data = {}));
|
||||
})(data = my_1.data || (my_1.data = {}));
|
||||
})(my || (my = {}));
|
||||
|
||||
@@ -19,14 +19,14 @@ var my;
|
||||
})(data = my.data || (my.data = {}));
|
||||
})(my || (my = {}));
|
||||
var my;
|
||||
(function (_my) {
|
||||
(function (my_1) {
|
||||
var data;
|
||||
(function (_data) {
|
||||
(function (data_1) {
|
||||
var foo;
|
||||
(function (_foo) {
|
||||
(function (foo_1) {
|
||||
function data(my, foo) {
|
||||
_data.buz();
|
||||
data_1.buz();
|
||||
}
|
||||
})(foo = _data.foo || (_data.foo = {}));
|
||||
})(data = _my.data || (_my.data = {}));
|
||||
})(foo = data_1.foo || (data_1.foo = {}));
|
||||
})(data = my_1.data || (my_1.data = {}));
|
||||
})(my || (my = {}));
|
||||
|
||||
@@ -20,7 +20,7 @@ module superContain {
|
||||
var superContain;
|
||||
(function (superContain) {
|
||||
var contain;
|
||||
(function (_contain) {
|
||||
(function (contain_1) {
|
||||
var my;
|
||||
(function (my) {
|
||||
var buz;
|
||||
@@ -32,19 +32,19 @@ var superContain;
|
||||
data.foo = foo;
|
||||
})(data = buz.data || (buz.data = {}));
|
||||
})(buz = my.buz || (my.buz = {}));
|
||||
})(my = _contain.my || (_contain.my = {}));
|
||||
})(my = contain_1.my || (contain_1.my = {}));
|
||||
var my;
|
||||
(function (_my) {
|
||||
(function (my_1) {
|
||||
var buz;
|
||||
(function (_buz) {
|
||||
(function (buz_1) {
|
||||
var data;
|
||||
(function (_data) {
|
||||
(function (data_1) {
|
||||
function bar(contain, my, buz, data) {
|
||||
_data.foo();
|
||||
data_1.foo();
|
||||
}
|
||||
_data.bar = bar;
|
||||
})(data = _buz.data || (_buz.data = {}));
|
||||
})(buz = _my.buz || (_my.buz = {}));
|
||||
})(my = _contain.my || (_contain.my = {}));
|
||||
data_1.bar = bar;
|
||||
})(data = buz_1.data || (buz_1.data = {}));
|
||||
})(buz = my_1.buz || (my_1.buz = {}));
|
||||
})(my = contain_1.my || (contain_1.my = {}));
|
||||
})(contain = superContain.contain || (superContain.contain = {}));
|
||||
})(superContain || (superContain = {}));
|
||||
|
||||
@@ -20,7 +20,7 @@ module M.buz.plop {
|
||||
|
||||
//// [mergedModuleDeclarationCodeGen5.js]
|
||||
var M;
|
||||
(function (_M) {
|
||||
(function (M_1) {
|
||||
var buz;
|
||||
(function (buz) {
|
||||
var plop;
|
||||
@@ -32,14 +32,14 @@ var M;
|
||||
}
|
||||
plop.M = M;
|
||||
})(plop = buz.plop || (buz.plop = {}));
|
||||
})(buz = _M.buz || (_M.buz = {}));
|
||||
})(buz = M_1.buz || (M_1.buz = {}));
|
||||
})(M || (M = {}));
|
||||
var M;
|
||||
(function (M) {
|
||||
var buz;
|
||||
(function (_buz) {
|
||||
(function (buz_1) {
|
||||
var plop;
|
||||
(function (_plop) {
|
||||
(function (plop_1) {
|
||||
function gunk() {
|
||||
}
|
||||
function buz() {
|
||||
@@ -49,17 +49,17 @@ var M;
|
||||
}
|
||||
return fudge;
|
||||
})();
|
||||
_plop.fudge = fudge;
|
||||
plop_1.fudge = fudge;
|
||||
(function (plop) {
|
||||
})(_plop.plop || (_plop.plop = {}));
|
||||
var plop = _plop.plop;
|
||||
})(plop_1.plop || (plop_1.plop = {}));
|
||||
var plop = plop_1.plop;
|
||||
// Emit these references as follows
|
||||
var v1 = gunk; // gunk
|
||||
var v2 = buz; // buz
|
||||
_plop.v3 = _plop.doom; // _plop.doom
|
||||
_plop.v4 = _plop.M; // _plop.M
|
||||
_plop.v5 = fudge; // fudge
|
||||
_plop.v6 = plop; // plop
|
||||
})(plop = _buz.plop || (_buz.plop = {}));
|
||||
plop_1.v3 = plop_1.doom; // _plop.doom
|
||||
plop_1.v4 = plop_1.M; // _plop.M
|
||||
plop_1.v5 = fudge; // fudge
|
||||
plop_1.v6 = plop; // plop
|
||||
})(plop = buz_1.plop || (buz_1.plop = {}));
|
||||
})(buz = M.buz || (M.buz = {}));
|
||||
})(M || (M = {}));
|
||||
|
||||
@@ -25,11 +25,11 @@ var Z;
|
||||
var A;
|
||||
(function (A) {
|
||||
var M;
|
||||
(function (_M) {
|
||||
(function (M_1) {
|
||||
var M = Z.M;
|
||||
function bar() {
|
||||
}
|
||||
_M.bar = bar;
|
||||
M_1.bar = bar;
|
||||
M.bar(); // Should call Z.M.bar
|
||||
})(M = A.M || (A.M = {}));
|
||||
})(A || (A = {}));
|
||||
|
||||
@@ -30,11 +30,11 @@ var Z;
|
||||
var A;
|
||||
(function (A) {
|
||||
var M;
|
||||
(function (_M) {
|
||||
(function (M_1) {
|
||||
var M = Z.M;
|
||||
function bar() {
|
||||
}
|
||||
_M.bar = bar;
|
||||
M_1.bar = bar;
|
||||
M.bar(); // Should call Z.M.bar
|
||||
})(M = A.M || (A.M = {}));
|
||||
})(A || (A = {}));
|
||||
|
||||
@@ -26,11 +26,11 @@ var Z;
|
||||
var A;
|
||||
(function (A) {
|
||||
var M;
|
||||
(function (_M) {
|
||||
(function (M_1) {
|
||||
var M = Z.M;
|
||||
function bar() {
|
||||
}
|
||||
_M.bar = bar;
|
||||
M_1.bar = bar;
|
||||
M.bar(); // Should call Z.M.bar
|
||||
})(M = A.M || (A.M = {}));
|
||||
})(A || (A = {}));
|
||||
|
||||
@@ -30,10 +30,10 @@ var Z;
|
||||
var A;
|
||||
(function (A) {
|
||||
var M;
|
||||
(function (_M) {
|
||||
(function (M_1) {
|
||||
function bar() {
|
||||
}
|
||||
_M.bar = bar;
|
||||
M_1.bar = bar;
|
||||
M.bar(); // Should call Z.M.bar
|
||||
})(M = A.M || (A.M = {}));
|
||||
})(A || (A = {}));
|
||||
|
||||
@@ -24,9 +24,9 @@ var Z;
|
||||
var A;
|
||||
(function (A) {
|
||||
var M;
|
||||
(function (_M) {
|
||||
(function (M_1) {
|
||||
function bar() {
|
||||
}
|
||||
_M.bar = bar;
|
||||
M_1.bar = bar;
|
||||
})(M = A.M || (A.M = {}));
|
||||
})(A || (A = {}));
|
||||
|
||||
@@ -66,7 +66,7 @@ var __extends = this.__extends || function (d, b) {
|
||||
d.prototype = new __();
|
||||
};
|
||||
var A;
|
||||
(function (_A) {
|
||||
(function (A_1) {
|
||||
var A = (function () {
|
||||
function A() {
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ module D {
|
||||
|
||||
//// [nameCollision.js]
|
||||
var A;
|
||||
(function (_A_1) {
|
||||
(function (A_1) {
|
||||
// these 2 statements force an underscore before the 'A'
|
||||
// in the generated function call.
|
||||
var A = 12;
|
||||
@@ -59,7 +59,7 @@ var B;
|
||||
var A = 12;
|
||||
})(B || (B = {}));
|
||||
var B;
|
||||
(function (_B) {
|
||||
(function (B_1) {
|
||||
// re-opened module with colliding name
|
||||
// this should add an underscore.
|
||||
var B = (function () {
|
||||
@@ -69,29 +69,29 @@ var B;
|
||||
})();
|
||||
})(B || (B = {}));
|
||||
var X;
|
||||
(function (_X) {
|
||||
(function (X_1) {
|
||||
var X = 13;
|
||||
var Y;
|
||||
(function (_Y) {
|
||||
(function (Y_1) {
|
||||
var Y = 13;
|
||||
var Z;
|
||||
(function (_Z) {
|
||||
(function (Z_1) {
|
||||
var X = 12;
|
||||
var Y = 12;
|
||||
var Z = 12;
|
||||
})(Z = _Y.Z || (_Y.Z = {}));
|
||||
})(Y = _X.Y || (_X.Y = {}));
|
||||
})(Z = Y_1.Z || (Y_1.Z = {}));
|
||||
})(Y = X_1.Y || (X_1.Y = {}));
|
||||
})(X || (X = {}));
|
||||
var Y;
|
||||
(function (_Y_1) {
|
||||
(function (Y_2) {
|
||||
var Y;
|
||||
(function (_Y_2) {
|
||||
(function (Y_3) {
|
||||
(function (Y) {
|
||||
Y[Y["Red"] = 0] = "Red";
|
||||
Y[Y["Blue"] = 1] = "Blue";
|
||||
})(_Y_2.Y || (_Y_2.Y = {}));
|
||||
var Y = _Y_2.Y;
|
||||
})(Y = _Y_1.Y || (_Y_1.Y = {}));
|
||||
})(Y_3.Y || (Y_3.Y = {}));
|
||||
var Y = Y_3.Y;
|
||||
})(Y = Y_2.Y || (Y_2.Y = {}));
|
||||
})(Y || (Y = {}));
|
||||
// no collision, since interface doesn't
|
||||
// generate code.
|
||||
|
||||
@@ -39,8 +39,8 @@ var Bugs;
|
||||
}
|
||||
var result = message.replace(/\{(\d+)\}/g, function (match) {
|
||||
var rest = [];
|
||||
for (var _a = 1; _a < arguments.length; _a++) {
|
||||
rest[_a - 1] = arguments[_a];
|
||||
for (var _i = 1; _i < arguments.length; _i++) {
|
||||
rest[_i - 1] = arguments[_i];
|
||||
}
|
||||
var index = rest[0];
|
||||
return typeof args[index] !== 'undefined' ? args[index] : match;
|
||||
|
||||
@@ -238,7 +238,7 @@ var glo_M1_public;
|
||||
glo_M1_public.v2;
|
||||
})(glo_M1_public || (glo_M1_public = {}));
|
||||
var m2;
|
||||
(function (_m2) {
|
||||
(function (m2_1) {
|
||||
var m4;
|
||||
(function (m4) {
|
||||
var a = 10;
|
||||
|
||||
@@ -566,14 +566,14 @@ var glo_im4_private_v4_private = glo_im4_private.f1();
|
||||
exports.glo_im1_public = glo_M1_public;
|
||||
exports.glo_im2_public = glo_M3_private;
|
||||
var m2;
|
||||
(function (_m2) {
|
||||
(function (m2_1) {
|
||||
var m4;
|
||||
(function (m4) {
|
||||
var a = 10;
|
||||
})(m4 || (m4 = {}));
|
||||
})(m2 || (m2 = {}));
|
||||
var m3;
|
||||
(function (_m3) {
|
||||
(function (m3_1) {
|
||||
var m4;
|
||||
(function (m4) {
|
||||
var a = 10;
|
||||
|
||||
@@ -116,7 +116,7 @@ var Sample;
|
||||
var Actions;
|
||||
(function (Actions) {
|
||||
var Thing;
|
||||
(function (_Thing_1) {
|
||||
(function (Thing_1) {
|
||||
var Find;
|
||||
(function (Find) {
|
||||
var StartFindAction = (function () {
|
||||
@@ -131,7 +131,7 @@ var Sample;
|
||||
return StartFindAction;
|
||||
})();
|
||||
Find.StartFindAction = StartFindAction;
|
||||
})(Find = _Thing_1.Find || (_Thing_1.Find = {}));
|
||||
})(Find = Thing_1.Find || (Thing_1.Find = {}));
|
||||
})(Thing = Actions.Thing || (Actions.Thing = {}));
|
||||
})(Actions = Sample.Actions || (Sample.Actions = {}));
|
||||
})(Sample || (Sample = {}));
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//// [recursiveClassReferenceTest.js.map]
|
||||
{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":["Sample","Sample.Actions","Sample.Actions.Thing","Sample.Actions.Thing.Find","Sample.Actions.Thing.Find.StartFindAction","Sample.Actions.Thing.Find.StartFindAction.constructor","Sample.Actions.Thing.Find.StartFindAction.getId","Sample.Actions.Thing.Find.StartFindAction.run","Sample.Thing","Sample.Thing.Widgets","Sample.Thing.Widgets.FindWidget","Sample.Thing.Widgets.FindWidget.constructor","Sample.Thing.Widgets.FindWidget.gar","Sample.Thing.Widgets.FindWidget.getDomNode","Sample.Thing.Widgets.FindWidget.destroy","AbstractMode","AbstractMode.constructor","AbstractMode.getInitialState","Sample.Thing.Languages","Sample.Thing.Languages.PlainText","Sample.Thing.Languages.PlainText.State","Sample.Thing.Languages.PlainText.State.constructor","Sample.Thing.Languages.PlainText.State.clone","Sample.Thing.Languages.PlainText.State.equals","Sample.Thing.Languages.PlainText.State.getMode","Sample.Thing.Languages.PlainText.Mode","Sample.Thing.Languages.PlainText.Mode.constructor","Sample.Thing.Languages.PlainText.Mode.getInitialState"],"mappings":"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"}
|
||||
{"version":3,"file":"recursiveClassReferenceTest.js","sourceRoot":"","sources":["recursiveClassReferenceTest.ts"],"names":["Sample","Sample.Actions","Sample.Actions.Thing","Sample.Actions.Thing.Find","Sample.Actions.Thing.Find.StartFindAction","Sample.Actions.Thing.Find.StartFindAction.constructor","Sample.Actions.Thing.Find.StartFindAction.getId","Sample.Actions.Thing.Find.StartFindAction.run","Sample.Thing","Sample.Thing.Widgets","Sample.Thing.Widgets.FindWidget","Sample.Thing.Widgets.FindWidget.constructor","Sample.Thing.Widgets.FindWidget.gar","Sample.Thing.Widgets.FindWidget.getDomNode","Sample.Thing.Widgets.FindWidget.destroy","AbstractMode","AbstractMode.constructor","AbstractMode.getInitialState","Sample.Thing.Languages","Sample.Thing.Languages.PlainText","Sample.Thing.Languages.PlainText.State","Sample.Thing.Languages.PlainText.State.constructor","Sample.Thing.Languages.PlainText.State.clone","Sample.Thing.Languages.PlainText.State.equals","Sample.Thing.Languages.PlainText.State.getMode","Sample.Thing.Languages.PlainText.Mode","Sample.Thing.Languages.PlainText.Mode.constructor","Sample.Thing.Languages.PlainText.Mode.getInitialState"],"mappings":"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"}
|
||||
@@ -139,7 +139,7 @@ sourceFile:recursiveClassReferenceTest.ts
|
||||
2 > ^^^^
|
||||
3 > ^^^^^
|
||||
4 > ^
|
||||
5 > ^^^^^^^^^^^^^->
|
||||
5 > ^^^^^^^^^^^^->
|
||||
1 >.
|
||||
2 >
|
||||
3 > Thing
|
||||
@@ -159,16 +159,16 @@ sourceFile:recursiveClassReferenceTest.ts
|
||||
3 >Emitted(13, 18) Source(32, 28) + SourceIndex(0) name (Sample.Actions)
|
||||
4 >Emitted(13, 19) Source(42, 2) + SourceIndex(0) name (Sample.Actions)
|
||||
---
|
||||
>>> (function (_Thing_1) {
|
||||
>>> (function (Thing_1) {
|
||||
1->^^^^^^^^
|
||||
2 > ^^^^^^^^^^^
|
||||
3 > ^^^^^^^^
|
||||
3 > ^^^^^^^
|
||||
1->
|
||||
2 >
|
||||
3 > Thing
|
||||
1->Emitted(14, 9) Source(32, 23) + SourceIndex(0) name (Sample.Actions)
|
||||
2 >Emitted(14, 20) Source(32, 23) + SourceIndex(0) name (Sample.Actions)
|
||||
3 >Emitted(14, 28) Source(32, 28) + SourceIndex(0) name (Sample.Actions)
|
||||
3 >Emitted(14, 27) Source(32, 28) + SourceIndex(0) name (Sample.Actions)
|
||||
---
|
||||
>>> var Find;
|
||||
1 >^^^^^^^^^^^^
|
||||
@@ -365,7 +365,7 @@ sourceFile:recursiveClassReferenceTest.ts
|
||||
2 > ^^^^^^^^^^^^^^^^^^^^
|
||||
3 > ^^^^^^^^^^^^^^^^^^
|
||||
4 > ^
|
||||
5 > ^^^^^^^->
|
||||
5 > ^^^^^->
|
||||
1->
|
||||
2 > StartFindAction
|
||||
3 > implements Sample.Thing.IAction {
|
||||
@@ -383,16 +383,16 @@ sourceFile:recursiveClassReferenceTest.ts
|
||||
3 >Emitted(28, 55) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find)
|
||||
4 >Emitted(28, 56) Source(41, 3) + SourceIndex(0) name (Sample.Actions.Thing.Find)
|
||||
---
|
||||
>>> })(Find = _Thing_1.Find || (_Thing_1.Find = {}));
|
||||
>>> })(Find = Thing_1.Find || (Thing_1.Find = {}));
|
||||
1->^^^^^^^^^^^^
|
||||
2 > ^
|
||||
3 > ^^
|
||||
4 > ^^^^
|
||||
5 > ^^^
|
||||
6 > ^^^^^^^^^^^^^
|
||||
7 > ^^^^^
|
||||
8 > ^^^^^^^^^^^^^
|
||||
9 > ^^^^^^^^
|
||||
6 > ^^^^^^^^^^^^
|
||||
7 > ^^^^^
|
||||
8 > ^^^^^^^^^^^^
|
||||
9 > ^^^^^^^^
|
||||
1->
|
||||
>
|
||||
2 > }
|
||||
@@ -400,28 +400,28 @@ sourceFile:recursiveClassReferenceTest.ts
|
||||
4 > Find
|
||||
5 >
|
||||
6 > Find
|
||||
7 >
|
||||
8 > Find
|
||||
9 > {
|
||||
> export class StartFindAction implements Sample.Thing.IAction {
|
||||
>
|
||||
> public getId() { return "yo"; }
|
||||
>
|
||||
> public run(Thing:Sample.Thing.ICodeThing):boolean {
|
||||
>
|
||||
> return true;
|
||||
> }
|
||||
> }
|
||||
> }
|
||||
7 >
|
||||
8 > Find
|
||||
9 > {
|
||||
> export class StartFindAction implements Sample.Thing.IAction {
|
||||
>
|
||||
> public getId() { return "yo"; }
|
||||
>
|
||||
> public run(Thing:Sample.Thing.ICodeThing):boolean {
|
||||
>
|
||||
> return true;
|
||||
> }
|
||||
> }
|
||||
> }
|
||||
1->Emitted(29, 13) Source(42, 1) + SourceIndex(0) name (Sample.Actions.Thing.Find)
|
||||
2 >Emitted(29, 14) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing.Find)
|
||||
3 >Emitted(29, 16) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing)
|
||||
4 >Emitted(29, 20) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing)
|
||||
5 >Emitted(29, 23) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing)
|
||||
6 >Emitted(29, 36) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing)
|
||||
7 >Emitted(29, 41) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing)
|
||||
8 >Emitted(29, 54) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing)
|
||||
9 >Emitted(29, 62) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing)
|
||||
6 >Emitted(29, 35) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing)
|
||||
7 >Emitted(29, 40) Source(32, 29) + SourceIndex(0) name (Sample.Actions.Thing)
|
||||
8 >Emitted(29, 52) Source(32, 33) + SourceIndex(0) name (Sample.Actions.Thing)
|
||||
9 >Emitted(29, 60) Source(42, 2) + SourceIndex(0) name (Sample.Actions.Thing)
|
||||
---
|
||||
>>> })(Thing = Actions.Thing || (Actions.Thing = {}));
|
||||
1 >^^^^^^^^
|
||||
|
||||
@@ -20,8 +20,8 @@ var M;
|
||||
})();
|
||||
M.C = C;
|
||||
var C;
|
||||
(function (_C) {
|
||||
_C.C = M.C;
|
||||
(function (C_1) {
|
||||
C_1.C = M.C;
|
||||
})(C = M.C || (M.C = {}));
|
||||
;
|
||||
})(M || (M = {}));
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
|
||||
//// [shadowingViaLocalValue.js]
|
||||
{
|
||||
var _x;
|
||||
var x_1;
|
||||
{
|
||||
var x = 1;
|
||||
}
|
||||
}
|
||||
{
|
||||
var _x1;
|
||||
var x1_1;
|
||||
{
|
||||
for (var x1 = 0;;)
|
||||
;
|
||||
|
||||
@@ -12,7 +12,7 @@ if (true) {
|
||||
|
||||
//// [shadowingViaLocalValueOrBindingElement.js]
|
||||
if (true) {
|
||||
var _x;
|
||||
var x_1;
|
||||
if (true) {
|
||||
var x = 0; // Error
|
||||
var _a = ({
|
||||
|
||||
@@ -8,10 +8,10 @@ var z = bar.bar();
|
||||
|
||||
//// [thisInModuleFunction1.js]
|
||||
var bar;
|
||||
(function (_bar) {
|
||||
(function (bar_1) {
|
||||
function bar() {
|
||||
return this;
|
||||
}
|
||||
_bar.bar = bar;
|
||||
bar_1.bar = bar;
|
||||
})(bar || (bar = {}));
|
||||
var z = bar.bar();
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
let x;
|
||||
function foo() {
|
||||
let x;
|
||||
}
|
||||
|
||||
module A {
|
||||
let x;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
var x;
|
||||
function foo() {
|
||||
let x = 0;
|
||||
(function () {
|
||||
var _x = 1;
|
||||
console.log(x);
|
||||
})();
|
||||
}
|
||||
Reference in New Issue
Block a user