Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose Typescript types #13

Open
JMounier opened this issue Sep 21, 2021 · 0 comments
Open

expose Typescript types #13

JMounier opened this issue Sep 21, 2021 · 0 comments

Comments

@JMounier
Copy link

JMounier commented Sep 21, 2021

As @tanker/verification-ui (the only package depending on this project) is being migrated to typescript, exposing types would be a plus.

the following declaration should be enough:

declare module 'dumb-reducer' {
  export type Reducer = (state: Record<string, any>, payload: Record<string, any>) => Record<string, any>;
  export type SubReducers = Record<string, Reducer>;
  export function makeDumbReducer(prefix: string, initialState: Record<string, any> = {}, subReducers: SubReducers = {}): Reducer;
  export function prefixActions(prefix: string, actions: Record<string, any>): Record<string, any>; 
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant