@@ -240,9 +240,9 @@ export default class SourceFileLinter {
240240 return deprecatedTag . text ?. reduce ( ( acc , text ) => acc + text . text , "" ) . split ( "\n\n" ) [ 0 ] ?? "" ;
241241 }
242242
243- getDeprecationInfo ( symbol : ts . Symbol | undefined ) : DeprecationInfo | null {
243+ getDeprecationInfo ( symbol : ts . Symbol | undefined , signature ?: ts . Signature ) : DeprecationInfo | null {
244244 if ( symbol && this . isSymbolOfUi5Type ( symbol ) ) {
245- const jsdocTags = symbol . getJsDocTags ( this . #checker) ;
245+ const jsdocTags = ( signature ?? symbol ) . getJsDocTags ( this . #checker) ;
246246 const deprecatedTag = jsdocTags . find ( ( tag ) => tag . name === "deprecated" ) ;
247247 if ( deprecatedTag ) {
248248 const deprecationInfo : DeprecationInfo = {
@@ -286,7 +286,9 @@ export default class SourceFileLinter {
286286 throw new Error ( `Unhandled CallExpression expression syntax: ${ ts . SyntaxKind [ exprNode . kind ] } ` ) ;
287287 }
288288
289- const deprecationInfo = this . getDeprecationInfo ( exprType . symbol ) ;
289+ const signature = this . #checker. getResolvedSignature ( node ) ;
290+ const deprecationInfo = this . getDeprecationInfo ( exprType . symbol , signature ) ;
291+
290292 if ( ! deprecationInfo ) {
291293 return ;
292294 }
@@ -454,6 +456,20 @@ export default class SourceFileLinter {
454456 return ; // Already analyzed in context of call expression
455457 }
456458
459+ const nodeType = this . #checker. getTypeAtLocation ( node ) ;
460+ const signatures = nodeType . getCallSignatures ( ) ;
461+ if ( signatures ) {
462+ const allSignaturesDeprecated = signatures . every ( ( signature ) => {
463+ signature . getJsDocTags ( ) . some ( ( tag ) => {
464+ return tag . name === "deprecated" ;
465+ } ) ;
466+ } ) ;
467+
468+ if ( ! allSignaturesDeprecated ) {
469+ return ;
470+ }
471+ }
472+
457473 const deprecationInfo = this . getDeprecationInfoForAccess ( node ) ;
458474 if ( deprecationInfo ) {
459475 if ( this . isSymbolOfJquerySapType ( deprecationInfo . symbol ) ) {
0 commit comments