Merge pull request #5139 from Microsoft/getBlockScopedVariableIdIsNoMore

[cleanup] remove unused function from the EmitResolver
This commit is contained in:
Vladimir Matveev
2015-10-06 14:16:13 -07:00
2 changed files with 0 additions and 27 deletions
-26
View File
@@ -14764,31 +14764,6 @@ namespace ts {
return symbol && getExportSymbolOfValueSymbolIfExported(symbol).valueDeclaration;
}
function getBlockScopedVariableId(n: Identifier): number {
Debug.assert(!nodeIsSynthesized(n));
let isVariableDeclarationOrBindingElement =
n.parent.kind === SyntaxKind.BindingElement || (n.parent.kind === SyntaxKind.VariableDeclaration && (<VariableDeclaration>n.parent).name === n);
let symbol =
(isVariableDeclarationOrBindingElement ? getSymbolOfNode(n.parent) : undefined) ||
getNodeLinks(n).resolvedSymbol ||
resolveName(n, n.text, SymbolFlags.Value | SymbolFlags.Alias, /*nodeNotFoundMessage*/ undefined, /*nameArg*/ undefined);
let isLetOrConst =
symbol &&
(symbol.flags & SymbolFlags.BlockScopedVariable) &&
symbol.valueDeclaration.parent.kind !== SyntaxKind.CatchClause;
if (isLetOrConst) {
// side-effect of calling this method:
// assign id to symbol if it was not yet set
getSymbolLinks(symbol);
return symbol.id;
}
return undefined;
}
function instantiateSingleCallFunctionType(functionType: Type, typeArguments: Type[]): Type {
if (functionType === unknownType) {
return unknownType;
@@ -14823,7 +14798,6 @@ namespace ts {
isEntityNameVisible,
getConstantValue,
collectLinkedAliases,
getBlockScopedVariableId,
getReferencedValueDeclaration,
getTypeReferenceSerializationKind,
isOptionalParameter
-1
View File
@@ -1598,7 +1598,6 @@ namespace ts {
isEntityNameVisible(entityName: EntityName | Expression, enclosingDeclaration: Node): SymbolVisibilityResult;
// Returns the constant value this property access resolves to, or 'undefined' for a non-constant
getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number;
getBlockScopedVariableId(node: Identifier): number;
getReferencedValueDeclaration(reference: Identifier): Declaration;
getTypeReferenceSerializationKind(typeName: EntityName): TypeReferenceSerializationKind;
isOptionalParameter(node: ParameterDeclaration): boolean;