@@ -13287,7 +13287,7 @@ namespace ts {
1328713287 function isUncalledFunctionReference(node: Node, symbol: Symbol) {
1328813288 return !(symbol.flags & (SymbolFlags.Function | SymbolFlags.Method))
1328913289 || !isCallLikeExpression(findAncestor(node, n => !isAccessExpression(n)) || node.parent)
13290- && every(symbol.declarations, d => !isFunctionLike(d) || !!(d.flags & NodeFlags.Deprecated));
13290+ && every(symbol.declarations, d => !isFunctionLike(d) || !!(getCombinedNodeFlags(d) & NodeFlags.Deprecated));
1329113291 }
1329213292
1329313293 function getPropertyTypeForIndexType(originalObjectType: Type, objectType: Type, indexType: Type, fullIndexType: Type, suppressNoImplicitAnyError: boolean, accessNode: ElementAccessExpression | IndexedAccessTypeNode | PropertyName | BindingName | SyntheticExpression | undefined, accessFlags: AccessFlags) {
@@ -13296,7 +13296,7 @@ namespace ts {
1329613296 if (propName !== undefined) {
1329713297 const prop = getPropertyOfType(objectType, propName);
1329813298 if (prop) {
13299- if (accessNode && prop.valueDeclaration?.flags & NodeFlags.Deprecated && isUncalledFunctionReference(accessNode, prop)) {
13299+ if (accessNode && prop.valueDeclaration && getCombinedNodeFlags(prop.valueDeclaration) & NodeFlags.Deprecated && isUncalledFunctionReference(accessNode, prop)) {
1330013300 const deprecatedNode = accessExpression?.argumentExpression ?? (isIndexedAccessTypeNode(accessNode) ? accessNode.indexType : accessNode);
1330113301 errorOrSuggestion(/* isError */ false, deprecatedNode, Diagnostics._0_is_deprecated, propName as string);
1330213302 }
@@ -22061,7 +22061,7 @@ namespace ts {
2206122061 const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
2206222062 let declaration: Declaration | undefined = localOrExportSymbol.valueDeclaration;
2206322063
22064- if (declaration?.flags & NodeFlags.Deprecated && isUncalledFunctionReference(node.parent, localOrExportSymbol)) {
22064+ if (declaration && getCombinedNodeFlags(declaration) & NodeFlags.Deprecated && isUncalledFunctionReference(node.parent, localOrExportSymbol)) {
2206522065 errorOrSuggestion(/* isError */ false, node, Diagnostics._0_is_deprecated, node.escapedText as string);;
2206622066 }
2206722067 if (localOrExportSymbol.flags & SymbolFlags.Class) {
@@ -25038,7 +25038,7 @@ namespace ts {
2503825038 propType = indexInfo.type;
2503925039 }
2504025040 else {
25041- if (prop.valueDeclaration?.flags & NodeFlags.Deprecated && isUncalledFunctionReference(node, prop)) {
25041+ if (prop.valueDeclaration && getCombinedNodeFlags(prop.valueDeclaration) & NodeFlags.Deprecated && isUncalledFunctionReference(node, prop)) {
2504225042 errorOrSuggestion(/* isError */ false, right, Diagnostics._0_is_deprecated, right.escapedText as string);
2504325043 }
2504425044
@@ -27492,7 +27492,7 @@ namespace ts {
2749227492 }
2749327493
2749427494 function checkDeprecatedSignature(signature: Signature, node: Node) {
27495- if (signature.declaration && signature.declaration.flags & NodeFlags.Deprecated) {
27495+ if (signature.declaration && getCombinedNodeFlags( signature.declaration) & NodeFlags.Deprecated) {
2749627496 errorOrSuggestion(/*isError*/ false, node, Diagnostics._0_is_deprecated, signatureToString(signature));
2749727497 }
2749827498 }
@@ -30883,7 +30883,7 @@ namespace ts {
3088330883 }
3088430884 const symbol = getNodeLinks(node).resolvedSymbol;
3088530885 if (symbol) {
30886- if (every(symbol.declarations, d => !isTypeDeclaration(d) || !!(d.flags & NodeFlags.Deprecated))) {
30886+ if (every(symbol.declarations, d => !isTypeDeclaration(d) || !!(getCombinedNodeFlags(d) & NodeFlags.Deprecated))) {
3088730887 const diagLocation = isTypeReferenceNode(node) && isQualifiedName(node.typeName) ? node.typeName.right : node;
3088830888 errorOrSuggestion(/* isError */ false, diagLocation, Diagnostics._0_is_deprecated, symbol.escapedName as string);
3088930889 }
@@ -35230,8 +35230,8 @@ namespace ts {
3523035230 }
3523135231
3523235232 if (isImportSpecifier(node) &&
35233- (target.valueDeclaration && target.valueDeclaration.flags & NodeFlags.Deprecated
35234- || every(target.declarations, d => !!(d.flags & NodeFlags.Deprecated)))) {
35233+ (target.valueDeclaration && getCombinedNodeFlags( target.valueDeclaration) & NodeFlags.Deprecated
35234+ || every(target.declarations, d => !!(getCombinedNodeFlags(d) & NodeFlags.Deprecated)))) {
3523535235 errorOrSuggestion(/* isError */ false, node.name, Diagnostics._0_is_deprecated, symbol.escapedName as string);
3523635236 }
3523735237 }
0 commit comments