diff options
-rw-r--r-- | editors/code/package-lock.json | 10 | ||||
-rw-r--r-- | editors/code/package.json | 2 | ||||
-rw-r--r-- | editors/code/src/client.ts | 2 | ||||
-rw-r--r-- | editors/code/src/color_theme.ts | 2 | ||||
-rw-r--r-- | editors/code/src/commands/syntax_tree.ts | 2 | ||||
-rw-r--r-- | editors/code/src/ctx.ts | 16 | ||||
-rw-r--r-- | editors/code/src/status_display.ts | 4 | ||||
-rw-r--r-- | editors/code/tsconfig.json | 2 |
8 files changed, 22 insertions, 18 deletions
diff --git a/editors/code/package-lock.json b/editors/code/package-lock.json index 02e17d184..4096255ac 100644 --- a/editors/code/package-lock.json +++ b/editors/code/package-lock.json | |||
@@ -51,13 +51,13 @@ | |||
51 | } | 51 | } |
52 | }, | 52 | }, |
53 | "@rollup/plugin-typescript": { | 53 | "@rollup/plugin-typescript": { |
54 | "version": "2.1.0", | 54 | "version": "3.0.0", |
55 | "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-2.1.0.tgz", | 55 | "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-3.0.0.tgz", |
56 | "integrity": "sha512-7lXKGY06aofrceVez/YnN2axttFdHSqlUBpCJ6ebzDfxwLDKMgSV5lD4ykBcdgE7aK3egxuLkD/HKyRB5L8Log==", | 56 | "integrity": "sha512-O6915Ril3+Q0B4P898PULAcPFZfPuatEB/4nox7bnK48ekGrmamMYhMB5tOqWjihEWrw4oz/NL+c+/kS3Fk95g==", |
57 | "dev": true, | 57 | "dev": true, |
58 | "requires": { | 58 | "requires": { |
59 | "@rollup/pluginutils": "^3.0.0", | 59 | "@rollup/pluginutils": "^3.0.1", |
60 | "resolve": "^1.13.1" | 60 | "resolve": "^1.14.1" |
61 | } | 61 | } |
62 | }, | 62 | }, |
63 | "@rollup/pluginutils": { | 63 | "@rollup/pluginutils": { |
diff --git a/editors/code/package.json b/editors/code/package.json index beb721210..e733ee2b4 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -32,7 +32,7 @@ | |||
32 | "devDependencies": { | 32 | "devDependencies": { |
33 | "@rollup/plugin-commonjs": "^11.0.1", | 33 | "@rollup/plugin-commonjs": "^11.0.1", |
34 | "@rollup/plugin-node-resolve": "^6.1.0", | 34 | "@rollup/plugin-node-resolve": "^6.1.0", |
35 | "@rollup/plugin-typescript": "^2.1.0", | 35 | "@rollup/plugin-typescript": "^3.0.0", |
36 | "@types/node": "^12.12.25", | 36 | "@types/node": "^12.12.25", |
37 | "@types/seedrandom": "^2.4.28", | 37 | "@types/seedrandom": "^2.4.28", |
38 | "@types/vscode": "^1.41.0", | 38 | "@types/vscode": "^1.41.0", |
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts index 15e1a0873..1778c4e9f 100644 --- a/editors/code/src/client.ts +++ b/editors/code/src/client.ts | |||
@@ -68,7 +68,7 @@ PATH=${process.env.PATH} | |||
68 | // This also requires considering our settings strategy, which is work which needs doing | 68 | // This also requires considering our settings strategy, which is work which needs doing |
69 | // @ts-ignore The tracer is private to vscode-languageclient, but we need access to it to not log publishDecorations requests | 69 | // @ts-ignore The tracer is private to vscode-languageclient, but we need access to it to not log publishDecorations requests |
70 | res._tracer = { | 70 | res._tracer = { |
71 | log: (messageOrDataObject: string | any, data?: string) => { | 71 | log: (messageOrDataObject: string | unknown, data?: string) => { |
72 | if (typeof messageOrDataObject === 'string') { | 72 | if (typeof messageOrDataObject === 'string') { |
73 | if ( | 73 | if ( |
74 | messageOrDataObject.includes( | 74 | messageOrDataObject.includes( |
diff --git a/editors/code/src/color_theme.ts b/editors/code/src/color_theme.ts index 71113d374..7e10c7f79 100644 --- a/editors/code/src/color_theme.ts +++ b/editors/code/src/color_theme.ts | |||
@@ -61,7 +61,7 @@ export class ColorTheme { | |||
61 | } | 61 | } |
62 | 62 | ||
63 | function loadThemeNamed(themeName: string): ColorTheme { | 63 | function loadThemeNamed(themeName: string): ColorTheme { |
64 | function isTheme(extension: vscode.Extension<any>): boolean { | 64 | function isTheme(extension: vscode.Extension<unknown>): boolean { |
65 | return ( | 65 | return ( |
66 | extension.extensionKind === vscode.ExtensionKind.UI && | 66 | extension.extensionKind === vscode.ExtensionKind.UI && |
67 | extension.packageJSON.contributes && | 67 | extension.packageJSON.contributes && |
diff --git a/editors/code/src/commands/syntax_tree.ts b/editors/code/src/commands/syntax_tree.ts index 02ea9f166..211f2251f 100644 --- a/editors/code/src/commands/syntax_tree.ts +++ b/editors/code/src/commands/syntax_tree.ts | |||
@@ -55,7 +55,7 @@ export function syntaxTree(ctx: Ctx): Cmd { | |||
55 | 55 | ||
56 | // We need to order this after LS updates, but there's no API for that. | 56 | // We need to order this after LS updates, but there's no API for that. |
57 | // Hence, good old setTimeout. | 57 | // Hence, good old setTimeout. |
58 | function afterLs(f: () => any) { | 58 | function afterLs(f: () => void) { |
59 | setTimeout(f, 10); | 59 | setTimeout(f, 10); |
60 | } | 60 | } |
61 | 61 | ||
diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts index 094566d09..05d21ae56 100644 --- a/editors/code/src/ctx.ts +++ b/editors/code/src/ctx.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import * as vscode from 'vscode'; | 1 | import * as vscode from 'vscode'; |
2 | import * as lc from 'vscode-languageclient'; | 2 | import * as lc from 'vscode-languageclient'; |
3 | |||
3 | import { Config } from './config'; | 4 | import { Config } from './config'; |
4 | import { createClient } from './client'; | 5 | import { createClient } from './client'; |
5 | 6 | ||
@@ -52,12 +53,12 @@ export class Ctx { | |||
52 | overrideCommand(name: string, factory: (ctx: Ctx) => Cmd) { | 53 | overrideCommand(name: string, factory: (ctx: Ctx) => Cmd) { |
53 | const defaultCmd = `default:${name}`; | 54 | const defaultCmd = `default:${name}`; |
54 | const override = factory(this); | 55 | const override = factory(this); |
55 | const original = (...args: any[]) => | 56 | const original = (...args: unknown[]) => |
56 | vscode.commands.executeCommand(defaultCmd, ...args); | 57 | vscode.commands.executeCommand(defaultCmd, ...args); |
57 | try { | 58 | try { |
58 | const d = vscode.commands.registerCommand( | 59 | const d = vscode.commands.registerCommand( |
59 | name, | 60 | name, |
60 | async (...args: any[]) => { | 61 | async (...args: unknown[]) => { |
61 | if (!(await override(...args))) { | 62 | if (!(await override(...args))) { |
62 | return await original(...args); | 63 | return await original(...args); |
63 | } | 64 | } |
@@ -73,11 +74,11 @@ export class Ctx { | |||
73 | } | 74 | } |
74 | } | 75 | } |
75 | 76 | ||
76 | get subscriptions(): { dispose(): any }[] { | 77 | get subscriptions(): Disposable[] { |
77 | return this.extCtx.subscriptions; | 78 | return this.extCtx.subscriptions; |
78 | } | 79 | } |
79 | 80 | ||
80 | pushCleanup(d: { dispose(): any }) { | 81 | pushCleanup(d: Disposable) { |
81 | this.extCtx.subscriptions.push(d); | 82 | this.extCtx.subscriptions.push(d); |
82 | } | 83 | } |
83 | 84 | ||
@@ -86,12 +87,15 @@ export class Ctx { | |||
86 | } | 87 | } |
87 | } | 88 | } |
88 | 89 | ||
89 | export type Cmd = (...args: any[]) => any; | 90 | export interface Disposable { |
91 | dispose(): void; | ||
92 | } | ||
93 | export type Cmd = (...args: any[]) => unknown; | ||
90 | 94 | ||
91 | export async function sendRequestWithRetry<R>( | 95 | export async function sendRequestWithRetry<R>( |
92 | client: lc.LanguageClient, | 96 | client: lc.LanguageClient, |
93 | method: string, | 97 | method: string, |
94 | param: any, | 98 | param: unknown, |
95 | token?: vscode.CancellationToken, | 99 | token?: vscode.CancellationToken, |
96 | ): Promise<R> { | 100 | ): Promise<R> { |
97 | for (const delay of [2, 4, 6, 8, 10, null]) { | 101 | for (const delay of [2, 4, 6, 8, 10, null]) { |
diff --git a/editors/code/src/status_display.ts b/editors/code/src/status_display.ts index 7345bc3f5..4317410c7 100644 --- a/editors/code/src/status_display.ts +++ b/editors/code/src/status_display.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import * as vscode from 'vscode'; | 1 | import * as vscode from 'vscode'; |
2 | 2 | ||
3 | import { WorkDoneProgress, WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd } from 'vscode-languageclient'; | 3 | import { WorkDoneProgress, WorkDoneProgressBegin, WorkDoneProgressReport, WorkDoneProgressEnd, Disposable } from 'vscode-languageclient'; |
4 | 4 | ||
5 | import { Ctx } from './ctx'; | 5 | import { Ctx } from './ctx'; |
6 | 6 | ||
@@ -14,7 +14,7 @@ export function activateStatusDisplay(ctx: Ctx) { | |||
14 | }); | 14 | }); |
15 | } | 15 | } |
16 | 16 | ||
17 | class StatusDisplay implements vscode.Disposable { | 17 | class StatusDisplay implements vscode.Disposable, Disposable { |
18 | packageName?: string; | 18 | packageName?: string; |
19 | 19 | ||
20 | private i: number = 0; | 20 | private i: number = 0; |
diff --git a/editors/code/tsconfig.json b/editors/code/tsconfig.json index 1e17e4510..1740abb2e 100644 --- a/editors/code/tsconfig.json +++ b/editors/code/tsconfig.json | |||
@@ -1,6 +1,6 @@ | |||
1 | { | 1 | { |
2 | "compilerOptions": { | 2 | "compilerOptions": { |
3 | "module": "commonjs", | 3 | "module": "es2015", |
4 | "target": "es2018", | 4 | "target": "es2018", |
5 | "outDir": "out", | 5 | "outDir": "out", |
6 | "lib": [ | 6 | "lib": [ |