Created
October 23, 2019 12:45
-
-
Save coffee-cup/99cc106939d9f596074a2dbd752b376b 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
// src/overmind/index.ts | |
import { IConfig } from 'overmind' | |
const config = { | |
state: { | |
count: 0 | |
}, | |
actions: { | |
increaseCount({ state }) { | |
state.count++; | |
}, | |
decreaseCount({ state }) { | |
state.count--; | |
} | |
} | |
}; | |
declare module 'overmind' { | |
// tslint:disable:interface-name | |
interface Config extends IConfig<typeof config> {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment