Fix(deprecation): report method name instead of type for deprecated methods#62406
Fix(deprecation): report method name instead of type for deprecated methods#62406hanseul37 wants to merge 3 commits intomicrosoft:mainfrom
Conversation
|
@microsoft-github-policy-service agree
|
jakebailey
left a comment
There was a problem hiding this comment.
This needs a test, but is probably wrong as it is casting nodes around to any to extract text. The fix should probably in the caller of addDeprecatedSuggestionWithSignature as that func is just a helper that automates adding a diagnostic.
RyanCavanaugh
left a comment
There was a problem hiding this comment.
Please address the prior comment from Jake
|
With 6.0 out as the final release vehicle for this codebase, we're closing all PRs that don't fit the merge criteria for post-6.0 patches. If you think this was a mistake and this PR fits the post-6.0 patch criteria, please post to the 6.0 iteration issue with details (specifically, which PR and which patch criteria it satisfies). Next steps for PRs:
|
Fix deprecation message to show method name instead of type (#62396)
Changes
checkDeprecatedSignatureandaddDeprecatedSuggestionWithSignaturefunctions to extract and show the invoked method name.Summary of Changes
In
checkDeprecatedSignature:tryGetPropertyAccessOrIdentifierToString.PropertyAccessExpression, retrieve the name frompropAccess.name.getText().<unknown>only if no name can be determined.In
addDeprecatedSuggestionWithSignature:deprecatedEntityis falsy.Problem Solved
'(): ZodObject<{ compilerOptions: ZodAny; }, $loose>' is deprecated'passthrough()' is deprecatedRelated Issue