MCPcopy Index your code
hub / github.com/microsoft/vscode-languageserver-node / asCodeLens

Function asCodeLens

client/src/protocolConverter.ts:489–497  ·  view source on GitHub ↗
(item: ls.CodeLens | undefined | null)

Source from the content-addressed store, hash-verified

487 function asCodeLens(item: undefined | null): undefined;
488 function asCodeLens(item: ls.CodeLens | undefined | null): code.CodeLens | undefined;
489 function asCodeLens(item: ls.CodeLens | undefined | null): code.CodeLens | undefined {
490 if (!item) {
491 return undefined;
492 }
493 let result: ProtocolCodeLens = new ProtocolCodeLens(asRange(item.range));
494 if (item.command) { result.command = asCommand(item.command); }
495 if (item.data !== void 0 && item.data !== null) { result.data = item.data; }
496 return result;
497 }
498
499 function asCodeLenses(items: ls.CodeLens[]): code.CodeLens[];
500 function asCodeLenses(items: undefined | null): undefined;

Callers 1

asCodeLensesFunction · 0.70

Calls 2

asRangeFunction · 0.70
asCommandFunction · 0.70

Tested by

no test coverage detected