Typescript
Configuration
1. Declare module
import { IConfig } from 'overmind'
const config = {}
declare module 'overmind' {
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface Config extends IConfig<{
state: typeof config.state,
actions: typeof config.actions,
effects: typeof config.effects
}> {}
// Due to circular typing we have to define an
// explicit typing of state, actions and effects since
// TS 3.9
}2. Explicit typing
State
Derived
Statemachine
Actions
Effects
Operators
Last updated