Commit c4782f1
committed
refactor(registerCommands): tighten command map value type
Replace the residual `any` in the command-callback map value with a
`CommandCallback` alias of `(...args: any[]) => unknown`. Mirrors
VS Code's own `commands.registerCommand` signature while narrowing
the return to `unknown` so callers must inspect before use.
Rest-args stay `any[]` intentionally: the callbacks in this map are
heterogeneous (`importSettings` takes an optional `filePath?: string`,
the rest take none), and VS Code dispatches positional args
dynamically — a single tight per-arity type would be lossy without
splitting the map.1 parent c4592be commit c4782f1
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
80 | 88 | | |
81 | 89 | | |
82 | 90 | | |
83 | 91 | | |
84 | | - | |
| 92 | + | |
85 | 93 | | |
86 | 94 | | |
87 | 95 | | |
| |||
0 commit comments