@@ -22730,11 +22730,9 @@ namespace ts {
22730
22730
}
22731
22731
22732
22732
const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
22733
- let declaration: Declaration | undefined = localOrExportSymbol.valueDeclaration ;
22733
+ checkDeprecatedIdentifier(node, localOrExportSymbol) ;
22734
22734
22735
- if (declaration && getCombinedNodeFlags(declaration) & NodeFlags.Deprecated && isUncalledFunctionReference(node.parent, localOrExportSymbol)) {
22736
- errorOrSuggestion(/* isError */ false, node, Diagnostics._0_is_deprecated, node.escapedText as string);;
22737
- }
22735
+ let declaration: Declaration | undefined = localOrExportSymbol.valueDeclaration;
22738
22736
if (localOrExportSymbol.flags & SymbolFlags.Class) {
22739
22737
// Due to the emit for class decorators, any reference to the class from inside of the class body
22740
22738
// must instead be rewritten to point to a temporary variable to avoid issues with the double-bind
@@ -28307,6 +28305,13 @@ namespace ts {
28307
28305
return returnType;
28308
28306
}
28309
28307
28308
+ function checkDeprecatedIdentifier(node: Identifier, symbol: Symbol) {
28309
+ const sourceSymbol = symbol.flags & SymbolFlags.Alias ? resolveAlias(symbol) : symbol;
28310
+ if (getDeclarationNodeFlagsFromSymbol(sourceSymbol) & NodeFlags.Deprecated && isUncalledFunctionReference(node.parent, sourceSymbol)) {
28311
+ errorOrSuggestion(/* isError */ false, node, Diagnostics._0_is_deprecated, node.escapedText as string);
28312
+ }
28313
+ }
28314
+
28310
28315
function checkDeprecatedSignature(signature: Signature, node: CallLikeExpression) {
28311
28316
if (signature.declaration && signature.declaration.flags & NodeFlags.Deprecated) {
28312
28317
const suggestionNode = getDeprecatedSuggestionNode(node);
0 commit comments