Skip to content

Instantly share code, notes, and snippets.

@dagda1
Created Nov 28, 2020
Embed
What would you like to do?
const setCount = (n: number) => {
return {
type: 'SET_COUNT',
payload: n
} as const;
}
const resetCount = () => {
return {
type: 'RESET_COUNT'
} as const;
}
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