Skip to content

Instantly share code, notes, and snippets.

@coffee-cup
Created October 23, 2019 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coffee-cup/99cc106939d9f596074a2dbd752b376b to your computer and use it in GitHub Desktop.
Save coffee-cup/99cc106939d9f596074a2dbd752b376b to your computer and use it in GitHub Desktop.
// 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