2020-11-17 21:38:42 +08:00
|
|
|
import { Command } from '../types'
|
|
|
|
|
2020-11-18 23:43:27 +08:00
|
|
|
/**
|
|
|
|
* Define a command inline.
|
|
|
|
*/
|
|
|
|
export const command = (fn: (props: Parameters<Command>[0]) => boolean): Command => props => {
|
2020-11-17 21:38:42 +08:00
|
|
|
return fn(props)
|
|
|
|
}
|