diff options
author | Jean Pierre <jeanp413@hotmail.com> | 2021-04-19 20:29:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-20 11:29:27 +1000 |
commit | 2079da0f1ca62795c8c95dcbc5bcb8676c367f3f (patch) | |
tree | bcac0c1d30af6aff693b97faf2ac9ee633eb9f3d /cli/tests | |
parent | 6d404ec54bab00d9f86c8d69a70dd94e5ab83434 (diff) |
feat(lsp): Implement textDocument/documentSymbol (#9981)
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/lsp/document_symbol_did_open_notification.json | 12 | ||||
-rw-r--r-- | cli/tests/lsp/document_symbol_request.json | 10 |
2 files changed, 22 insertions, 0 deletions
diff --git a/cli/tests/lsp/document_symbol_did_open_notification.json b/cli/tests/lsp/document_symbol_did_open_notification.json new file mode 100644 index 000000000..31c37c152 --- /dev/null +++ b/cli/tests/lsp/document_symbol_did_open_notification.json @@ -0,0 +1,12 @@ +{ + "jsonrpc": "2.0", + "method": "textDocument/didOpen", + "params": { + "textDocument": { + "uri": "file:///a/file.ts", + "languageId": "typescript", + "version": 1, + "text": "interface IFoo {\n foo(): boolean;\n}\n\nclass Bar implements IFoo {\n constructor(public x: number) { }\n foo() { return true; }\n /** @deprecated */\n baz() { return false; }\n get value(): number { return 0; }\n set value(newVavlue: number) { return; }\n static staticBar = new Bar(0);\n private static getStaticBar() { return Bar.staticBar; }\n}\n\nenum Values { value1, value2 }\n\nvar bar: IFoo = new Bar(3);" + } + } +} diff --git a/cli/tests/lsp/document_symbol_request.json b/cli/tests/lsp/document_symbol_request.json new file mode 100644 index 000000000..a31317fc3 --- /dev/null +++ b/cli/tests/lsp/document_symbol_request.json @@ -0,0 +1,10 @@ +{ + "jsonrpc": "2.0", + "id": 2, + "method": "textDocument/documentSymbol", + "params": { + "textDocument": { + "uri": "file:///a/file.ts" + } + } +} |