Created
December 9, 2020 19:26
-
-
Save skovy/7469569ec87aa66036533f8c41fd2447 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// actions/index.ts | |
import * as name from './actions/name'; | |
// other action imports ... | |
export interface Action { | |
name: string; | |
canPerform(): boolean; | |
perform(): void; | |
} | |
const ACTIONS: Action[] = [ | |
name, | |
// 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
Console.long("bonjour");