Skip to content

Commit

Permalink
Rename ID => identity
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmaeder committed Feb 1, 2023
1 parent a85241b commit 135e389
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/plugin-ext/src/plugin/known-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export namespace KnownCommands {
};

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const ID = (args: any[]) => args;
const identity = (args: any[]) => args;

mappings['editor.action.select.all'] = ['editor.action.select.all', CONVERT_VSCODE_TO_MONACO];
mappings['editor.action.toggleHighContrast'] = ['editor.action.toggleHighContrast', CONVERT_VSCODE_TO_MONACO];
Expand Down Expand Up @@ -308,15 +308,15 @@ export namespace KnownCommands {
mappings['vscode.diff'] = ['vscode.diff', CONVERT_VSCODE_TO_MONACO];

// terminal commands
mappings['workbench.action.terminal.new'] = ['terminal:new', ID];
mappings['workbench.action.terminal.newWithProfile'] = ['terminal:new:profile', ID];
mappings['workbench.action.terminal.selectDefaultShell'] = ['terminal:profile:default', ID];
mappings['workbench.action.terminal.newInActiveWorkspace'] = ['terminal:new:active:workspace', ID];
mappings['workbench.action.terminal.clear'] = ['terminal:clear', ID];
mappings['workbench.action.terminal.new'] = ['terminal:new', identity];
mappings['workbench.action.terminal.newWithProfile'] = ['terminal:new:profile', identity];
mappings['workbench.action.terminal.selectDefaultShell'] = ['terminal:profile:default', identity];
mappings['workbench.action.terminal.newInActiveWorkspace'] = ['terminal:new:active:workspace', identity];
mappings['workbench.action.terminal.clear'] = ['terminal:clear', identity];
mappings['openInTerminal'] = ['terminal:context', createConversionFunction((uri: URI) => new TheiaURI(uri))];
mappings['workbench.action.terminal.split'] = ['terminal:split', ID];
mappings['workbench.action.terminal.focusFind'] = ['terminal:find', ID];
mappings['workbench.action.terminal.hideFind'] = ['terminal:find:cancel', ID];
mappings['workbench.action.terminal.split'] = ['terminal:split', identity];
mappings['workbench.action.terminal.focusFind'] = ['terminal:find', identity];
mappings['workbench.action.terminal.hideFind'] = ['terminal:find:cancel', identity];

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function map<T>(id: string, args: any[] | undefined, toDo: (mappedId: string, mappedArgs: any[] | undefined, mappedResult: ConversionFunction | undefined) => T): T {
Expand Down

0 comments on commit 135e389

Please sign in to comment.