mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-20 01:54:20 -06:00
Remove post bind step for modules.
This commit is contained in:
parent
eb29eb9acd
commit
fab6fca5b4
@ -409,17 +409,9 @@ module ts {
|
||||
return declareSymbolAndAddToSymbolTable(node, SymbolFlags.NamespaceModule, SymbolFlags.NamespaceModuleExcludes);
|
||||
}
|
||||
else {
|
||||
return declareSymbolAndAddToSymbolTable(node, SymbolFlags.ValueModule, SymbolFlags.ValueModuleExcludes);
|
||||
}
|
||||
}
|
||||
}
|
||||
let result = declareSymbolAndAddToSymbolTable(node, SymbolFlags.ValueModule, SymbolFlags.ValueModuleExcludes);
|
||||
|
||||
function postBindModuleDeclarationChildren(node: ModuleDeclaration) {
|
||||
if (node.name.kind !== SyntaxKind.StringLiteral) {
|
||||
let state = getModuleInstanceState(node);
|
||||
if (state !== ModuleInstanceState.NonInstantiated) {
|
||||
let currentModuleIsConstEnumOnly = state === ModuleInstanceState.ConstEnumOnly;
|
||||
|
||||
if (node.symbol.constEnumOnlyModule === undefined) {
|
||||
// non-merged case - use the current state
|
||||
node.symbol.constEnumOnlyModule = currentModuleIsConstEnumOnly;
|
||||
@ -428,6 +420,8 @@ module ts {
|
||||
// merged case: module is const enum only if all its pieces are non-instantiated or const enum
|
||||
node.symbol.constEnumOnlyModule = node.symbol.constEnumOnlyModule && currentModuleIsConstEnumOnly;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -600,8 +594,6 @@ module ts {
|
||||
|
||||
function postBindChildren(node: Node) {
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.ModuleDeclaration:
|
||||
return postBindModuleDeclarationChildren(<ModuleDeclaration>node);
|
||||
case SyntaxKind.FunctionType:
|
||||
case SyntaxKind.ConstructorType:
|
||||
return postBindFunctionOrConstructorTypeChildren(<SignatureDeclaration>node);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user