mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 19:44:25 +01:00
@@ -241,7 +241,7 @@ export abstract class EditorAction extends EditorCommand {
|
||||
|
||||
// --- Registration of commands and actions
|
||||
|
||||
export function registerLanguageCommand(id: string, handler: (accessor: ServicesAccessor, args: { [n: string]: any }) => any) {
|
||||
export function registerLanguageCommand<Args extends { [n: string]: any }>(id: string, handler: (accessor: ServicesAccessor, args: Args) => any) {
|
||||
CommandsRegistry.registerCommand(id, (accessor, args) => handler(accessor, args || {}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user