diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-02-02 21:27:58 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-02 21:27:58 +0000 |
commit | ae16884b950d26546f323810170b1f8a25dc0bc0 (patch) | |
tree | 2b51c5ea7f7cbda460ea08c535a2f56489295543 /editors/code/src/commands | |
parent | 5e61c9b11def1897c4123eeafb14b4d6a5223546 (diff) | |
parent | 2fd7af2a62ce0c8acb5daa6b2c179b638318f31a (diff) |
Merge #2989
2989: vscode extension: migrate from any to unknown where possible r=Veetaha a=Veetaha
`unknown` type is the stricter version of `any` and it should always be prefered (like `const` over `let`).
It lets you assign any value to it, but doesn't let you carry out arbitrary operations on them without an explicit type check (like `typeof unknownValue === 'string'`).
Co-authored-by: Veetaha <[email protected]>
Diffstat (limited to 'editors/code/src/commands')
-rw-r--r-- | editors/code/src/commands/syntax_tree.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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 | ||