Options
All
  • Public
  • Public/Protected
  • All
Menu

Module types

Index

Type aliases

ActionTypes

ActionTypes: keyof typeof Action

DeepPartial

DeepPartial<T>: {[ K in keyof T]: T[K] extends infer R[] ? DeepPartial<R>[] : DeepPartial<T[K]> }

Type parameters

  • T

DefaultStatusTypes

DefaultStatusTypes: keyof typeof DefaultStatus

Dispatch

Dispatch<S, U>: (state: S, status?: U) => S

Type parameters

  • S

  • U: string

Type declaration

    • (state: S, status?: U): S
    • Default dispactch type/interface.

      Parameters

      • state: S
      • Optional status: U

      Returns S

KeyOf

KeyOf<T>: Extract<keyof T, string>

Type parameters

  • T

Middleware

Middleware: <S, U>(store: IRestash<S, U>) => (next: Dispatch<S, U>) => (payload: any) => S

Type declaration

    • Interface/type for middlware.

      Type parameters

      • S

      • U: string

      Parameters

      Returns (next: Dispatch<S, U>) => (payload: any) => S

        • (next: Dispatch<S, U>): (payload: any) => S
        • Parameters

          Returns (payload: any) => S

            • (payload: any): S
            • Parameters

              • payload: any

              Returns S

MiddlewareDispatch

MiddlewareDispatch: <S, U>(state: S, status?: U) => S

Type declaration

    • <S, U>(state: S, status?: U): S
    • Intermediary type for middleware dispatch.

      Type parameters

      • S

      • U: string

      Parameters

      • state: S
      • Optional status: U

      Returns S

Path

Path<T>: ParsePathKey<T> extends string | keyof T ? ParsePathKey<T> : keyof T

Type parameters

  • T

PathValue

PathValue<T, P>: P extends `${infer Key}.${infer Rest}` ? Key extends keyof T ? Rest extends Path<T[Key]> ? PathValue<T[Key], Rest> : never : never : P extends keyof T ? T[P] : never

Type parameters

RestashHook

RestashHook<S, U, D>: [S, D, IRestash<S, U, D>]

The type/interface for the exposed Restash hook.

Type parameters

StatusBaseTypes

StatusBaseTypes: keyof typeof StatusBase

Generated using TypeDoc