mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Emit the import declaration in d.ts file only if it is visible
This commit is contained in:
+30
-8
@@ -449,6 +449,19 @@ module ts {
|
||||
node.kind === SyntaxKind.ImportSpecifier;
|
||||
}
|
||||
|
||||
function getAnyImportSyntax(node: Node): AnyImportSyntax {
|
||||
if (isImportSymbolDeclaration(node)) {
|
||||
if (node.kind === SyntaxKind.ImportEqualsDeclaration) {
|
||||
return <ImportEqualsDeclaration>node;
|
||||
}
|
||||
|
||||
while (node.kind !== SyntaxKind.ImportDeclaration) {
|
||||
node = node.parent;
|
||||
}
|
||||
return <ImportDeclaration>node;
|
||||
}
|
||||
}
|
||||
|
||||
function getDeclarationOfImportSymbol(symbol: Symbol): Declaration {
|
||||
return forEach(symbol.declarations, d => isImportSymbolDeclaration(d) ? d : undefined);
|
||||
}
|
||||
@@ -990,7 +1003,7 @@ module ts {
|
||||
}
|
||||
|
||||
function hasVisibleDeclarations(symbol: Symbol): SymbolVisibilityResult {
|
||||
var aliasesToMakeVisible: ImportEqualsDeclaration[];
|
||||
var aliasesToMakeVisible: AnyImportSyntax[];
|
||||
if (forEach(symbol.declarations, declaration => !getIsDeclarationVisible(declaration))) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -998,19 +1011,21 @@ module ts {
|
||||
|
||||
function getIsDeclarationVisible(declaration: Declaration) {
|
||||
if (!isDeclarationVisible(declaration)) {
|
||||
// Mark the unexported alias as visible if its parent is visible
|
||||
// Mark the non exported alias as visible if its parent is visible
|
||||
// because these kind of aliases can be used to name types in declaration file
|
||||
if (declaration.kind === SyntaxKind.ImportEqualsDeclaration &&
|
||||
!(declaration.flags & NodeFlags.Export) &&
|
||||
isDeclarationVisible(<Declaration>declaration.parent)) {
|
||||
|
||||
var anyImportSyntax = getAnyImportSyntax(declaration);
|
||||
if (anyImportSyntax &&
|
||||
!(anyImportSyntax.flags & NodeFlags.Export) && // import clause without export
|
||||
isDeclarationVisible(<Declaration>anyImportSyntax.parent)) {
|
||||
getNodeLinks(declaration).isVisible = true;
|
||||
if (aliasesToMakeVisible) {
|
||||
if (!contains(aliasesToMakeVisible, declaration)) {
|
||||
aliasesToMakeVisible.push(<ImportEqualsDeclaration>declaration);
|
||||
if (!contains(aliasesToMakeVisible, anyImportSyntax)) {
|
||||
aliasesToMakeVisible.push(anyImportSyntax);
|
||||
}
|
||||
}
|
||||
else {
|
||||
aliasesToMakeVisible = [<ImportEqualsDeclaration>declaration];
|
||||
aliasesToMakeVisible = [anyImportSyntax];
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1680,6 +1695,13 @@ module ts {
|
||||
case SyntaxKind.ParenthesizedType:
|
||||
return isDeclarationVisible(<Declaration>node.parent);
|
||||
|
||||
// Default binding, import specifier and namespace import is visible
|
||||
// only if the import declaration is exported or it is used in export assignment
|
||||
case SyntaxKind.ImportClause:
|
||||
case SyntaxKind.NamespaceImport:
|
||||
case SyntaxKind.ImportSpecifier:
|
||||
return (node.name && isUsedInExportAssignment(node));
|
||||
|
||||
// Type parameters are always visible
|
||||
case SyntaxKind.TypeParameter:
|
||||
// Source file is always visible
|
||||
|
||||
+81
-31
@@ -35,10 +35,11 @@ module ts {
|
||||
}
|
||||
|
||||
interface AliasDeclarationEmitInfo {
|
||||
declaration: ImportEqualsDeclaration;
|
||||
declaration: AnyImportSyntax;
|
||||
outputPos: number;
|
||||
indent: number;
|
||||
asynchronousOutput?: string; // If the output for alias was written asynchronously, the corresponding output
|
||||
isVisible?: boolean;
|
||||
}
|
||||
|
||||
interface DeclarationEmit {
|
||||
@@ -392,6 +393,21 @@ module ts {
|
||||
}
|
||||
|
||||
emitSourceFile(root);
|
||||
|
||||
// create asynchronous output for the importDeclarations
|
||||
if (aliasDeclarationEmitInfo.length) {
|
||||
var oldWriter = writer;
|
||||
forEach(aliasDeclarationEmitInfo, aliasEmitInfo => {
|
||||
if (aliasEmitInfo.isVisible) {
|
||||
Debug.assert(aliasEmitInfo.declaration.kind === SyntaxKind.ImportDeclaration);
|
||||
createAndSetNewTextWriterWithSymbolWriter();
|
||||
Debug.assert(aliasEmitInfo.indent === 0);
|
||||
writeImportDeclaration(<ImportDeclaration>aliasEmitInfo.declaration);
|
||||
aliasEmitInfo.asynchronousOutput = writer.getText();
|
||||
}
|
||||
});
|
||||
setWriter(oldWriter);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Emit references corresponding to this file
|
||||
@@ -465,9 +481,9 @@ module ts {
|
||||
decreaseIndent = newWriter.decreaseIndent;
|
||||
}
|
||||
|
||||
function writeAsychronousImportEqualsDeclarations(importEqualsDeclarations: ImportEqualsDeclaration[]) {
|
||||
function writeAsychronousImportEqualsDeclarations(anyImportSyntax: AnyImportSyntax[]) {
|
||||
var oldWriter = writer;
|
||||
forEach(importEqualsDeclarations, aliasToWrite => {
|
||||
forEach(anyImportSyntax, aliasToWrite => {
|
||||
var aliasEmitInfo = forEach(aliasDeclarationEmitInfo, declEmitInfo => declEmitInfo.declaration === aliasToWrite ? declEmitInfo : undefined);
|
||||
// If the alias was marked as not visible when we saw its declaration, we would have saved the aliasEmitInfo, but if we haven't yet visited the alias declaration
|
||||
// then we don't need to write it at this point. We will write it when we actually see its declaration
|
||||
@@ -477,12 +493,19 @@ module ts {
|
||||
// Writing of function bar would mark alias declaration foo as visible but we haven't yet visited that declaration so do nothing,
|
||||
// we would write alias foo declaration when we visit it since it would now be marked as visible
|
||||
if (aliasEmitInfo) {
|
||||
createAndSetNewTextWriterWithSymbolWriter();
|
||||
for (var declarationIndent = aliasEmitInfo.indent; declarationIndent; declarationIndent--) {
|
||||
increaseIndent();
|
||||
if (aliasToWrite.kind === SyntaxKind.ImportEqualsDeclaration) {
|
||||
createAndSetNewTextWriterWithSymbolWriter();
|
||||
for (var declarationIndent = aliasEmitInfo.indent; declarationIndent; declarationIndent--) {
|
||||
increaseIndent();
|
||||
}
|
||||
writeImportEqualsDeclaration(<ImportEqualsDeclaration>aliasToWrite);
|
||||
aliasEmitInfo.asynchronousOutput = writer.getText();
|
||||
}
|
||||
else {
|
||||
// we have to create asynchronous output only after we have collected complete information
|
||||
// because it is possible to enable multiple bindings as asynchronously visible
|
||||
aliasEmitInfo.isVisible = true;
|
||||
}
|
||||
writeImportEqualsDeclaration(aliasToWrite);
|
||||
aliasEmitInfo.asynchronousOutput = writer.getText();
|
||||
}
|
||||
});
|
||||
setWriter(oldWriter);
|
||||
@@ -724,16 +747,16 @@ module ts {
|
||||
}
|
||||
|
||||
function emitImportEqualsDeclaration(node: ImportEqualsDeclaration) {
|
||||
var nodeEmitInfo = {
|
||||
declaration: node,
|
||||
outputPos: writer.getTextPos(),
|
||||
indent: writer.getIndent(),
|
||||
hasWritten: resolver.isDeclarationVisible(node)
|
||||
};
|
||||
aliasDeclarationEmitInfo.push(nodeEmitInfo);
|
||||
if (nodeEmitInfo.hasWritten) {
|
||||
if (resolver.isDeclarationVisible(node)) {
|
||||
writeImportEqualsDeclaration(node);
|
||||
}
|
||||
else {
|
||||
aliasDeclarationEmitInfo.push({
|
||||
declaration: node,
|
||||
outputPos: writer.getTextPos(),
|
||||
indent: writer.getIndent(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function writeImportEqualsDeclaration(node: ImportEqualsDeclaration) {
|
||||
@@ -767,33 +790,58 @@ module ts {
|
||||
}
|
||||
|
||||
function emitImportDeclaration(node: ImportDeclaration) {
|
||||
// TODO(shkamat): Do the changes so that we emit only if declaration is visible
|
||||
if (node.importClause) {
|
||||
aliasDeclarationEmitInfo.push({
|
||||
declaration: node,
|
||||
outputPos: writer.getTextPos(),
|
||||
indent: writer.getIndent(),
|
||||
isVisible: (node.importClause.name && resolver.isDeclarationVisible(node.importClause)) ||
|
||||
isVisibleNamedBinding(node.importClause.namedBindings)
|
||||
});
|
||||
}
|
||||
else {
|
||||
writeImportDeclaration(node);
|
||||
}
|
||||
}
|
||||
|
||||
function isVisibleNamedBinding(namedBindings: NamespaceImport | NamedImports): boolean {
|
||||
if (namedBindings) {
|
||||
if (namedBindings.kind === SyntaxKind.NamespaceImport) {
|
||||
return resolver.isDeclarationVisible(<NamespaceImport>namedBindings);
|
||||
}
|
||||
else {
|
||||
return forEach((<NamedImports>namedBindings).elements, namedImport => resolver.isDeclarationVisible(namedImport));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function writeImportDeclaration(node: ImportDeclaration) {
|
||||
emitJsDocComments(node);
|
||||
if (node.flags & NodeFlags.Export) {
|
||||
write("export ");
|
||||
}
|
||||
write("import ");
|
||||
if (node.importClause) {
|
||||
if (node.importClause.name) {
|
||||
var beforeDefaultBindingEmitPos = writer.getTextPos();
|
||||
if (node.importClause.name && resolver.isDeclarationVisible(node.importClause)) {
|
||||
writeTextOfNode(currentSourceFile, node.importClause.name);
|
||||
if (node.importClause.namedBindings) {
|
||||
write(",");
|
||||
}
|
||||
write(" ");
|
||||
}
|
||||
if (node.importClause.namedBindings) {
|
||||
if (node.importClause.namedBindings && isVisibleNamedBinding(node.importClause.namedBindings)) {
|
||||
if (beforeDefaultBindingEmitPos !== writer.getTextPos()) {
|
||||
// If the default binding was emitted, write the separated
|
||||
write(", ");
|
||||
}
|
||||
if (node.importClause.namedBindings.kind === SyntaxKind.NamespaceImport) {
|
||||
write("* as ");
|
||||
writeTextOfNode(currentSourceFile,(<NamespaceImport>node.importClause.namedBindings).name);
|
||||
write(" ");
|
||||
}
|
||||
else {
|
||||
write("{");
|
||||
emitCommaList((<NamedImports>node.importClause.namedBindings).elements, emitImportSpecifier);
|
||||
write(" } ");
|
||||
write(" }");
|
||||
}
|
||||
}
|
||||
write("from ");
|
||||
write(" from ");
|
||||
}
|
||||
writeTextOfNode(currentSourceFile, node.moduleSpecifier);
|
||||
write(";");
|
||||
@@ -801,12 +849,14 @@ module ts {
|
||||
}
|
||||
|
||||
function emitImportSpecifier(node: ImportSpecifier) {
|
||||
write(" ");
|
||||
if (node.propertyName) {
|
||||
writeTextOfNode(currentSourceFile, node.propertyName);
|
||||
write(" as ");
|
||||
if (resolver.isDeclarationVisible(node)) {
|
||||
write(" ");
|
||||
if (node.propertyName) {
|
||||
writeTextOfNode(currentSourceFile, node.propertyName);
|
||||
write(" as ");
|
||||
}
|
||||
writeTextOfNode(currentSourceFile, node.name);
|
||||
}
|
||||
writeTextOfNode(currentSourceFile, node.name);
|
||||
}
|
||||
|
||||
function emitModuleDeclaration(node: ModuleDeclaration) {
|
||||
|
||||
@@ -1151,9 +1151,11 @@ module ts {
|
||||
CannotBeNamed
|
||||
}
|
||||
|
||||
export type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration;
|
||||
|
||||
export interface SymbolVisibilityResult {
|
||||
accessibility: SymbolAccessibility;
|
||||
aliasesToMakeVisible?: ImportEqualsDeclaration[]; // aliases that need to have this symbol visible
|
||||
aliasesToMakeVisible?: AnyImportSyntax[]; // aliases that need to have this symbol visible
|
||||
errorSymbolName?: string; // Optional symbol name that results in error
|
||||
errorNode?: Node; // optional node that results in error
|
||||
}
|
||||
|
||||
@@ -892,9 +892,10 @@ declare module "typescript" {
|
||||
NotAccessible = 1,
|
||||
CannotBeNamed = 2,
|
||||
}
|
||||
type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration;
|
||||
interface SymbolVisibilityResult {
|
||||
accessibility: SymbolAccessibility;
|
||||
aliasesToMakeVisible?: ImportEqualsDeclaration[];
|
||||
aliasesToMakeVisible?: AnyImportSyntax[];
|
||||
errorSymbolName?: string;
|
||||
errorNode?: Node;
|
||||
}
|
||||
|
||||
@@ -2854,6 +2854,11 @@ declare module "typescript" {
|
||||
CannotBeNamed = 2,
|
||||
>CannotBeNamed : SymbolAccessibility
|
||||
}
|
||||
type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration;
|
||||
>AnyImportSyntax : ImportEqualsDeclaration | ImportDeclaration
|
||||
>ImportDeclaration : ImportDeclaration
|
||||
>ImportEqualsDeclaration : ImportEqualsDeclaration
|
||||
|
||||
interface SymbolVisibilityResult {
|
||||
>SymbolVisibilityResult : SymbolVisibilityResult
|
||||
|
||||
@@ -2861,9 +2866,9 @@ declare module "typescript" {
|
||||
>accessibility : SymbolAccessibility
|
||||
>SymbolAccessibility : SymbolAccessibility
|
||||
|
||||
aliasesToMakeVisible?: ImportEqualsDeclaration[];
|
||||
>aliasesToMakeVisible : ImportEqualsDeclaration[]
|
||||
>ImportEqualsDeclaration : ImportEqualsDeclaration
|
||||
aliasesToMakeVisible?: AnyImportSyntax[];
|
||||
>aliasesToMakeVisible : (ImportEqualsDeclaration | ImportDeclaration)[]
|
||||
>AnyImportSyntax : ImportEqualsDeclaration | ImportDeclaration
|
||||
|
||||
errorSymbolName?: string;
|
||||
>errorSymbolName : string
|
||||
|
||||
@@ -923,9 +923,10 @@ declare module "typescript" {
|
||||
NotAccessible = 1,
|
||||
CannotBeNamed = 2,
|
||||
}
|
||||
type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration;
|
||||
interface SymbolVisibilityResult {
|
||||
accessibility: SymbolAccessibility;
|
||||
aliasesToMakeVisible?: ImportEqualsDeclaration[];
|
||||
aliasesToMakeVisible?: AnyImportSyntax[];
|
||||
errorSymbolName?: string;
|
||||
errorNode?: Node;
|
||||
}
|
||||
|
||||
@@ -2998,6 +2998,11 @@ declare module "typescript" {
|
||||
CannotBeNamed = 2,
|
||||
>CannotBeNamed : SymbolAccessibility
|
||||
}
|
||||
type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration;
|
||||
>AnyImportSyntax : ImportEqualsDeclaration | ImportDeclaration
|
||||
>ImportDeclaration : ImportDeclaration
|
||||
>ImportEqualsDeclaration : ImportEqualsDeclaration
|
||||
|
||||
interface SymbolVisibilityResult {
|
||||
>SymbolVisibilityResult : SymbolVisibilityResult
|
||||
|
||||
@@ -3005,9 +3010,9 @@ declare module "typescript" {
|
||||
>accessibility : SymbolAccessibility
|
||||
>SymbolAccessibility : SymbolAccessibility
|
||||
|
||||
aliasesToMakeVisible?: ImportEqualsDeclaration[];
|
||||
>aliasesToMakeVisible : ImportEqualsDeclaration[]
|
||||
>ImportEqualsDeclaration : ImportEqualsDeclaration
|
||||
aliasesToMakeVisible?: AnyImportSyntax[];
|
||||
>aliasesToMakeVisible : (ImportEqualsDeclaration | ImportDeclaration)[]
|
||||
>AnyImportSyntax : ImportEqualsDeclaration | ImportDeclaration
|
||||
|
||||
errorSymbolName?: string;
|
||||
>errorSymbolName : string
|
||||
|
||||
@@ -924,9 +924,10 @@ declare module "typescript" {
|
||||
NotAccessible = 1,
|
||||
CannotBeNamed = 2,
|
||||
}
|
||||
type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration;
|
||||
interface SymbolVisibilityResult {
|
||||
accessibility: SymbolAccessibility;
|
||||
aliasesToMakeVisible?: ImportEqualsDeclaration[];
|
||||
aliasesToMakeVisible?: AnyImportSyntax[];
|
||||
errorSymbolName?: string;
|
||||
errorNode?: Node;
|
||||
}
|
||||
|
||||
@@ -2950,6 +2950,11 @@ declare module "typescript" {
|
||||
CannotBeNamed = 2,
|
||||
>CannotBeNamed : SymbolAccessibility
|
||||
}
|
||||
type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration;
|
||||
>AnyImportSyntax : ImportEqualsDeclaration | ImportDeclaration
|
||||
>ImportDeclaration : ImportDeclaration
|
||||
>ImportEqualsDeclaration : ImportEqualsDeclaration
|
||||
|
||||
interface SymbolVisibilityResult {
|
||||
>SymbolVisibilityResult : SymbolVisibilityResult
|
||||
|
||||
@@ -2957,9 +2962,9 @@ declare module "typescript" {
|
||||
>accessibility : SymbolAccessibility
|
||||
>SymbolAccessibility : SymbolAccessibility
|
||||
|
||||
aliasesToMakeVisible?: ImportEqualsDeclaration[];
|
||||
>aliasesToMakeVisible : ImportEqualsDeclaration[]
|
||||
>ImportEqualsDeclaration : ImportEqualsDeclaration
|
||||
aliasesToMakeVisible?: AnyImportSyntax[];
|
||||
>aliasesToMakeVisible : (ImportEqualsDeclaration | ImportDeclaration)[]
|
||||
>AnyImportSyntax : ImportEqualsDeclaration | ImportDeclaration
|
||||
|
||||
errorSymbolName?: string;
|
||||
>errorSymbolName : string
|
||||
|
||||
@@ -961,9 +961,10 @@ declare module "typescript" {
|
||||
NotAccessible = 1,
|
||||
CannotBeNamed = 2,
|
||||
}
|
||||
type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration;
|
||||
interface SymbolVisibilityResult {
|
||||
accessibility: SymbolAccessibility;
|
||||
aliasesToMakeVisible?: ImportEqualsDeclaration[];
|
||||
aliasesToMakeVisible?: AnyImportSyntax[];
|
||||
errorSymbolName?: string;
|
||||
errorNode?: Node;
|
||||
}
|
||||
|
||||
@@ -3123,6 +3123,11 @@ declare module "typescript" {
|
||||
CannotBeNamed = 2,
|
||||
>CannotBeNamed : SymbolAccessibility
|
||||
}
|
||||
type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration;
|
||||
>AnyImportSyntax : ImportEqualsDeclaration | ImportDeclaration
|
||||
>ImportDeclaration : ImportDeclaration
|
||||
>ImportEqualsDeclaration : ImportEqualsDeclaration
|
||||
|
||||
interface SymbolVisibilityResult {
|
||||
>SymbolVisibilityResult : SymbolVisibilityResult
|
||||
|
||||
@@ -3130,9 +3135,9 @@ declare module "typescript" {
|
||||
>accessibility : SymbolAccessibility
|
||||
>SymbolAccessibility : SymbolAccessibility
|
||||
|
||||
aliasesToMakeVisible?: ImportEqualsDeclaration[];
|
||||
>aliasesToMakeVisible : ImportEqualsDeclaration[]
|
||||
>ImportEqualsDeclaration : ImportEqualsDeclaration
|
||||
aliasesToMakeVisible?: AnyImportSyntax[];
|
||||
>aliasesToMakeVisible : (ImportEqualsDeclaration | ImportDeclaration)[]
|
||||
>AnyImportSyntax : ImportEqualsDeclaration | ImportDeclaration
|
||||
|
||||
errorSymbolName?: string;
|
||||
>errorSymbolName : string
|
||||
|
||||
@@ -23,5 +23,3 @@ var x = defaultBinding;
|
||||
declare var a: number;
|
||||
export = a;
|
||||
//// [es6ImportDefaultBinding_1.d.ts]
|
||||
import defaultBinding from "es6ImportDefaultBinding_0";
|
||||
import defaultBinding2 from "es6ImportDefaultBinding_0";
|
||||
|
||||
@@ -26,5 +26,3 @@ define(["require", "exports", "es6ImportDefaultBindingAmd_0"], function (require
|
||||
declare var a: number;
|
||||
export = a;
|
||||
//// [es6ImportDefaultBindingAmd_1.d.ts]
|
||||
import defaultBinding from "es6ImportDefaultBindingAmd_0";
|
||||
import defaultBinding2 from "es6ImportDefaultBindingAmd_0";
|
||||
|
||||
@@ -44,9 +44,3 @@ export declare var a: number;
|
||||
export declare var x: number;
|
||||
export declare var m: number;
|
||||
//// [es6ImportDefaultBindingFollowedWithNamedImport_1.d.ts]
|
||||
import defaultBinding1, { } from "es6ImportDefaultBindingFollowedWithNamedImport_0";
|
||||
import defaultBinding2, { a } from "es6ImportDefaultBindingFollowedWithNamedImport_0";
|
||||
import defaultBinding3, { a as b } from "es6ImportDefaultBindingFollowedWithNamedImport_0";
|
||||
import defaultBinding4, { x, a as y } from "es6ImportDefaultBindingFollowedWithNamedImport_0";
|
||||
import defaultBinding5, { x as z } from "es6ImportDefaultBindingFollowedWithNamedImport_0";
|
||||
import defaultBinding6, { m } from "es6ImportDefaultBindingFollowedWithNamedImport_0";
|
||||
|
||||
@@ -42,9 +42,3 @@ var x1 = defaultBinding6;
|
||||
declare var a: number;
|
||||
export = a;
|
||||
//// [es6ImportDefaultBindingFollowedWithNamedImport1_1.d.ts]
|
||||
import defaultBinding1, { } from "es6ImportDefaultBindingFollowedWithNamedImport1_0";
|
||||
import defaultBinding2, { a } from "es6ImportDefaultBindingFollowedWithNamedImport1_0";
|
||||
import defaultBinding3, { a as b } from "es6ImportDefaultBindingFollowedWithNamedImport1_0";
|
||||
import defaultBinding4, { x, a as y } from "es6ImportDefaultBindingFollowedWithNamedImport1_0";
|
||||
import defaultBinding5, { x as z } from "es6ImportDefaultBindingFollowedWithNamedImport1_0";
|
||||
import defaultBinding6, { m } from "es6ImportDefaultBindingFollowedWithNamedImport1_0";
|
||||
|
||||
@@ -42,9 +42,3 @@ var x = defaultBinding6;
|
||||
declare var a: number;
|
||||
export = a;
|
||||
//// [es6ImportDefaultBindingFollowedWithNamedImport1InEs5_1.d.ts]
|
||||
import defaultBinding1, { } from "es6ImportDefaultBindingFollowedWithNamedImport1InEs5_0";
|
||||
import defaultBinding2, { a } from "es6ImportDefaultBindingFollowedWithNamedImport1InEs5_0";
|
||||
import defaultBinding3, { a as b } from "es6ImportDefaultBindingFollowedWithNamedImport1InEs5_0";
|
||||
import defaultBinding4, { x, a as y } from "es6ImportDefaultBindingFollowedWithNamedImport1InEs5_0";
|
||||
import defaultBinding5, { x as z } from "es6ImportDefaultBindingFollowedWithNamedImport1InEs5_0";
|
||||
import defaultBinding6, { m } from "es6ImportDefaultBindingFollowedWithNamedImport1InEs5_0";
|
||||
|
||||
@@ -44,9 +44,3 @@ export declare var a: number;
|
||||
export declare var x: number;
|
||||
export declare var m: number;
|
||||
//// [es6ImportDefaultBindingFollowedWithNamedImportInEs5_1.d.ts]
|
||||
import defaultBinding1, { } from "es6ImportDefaultBindingFollowedWithNamedImportInEs5_0";
|
||||
import defaultBinding2, { a } from "es6ImportDefaultBindingFollowedWithNamedImportInEs5_0";
|
||||
import defaultBinding3, { a as b } from "es6ImportDefaultBindingFollowedWithNamedImportInEs5_0";
|
||||
import defaultBinding4, { x, a as y } from "es6ImportDefaultBindingFollowedWithNamedImportInEs5_0";
|
||||
import defaultBinding5, { x as z } from "es6ImportDefaultBindingFollowedWithNamedImportInEs5_0";
|
||||
import defaultBinding6, { m } from "es6ImportDefaultBindingFollowedWithNamedImportInEs5_0";
|
||||
|
||||
@@ -18,4 +18,3 @@ var x = nameSpaceBinding.a;
|
||||
//// [es6ImportDefaultBindingFollowedWithNamespaceBinding_0.d.ts]
|
||||
export declare var a: number;
|
||||
//// [es6ImportDefaultBindingFollowedWithNamespaceBinding_1.d.ts]
|
||||
import defaultBinding, * as nameSpaceBinding from "es6ImportDefaultBindingFollowedWithNamespaceBinding_0";
|
||||
|
||||
@@ -21,4 +21,3 @@ var x = defaultBinding;
|
||||
declare var a: number;
|
||||
export = a;
|
||||
//// [es6ImportDefaultBindingFollowedWithNamespaceBinding_1.d.ts]
|
||||
import defaultBinding, * as nameSpaceBinding from "es6ImportDefaultBindingFollowedWithNamespaceBinding_0";
|
||||
|
||||
@@ -21,4 +21,3 @@ var x = defaultBinding;
|
||||
declare var a: number;
|
||||
export = a;
|
||||
//// [es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_1.d.ts]
|
||||
import defaultBinding, * as nameSpaceBinding from "es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0";
|
||||
|
||||
@@ -18,4 +18,3 @@ var x = nameSpaceBinding.a;
|
||||
//// [es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0.d.ts]
|
||||
export declare var a: number;
|
||||
//// [es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_1.d.ts]
|
||||
import defaultBinding, * as nameSpaceBinding from "es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5_0";
|
||||
|
||||
@@ -18,4 +18,3 @@ module.exports = a;
|
||||
declare var a: number;
|
||||
export = a;
|
||||
//// [es6ImportDefaultBindingInEs5_1.d.ts]
|
||||
import defaultBinding from "es6ImportDefaultBindingInEs5_0";
|
||||
|
||||
@@ -20,5 +20,3 @@ var x = nameSpaceBinding.a;
|
||||
//// [es6ImportNameSpaceImport_0.d.ts]
|
||||
export declare var a: number;
|
||||
//// [es6ImportNameSpaceImport_1.d.ts]
|
||||
import * as nameSpaceBinding from "es6ImportNameSpaceImport_0";
|
||||
import * as nameSpaceBinding2 from "es6ImportNameSpaceImport_0";
|
||||
|
||||
@@ -23,5 +23,3 @@ define(["require", "exports", "es6ImportNameSpaceImportAmd_0"], function (requir
|
||||
//// [es6ImportNameSpaceImportAmd_0.d.ts]
|
||||
export declare var a: number;
|
||||
//// [es6ImportNameSpaceImportAmd_1.d.ts]
|
||||
import * as nameSpaceBinding from "es6ImportNameSpaceImportAmd_0";
|
||||
import * as nameSpaceBinding2 from "es6ImportNameSpaceImportAmd_0";
|
||||
|
||||
@@ -20,5 +20,3 @@ var x = nameSpaceBinding.a;
|
||||
//// [es6ImportNameSpaceImportInEs5_0.d.ts]
|
||||
export declare var a: number;
|
||||
//// [es6ImportNameSpaceImportInEs5_1.d.ts]
|
||||
import * as nameSpaceBinding from "es6ImportNameSpaceImportInEs5_0";
|
||||
import * as nameSpaceBinding2 from "es6ImportNameSpaceImportInEs5_0";
|
||||
|
||||
@@ -96,15 +96,3 @@ export declare var z1: number;
|
||||
export declare var z2: number;
|
||||
export declare var aaaa: number;
|
||||
//// [es6ImportNamedImport_1.d.ts]
|
||||
import { } from "es6ImportNamedImport_0";
|
||||
import { a } from "es6ImportNamedImport_0";
|
||||
import { a as b } from "es6ImportNamedImport_0";
|
||||
import { x, a as y } from "es6ImportNamedImport_0";
|
||||
import { x as z } from "es6ImportNamedImport_0";
|
||||
import { m } from "es6ImportNamedImport_0";
|
||||
import { a1, x1 } from "es6ImportNamedImport_0";
|
||||
import { a1 as a11, x1 as x11 } from "es6ImportNamedImport_0";
|
||||
import { z1 } from "es6ImportNamedImport_0";
|
||||
import { z2 as z3 } from "es6ImportNamedImport_0";
|
||||
import { aaaa } from "es6ImportNamedImport_0";
|
||||
import { aaaa as bbbb } from "es6ImportNamedImport_0";
|
||||
|
||||
@@ -91,15 +91,3 @@ export declare var z1: number;
|
||||
export declare var z2: number;
|
||||
export declare var aaaa: number;
|
||||
//// [es6ImportNamedImportAmd_1.d.ts]
|
||||
import { } from "es6ImportNamedImportAmd_0";
|
||||
import { a } from "es6ImportNamedImportAmd_0";
|
||||
import { a as b } from "es6ImportNamedImportAmd_0";
|
||||
import { x, a as y } from "es6ImportNamedImportAmd_0";
|
||||
import { x as z } from "es6ImportNamedImportAmd_0";
|
||||
import { m } from "es6ImportNamedImportAmd_0";
|
||||
import { a1, x1 } from "es6ImportNamedImportAmd_0";
|
||||
import { a1 as a11, x1 as x11 } from "es6ImportNamedImportAmd_0";
|
||||
import { z1 } from "es6ImportNamedImportAmd_0";
|
||||
import { z2 as z3 } from "es6ImportNamedImportAmd_0";
|
||||
import { aaaa } from "es6ImportNamedImportAmd_0";
|
||||
import { aaaa as bbbb } from "es6ImportNamedImportAmd_0";
|
||||
|
||||
@@ -96,15 +96,3 @@ export declare var z1: number;
|
||||
export declare var z2: number;
|
||||
export declare var aaaa: number;
|
||||
//// [es6ImportNamedImportInEs5_1.d.ts]
|
||||
import { } from "es6ImportNamedImportInEs5_0";
|
||||
import { a } from "es6ImportNamedImportInEs5_0";
|
||||
import { a as b } from "es6ImportNamedImportInEs5_0";
|
||||
import { x, a as y } from "es6ImportNamedImportInEs5_0";
|
||||
import { x as z } from "es6ImportNamedImportInEs5_0";
|
||||
import { m } from "es6ImportNamedImportInEs5_0";
|
||||
import { a1, x1 } from "es6ImportNamedImportInEs5_0";
|
||||
import { a1 as a11, x1 as x11 } from "es6ImportNamedImportInEs5_0";
|
||||
import { z1 } from "es6ImportNamedImportInEs5_0";
|
||||
import { z2 as z3 } from "es6ImportNamedImportInEs5_0";
|
||||
import { aaaa } from "es6ImportNamedImportInEs5_0";
|
||||
import { aaaa as bbbb } from "es6ImportNamedImportInEs5_0";
|
||||
|
||||
Reference in New Issue
Block a user