hieunc229/copilot-clone

Error on Capitain Slack

dsaub opened this issue · 1 comments

dsaub commented

Just Running on vs code Insider on Windows 11, node.js 17 installed:

`src/config.ts:19:27 - error TS2339: Property 'workspace' does not exist on type 'typeof import("vscode")'.

19     const config = vscode.workspace.getConfiguration("captainStack");
                             ~~~~~~~~~

src/extension.ts:6:36 - error TS2694: Namespace '"vscode"' has no exported member 'ExtensionContext'.

6 export function activate(_: vscode.ExtensionContext) {
                                     ~~~~~~~~~~~~~~~~

src/extension.ts:10:38 - error TS2339: Property 'getText' does not exist on type 'TextDocument'.

10    const textBeforeCursor = document.getText(
                                        ~~~~~~~

src/extension.ts:11:16 - error TS2339: Property 'Range' does not exist on type 'typeof import("vscode")'.

11     new vscode.Range(position.with(undefined, 0), position)
                  ~~~~~

src/extension.ts:23:20 - error TS2339: Property 'showErrorMessage' does not exist on type 'typeof window'.

23      vscode.window.showErrorMessage(err.toString());
                      ~~~~~~~~~~~~~~~~

src/extension.ts:23:37 - error TS2571: Object is of type 'unknown'.

23      vscode.window.showErrorMessage(err.toString());
                                       ~~~

src/extension.ts:35:25 - error TS2339: Property 'Range' does not exist on type 'typeof import("vscode")'.

35       range: new vscode.Range(position.translate(0, output.length), position)
                           ~~~~~

src/utils/extractors/ExtractorGithubGist.ts:20:29 - error TS2345: Argument of type 'string | null | undefined' is not assignable to parameter of type 'string'.
  Type 'undefined' is not assignable to type 'string'.

20             votes: parseInt(doc.querySelector(".social-count")?.textContent),
                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/utils/search.ts:43:39 - error TS2339: Property 'setStatusBarMessage' does not exist on type 'typeof window'.

43                         vscode.window.setStatusBarMessage(`${extractor.name} (${y}/${urls.length}): ${results.length} results`, 2000);
                                         ~~~~~~~~~~~~~~~~~~~

src/utils/search.ts:64:23 - error TS2339: Property 'setStatusBarMessage' does not exist on type 'typeof window'.

64         vscode.window.setStatusBarMessage(`CaptainStack: Finished loading ${results.length} results`);
                         ~~~~~~~~~~~~~~~~~~~

src/utils/search.ts:67:19 - error TS2339: Property 'setStatusBarMessage' does not exist on type 'typeof window'.

67     vscode.window.setStatusBarMessage(`CaptainStack: Start loading snippet results...`, promise);
                     ~~~~~~~~~~~~~~~~~~~

[11:28:56] Found 11 errors. Watching for file changes.`

Duplicate of #48