mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-26 20:14:05 -05:00
Add deprecated related feature (#38523)
* Add deprecated related feature * Add more support * fix navtree * Add identifier check * Add more deprecated * fix crash * fix more crash * fix crash * improve diagnostic * avoid new tag * avoid tags * accept baseline * Check deprecated in binder * fix baseline * fix jsdoc cache * fix incorrect fix * Avoid useless changes * Accept baseline * Add tests * fix perf * fix public api * Adjust deprecated mark on qualifed name * Revolve alias symbol * Use modifier flags insted of symbol props * Fix modifier flag resolve * Make lint happy * Fix crash * fix crash * Add cached utils function * Accept baseline * Add more tests * try pinning octokit again * Avoid tests * Use utils some * Deprecated perf test (#3) * check valueDeclaration only * check without modifierFlags * donot check alias * use cached tag * remove call to jsdoc * use deprecated tag * revert changes * Revert mission changes * use node flags * cache result * cache * avoid modifier flags * Opts * fix jsdoc include modifier * fix tests * fix again * use symbol flag * set @octokit/rest back to latest * fix trailing spacel int Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
This commit is contained in:
@@ -498,6 +498,7 @@ namespace ts.server.protocol {
|
||||
code: number;
|
||||
/** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
|
||||
reportsUnnecessary?: {};
|
||||
reportsDeprecated?: {};
|
||||
relatedInformation?: DiagnosticRelatedInformation[];
|
||||
}
|
||||
|
||||
@@ -2535,6 +2536,8 @@ namespace ts.server.protocol {
|
||||
|
||||
reportsUnnecessary?: {};
|
||||
|
||||
reportsDeprecated?: {};
|
||||
|
||||
/**
|
||||
* Any related spans the diagnostic may have, such as other locations relevant to an error, such as declarartion sites
|
||||
*/
|
||||
@@ -3066,6 +3069,7 @@ namespace ts.server.protocol {
|
||||
export interface CallHierarchyItem {
|
||||
name: string;
|
||||
kind: ScriptElementKind;
|
||||
kindModifiers?: string
|
||||
file: string;
|
||||
span: TextSpan;
|
||||
selectionSpan: TextSpan;
|
||||
|
||||
@@ -56,6 +56,7 @@ namespace ts.server {
|
||||
code: diag.code,
|
||||
category: diagnosticCategoryName(diag),
|
||||
reportsUnnecessary: diag.reportsUnnecessary,
|
||||
reportsDeprecated: diag.reportsDeprecated,
|
||||
source: diag.source,
|
||||
relatedInformation: map(diag.relatedInformation, formatRelatedInformation),
|
||||
};
|
||||
@@ -100,6 +101,7 @@ namespace ts.server {
|
||||
code,
|
||||
category,
|
||||
reportsUnnecessary: diag.reportsUnnecessary,
|
||||
reportsDeprecated: diag.reportsDeprecated,
|
||||
source,
|
||||
relatedInformation: map(diag.relatedInformation, formatRelatedInformation),
|
||||
};
|
||||
@@ -1063,6 +1065,7 @@ namespace ts.server {
|
||||
startLocation: (d.file && convertToLocation(getLineAndCharacterOfPosition(d.file, d.start!)))!, // TODO: GH#18217
|
||||
endLocation: (d.file && convertToLocation(getLineAndCharacterOfPosition(d.file, d.start! + d.length!)))!, // TODO: GH#18217
|
||||
reportsUnnecessary: d.reportsUnnecessary,
|
||||
reportsDeprecated: d.reportsDeprecated,
|
||||
relatedInformation: map(d.relatedInformation, formatRelatedInformation)
|
||||
}));
|
||||
}
|
||||
@@ -1092,6 +1095,7 @@ namespace ts.server {
|
||||
startLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start!), // TODO: GH#18217
|
||||
endLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start! + d.length!),
|
||||
reportsUnnecessary: d.reportsUnnecessary,
|
||||
reportsDeprecated: d.reportsDeprecated,
|
||||
relatedInformation: map(d.relatedInformation, formatRelatedInformation),
|
||||
});
|
||||
}
|
||||
@@ -1927,6 +1931,7 @@ namespace ts.server {
|
||||
const bakedItem: protocol.NavtoItem = {
|
||||
name: navItem.name,
|
||||
kind: navItem.kind,
|
||||
kindModifiers: navItem.kindModifiers,
|
||||
isCaseSensitive: navItem.isCaseSensitive,
|
||||
matchKind: navItem.matchKind,
|
||||
file: navItem.fileName,
|
||||
@@ -2266,6 +2271,7 @@ namespace ts.server {
|
||||
return {
|
||||
name: item.name,
|
||||
kind: item.kind,
|
||||
kindModifiers: item.kindModifiers,
|
||||
file: item.file,
|
||||
span: toProtocolTextSpan(item.span, scriptInfo),
|
||||
selectionSpan: toProtocolTextSpan(item.selectionSpan, scriptInfo)
|
||||
|
||||
Reference in New Issue
Block a user