Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface LoaderOptions<T, T_JSON>

Type parameters

Hierarchy

  • LoaderOptions

Index

Properties

Optional expireTime

expireTime: undefined | number

the expiration time of this T_JSON

Optional force

force: undefined | false | true

whether this is a forced update. If true, request the data from remote with no regard to local data

Optional parse

parse: undefined | ((x: string | null) => T_JSON | null)

The parser that turns the string (or null if key does not exist) stored in local storage into T_JSON or null

Optional store

store: undefined | ((x: T) => T)

the function to store x in localStorage

Optional validator

validator: undefined | ((x: T_JSON | null) => x is T_JSON)

The validator that checks whether the return value of the parser is a valid T_JSON object

Generated using TypeDoc