Typescript actions defined as
interface Actions {
readonly separator: () => MenuItemConstructorOptions;
readonly learnSpelling: (options: ActionOptions) => MenuItemConstructorOptions;
readonly lookUpSelection: (options: ActionOptions) => MenuItemConstructorOptions;
readonly searchWithGoogle: (options: ActionOptions) => MenuItemConstructorOptions;
readonly cut: (options: ActionOptions) => MenuItemConstructorOptions;
readonly copy: (options: ActionOptions) => MenuItemConstructorOptions;
readonly paste: (options: ActionOptions) => MenuItemConstructorOptions;
readonly saveImage: (options: ActionOptions) => MenuItemConstructorOptions;
readonly saveImageAs: (options: ActionOptions) => MenuItemConstructorOptions;
readonly copyLink: (options: ActionOptions) => MenuItemConstructorOptions;
readonly copyImage: (options: ActionOptions) => MenuItemConstructorOptions;
readonly copyImageAddress: (options: ActionOptions) => MenuItemConstructorOptions;
readonly inspect: () => MenuItemConstructorOptions;
readonly services: () => MenuItemConstructorOptions;
}
But in fact, the options argument has a default value. All actions should be defiend as:
interface Actions {
readonly separator: () => MenuItemConstructorOptions;
readonly learnSpelling: (options?: ActionOptions) => MenuItemConstructorOptions;
readonly lookUpSelection: (options?: ActionOptions) => MenuItemConstructorOptions;
readonly searchWithGoogle: (options?: ActionOptions) => MenuItemConstructorOptions;
readonly cut: (options?: ActionOptions) => MenuItemConstructorOptions;
readonly copy: (options?: ActionOptions) => MenuItemConstructorOptions;
readonly paste: (options?: ActionOptions) => MenuItemConstructorOptions;
readonly saveImage: (options?: ActionOptions) => MenuItemConstructorOptions;
readonly saveImageAs: (options?: ActionOptions) => MenuItemConstructorOptions;
readonly copyLink: (options?: ActionOptions) => MenuItemConstructorOptions;
readonly copyImage: (options?: ActionOptions) => MenuItemConstructorOptions;
readonly copyImageAddress: (options?: ActionOptions) => MenuItemConstructorOptions;
readonly inspect: () => MenuItemConstructorOptions;
readonly services: () => MenuItemConstructorOptions;
}
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too