mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-23 19:59:37 +00:00
null -> undefined
This commit is contained in:
@@ -59,20 +59,20 @@ export abstract class TypeScriptBaseCodeLensProvider implements vscode.CodeLensP
|
||||
const tree = response.body;
|
||||
const referenceableSpans: vscode.Range[] = [];
|
||||
if (tree && tree.childItems) {
|
||||
tree.childItems.forEach(item => this.walkNavTree(document, item, null, referenceableSpans));
|
||||
tree.childItems.forEach(item => this.walkNavTree(document, item, undefined, referenceableSpans));
|
||||
}
|
||||
return referenceableSpans.map(span => new ReferencesCodeLens(document.uri, filepath, span));
|
||||
}
|
||||
|
||||
protected abstract extractSymbol(
|
||||
item: Proto.NavigationTree,
|
||||
parent: Proto.NavigationTree | null
|
||||
parent: Proto.NavigationTree | undefined
|
||||
): vscode.Range | undefined;
|
||||
|
||||
private walkNavTree(
|
||||
document: vscode.TextDocument,
|
||||
item: Proto.NavigationTree,
|
||||
parent: Proto.NavigationTree | null,
|
||||
parent: Proto.NavigationTree | undefined,
|
||||
results: vscode.Range[]
|
||||
): void {
|
||||
const range = this.extractSymbol(item, parent);
|
||||
|
||||
@@ -67,7 +67,7 @@ export default class TypeScriptImplementationsCodeLensProvider extends TypeScrip
|
||||
|
||||
protected extractSymbol(
|
||||
item: Proto.NavigationTree,
|
||||
_parent: Proto.NavigationTree | null
|
||||
_parent: Proto.NavigationTree | undefined
|
||||
): vscode.Range | undefined {
|
||||
if (!item.nameSpan) {
|
||||
return undefined;
|
||||
|
||||
@@ -62,7 +62,7 @@ export class TypeScriptReferencesCodeLensProvider extends TypeScriptBaseCodeLens
|
||||
|
||||
protected extractSymbol(
|
||||
item: Proto.NavigationTree,
|
||||
parent: Proto.NavigationTree | null
|
||||
parent: Proto.NavigationTree | undefined
|
||||
): vscode.Range | undefined {
|
||||
if (!item.nameSpan) {
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user