Skip to content

Define commands on-the-fly without creating a class #3026

Answered by nth-commit
moodmosaic asked this question in Q&A
Discussion options

You must be logged in to vote

Can confirm, I use commands without a class:

type Command = fc.AsyncCommand<Model, Real>

const createCommand = (): Command => ({
  check: (m) => true,
  // ... etc.
})

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@dubzzz
Comment options

Comment options

You must be logged in to vote
4 replies
@moodmosaic
Comment options

@moodmosaic
Comment options

@nth-commit
Comment options

@nth-commit
Comment options

Answer selected by moodmosaic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants