mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 11:24:29 -05:00
added completion for exports in named imports section
This commit is contained in:
@@ -56,6 +56,7 @@ module ts {
|
||||
isImplementationOfOverload,
|
||||
getAliasedSymbol: resolveImport,
|
||||
getEmitResolver,
|
||||
getExportsOfExternalModule,
|
||||
};
|
||||
|
||||
var undefinedSymbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient, "undefined");
|
||||
@@ -2754,6 +2755,19 @@ module ts {
|
||||
return result;
|
||||
}
|
||||
|
||||
function getExportsOfExternalModule(node: ImportDeclaration): Symbol[]{
|
||||
if (!node.moduleSpecifier) {
|
||||
return emptyArray;
|
||||
}
|
||||
|
||||
var module = resolveExternalModuleName(node, node.moduleSpecifier);
|
||||
if (!module || !module.exports) {
|
||||
return emptyArray;
|
||||
}
|
||||
|
||||
return mapToArray(module.exports)
|
||||
}
|
||||
|
||||
function getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature {
|
||||
var links = getNodeLinks(declaration);
|
||||
if (!links.resolvedSignature) {
|
||||
|
||||
@@ -1100,6 +1100,7 @@ module ts {
|
||||
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
|
||||
isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean;
|
||||
getAliasedSymbol(symbol: Symbol): Symbol;
|
||||
getExportsOfExternalModule(node: ImportDeclaration): Symbol[];
|
||||
|
||||
// Should not be called directly. Should only be accessed through the Program instance.
|
||||
/* @internal */ getDiagnostics(sourceFile?: SourceFile): Diagnostic[];
|
||||
|
||||
Reference in New Issue
Block a user