mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 07:29:16 -05:00
Use combined node flags (#39403)
This commit is contained in:
@@ -13307,7 +13307,7 @@ namespace ts {
|
||||
function isUncalledFunctionReference(node: Node, symbol: Symbol) {
|
||||
return !(symbol.flags & (SymbolFlags.Function | SymbolFlags.Method))
|
||||
|| !isCallLikeExpression(findAncestor(node, n => !isAccessExpression(n)) || node.parent)
|
||||
&& every(symbol.declarations, d => !isFunctionLike(d) || !!(d.flags & NodeFlags.Deprecated));
|
||||
&& every(symbol.declarations, d => !isFunctionLike(d) || !!(getCombinedNodeFlags(d) & NodeFlags.Deprecated));
|
||||
}
|
||||
|
||||
function getPropertyTypeForIndexType(originalObjectType: Type, objectType: Type, indexType: Type, fullIndexType: Type, suppressNoImplicitAnyError: boolean, accessNode: ElementAccessExpression | IndexedAccessTypeNode | PropertyName | BindingName | SyntheticExpression | undefined, accessFlags: AccessFlags, reportDeprecated?: boolean) {
|
||||
@@ -22092,7 +22092,7 @@ namespace ts {
|
||||
const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
|
||||
let declaration: Declaration | undefined = localOrExportSymbol.valueDeclaration;
|
||||
|
||||
if (declaration?.flags & NodeFlags.Deprecated && isUncalledFunctionReference(node.parent, localOrExportSymbol)) {
|
||||
if (declaration && getCombinedNodeFlags(declaration) & NodeFlags.Deprecated && isUncalledFunctionReference(node.parent, localOrExportSymbol)) {
|
||||
errorOrSuggestion(/* isError */ false, node, Diagnostics._0_is_deprecated, node.escapedText as string);;
|
||||
}
|
||||
if (localOrExportSymbol.flags & SymbolFlags.Class) {
|
||||
|
||||
Reference in New Issue
Block a user