diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 40db300d310..c1d8bd991c4 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -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 && (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 diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 17156aee0f1..773083d49b6 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -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;