Skip to content

Instantly share code, notes, and snippets.



Created Dec 9, 2020
What would you like to do?
// actions/index.ts
import * as name from './actions/name';
// other action imports ...
export interface Action {
name: string;
canPerform(): boolean;
perform(): void;
const ACTIONS: Action[] = [
// other actions...
export function calculateActions(): Action[] {
return ACTIONS.filter((action) => action.canPerform());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment