Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,24 @@ class TsconfigLinkProvider implements vscode.DocumentLinkProvider {
}

return coalesce([
this.getExtendsLink(document, root),
...this.getExtendsLinks(document, root),
...this.getFilesLinks(document, root),
...this.getReferencesLinks(document, root)
]);
}

private getExtendsLink(document: vscode.TextDocument, root: jsonc.Node): vscode.DocumentLink | undefined {
private getExtendsLinks(document: vscode.TextDocument, root: jsonc.Node) {
const node = jsonc.findNodeAtLocation(root, ['extends']);
return node && this.tryCreateTsConfigLink(document, node, TsConfigLinkType.Extends);

if (!node) {
return [];
}

if (node.type === 'array') {
return mapChildren(node, child => this.tryCreateTsConfigLink(document, child, TsConfigLinkType.Extends));
}

return [this.tryCreateTsConfigLink(document, node, TsConfigLinkType.Extends)];
}
Comment thread
unrevised6419 marked this conversation as resolved.
Outdated

private getReferencesLinks(document: vscode.TextDocument, root: jsonc.Node) {
Expand Down