mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
fix(47256): show deprecated on index signatures (#47400)
This commit is contained in:
@@ -28587,6 +28587,9 @@ namespace ts {
|
||||
if (compilerOptions.noPropertyAccessFromIndexSignature && isPropertyAccessExpression(node)) {
|
||||
error(right, Diagnostics.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0, unescapeLeadingUnderscores(right.escapedText));
|
||||
}
|
||||
if (indexInfo.declaration && getCombinedNodeFlags(indexInfo.declaration) & NodeFlags.Deprecated) {
|
||||
addDeprecatedSuggestion(right, [indexInfo.declaration], right.escapedText as string);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (isDeprecatedSymbol(prop) && isUncalledFunctionReference(node, prop) && prop.declarations) {
|
||||
|
||||
Reference in New Issue
Block a user