Skip to content

Commit

Permalink
simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
Dosant committed Jul 15, 2020
1 parent 2407d49 commit c06d4f6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/plugins/ui_actions/public/actions/action.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@

import { createAction } from '../../../ui_actions/public';
import { ActionType } from '../types';
import { ActionExecutionContext } from './action';

const sayHelloAction = createAction({
// Casting to ActionType is a hack - in a real situation use
// declare module and add this id to ActionContextMapping.
type: 'test' as ActionType,
isCompatible: ({ amICompatible }: ActionExecutionContext<{ amICompatible: boolean }>) =>
Promise.resolve(amICompatible),
isCompatible: ({ amICompatible }: { amICompatible: boolean }) => Promise.resolve(amICompatible),
execute: () => Promise.resolve(),
});

Expand Down

0 comments on commit c06d4f6

Please sign in to comment.