File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
extensions/ql-vscode/src/common/vscode Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -40,13 +40,15 @@ export function createVSCodeCommandManager<
4040 * @param logger The logger to use for error reporting.
4141 * @param telemetry The telemetry listener to use for error reporting.
4242 */
43- export function registerCommandWithErrorHandling < S extends unknown [ ] , T > (
43+ export function registerCommandWithErrorHandling <
44+ T extends ( ...args : unknown [ ] ) => Promise < unknown > ,
45+ > (
4446 commandId : string ,
45- task : ( ... args : S ) => Promise < T > ,
47+ task : T ,
4648 logger : NotificationLogger = extLogger ,
4749 telemetry : AppTelemetry | undefined = telemetryListener ,
4850) : Disposable {
49- return commands . registerCommand ( commandId , async ( ...args : S ) => {
51+ return commands . registerCommand ( commandId , async ( ...args : Parameters < T > ) => {
5052 const startTime = Date . now ( ) ;
5153 let error : Error | undefined ;
5254
You can’t perform that action at this time.
0 commit comments