UNPKG

next-compose-middleware

Version:

`next-compose-middleware` is a library that simplifies building complex, declarative middleware for Next.js applications. It allows you to create highly readable and maintainable middleware by composing multiple functions together.

26 lines (25 loc) 558 B
declare type State = { path: string[]; brokenOnce: boolean; brokenAll: boolean; }; declare type Action = { type: 'setPath'; payload: string[]; } | { type: 'breakOnce'; } | { type: 'breakAll'; } | { type: 'reset'; }; export declare const reducer: (state: State | undefined, action: Action) => State; export declare type Store = { getState: () => State; dispatch: (action: Action) => Action; }; export declare const createStore: () => { getState: () => State; dispatch: (action: Action) => Action; }; export {};