Skip to content

Instantly share code, notes, and snippets.

@dagda1
Created November 28, 2020 22:14
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 dagda1/f6b5503411ea04e32109035a746fa1ca to your computer and use it in GitHub Desktop.
Save dagda1/f6b5503411ea04e32109035a746fa1ca to your computer and use it in GitHub Desktop.
const
const setCount = (n: number) => {
return <const>{
type: 'SET_COUNT',
payload: n
}
}
const resetCount = () => {
return <const>{
type: 'RESET_COUNT'
}
}
type CountActions = ReturnType<typeof setCount> | ReturnType<typeof resetCount>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment