Created
January 23, 2017 16:06
-
-
Save ktsn/bb0b2a127020c6240729d7f711c6b3cb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
type FnMapperR<T> = { | |
[K in keyof T]: (...args: any[]) => T[K] | |
} | |
type FnMapper2<T, U, R> = { | |
[K in keyof U]: (t: T, u: U[K]) => R | |
} | |
declare function module <S, G, A, M> (module: { | |
namespaced?: boolean, | |
state?: Class<S>, | |
getters?: FnMapperR<G>, | |
actions?: FnMapper2<ActionContext<S, G>, A, Promise<any> | void>, | |
mutations?: FnMapper2<S, M, void> | |
}): Module<S, G, A, M> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment