location.ts 541 B

12345678910111213141516171819202122
  1. export interface LocationUpdate {
  2. path?: string;
  3. query?: UrlQueryMap;
  4. routeParams?: UrlQueryMap;
  5. partial?: boolean;
  6. /*
  7. * If true this will replace url state (ie cause no new browser history)
  8. */
  9. replace?: boolean;
  10. }
  11. export interface LocationState {
  12. url: string;
  13. path: string;
  14. query: UrlQueryMap;
  15. routeParams: UrlQueryMap;
  16. replace: boolean;
  17. lastUpdated: number;
  18. }
  19. export type UrlQueryValue = string | number | boolean | string[] | number[] | boolean[];
  20. export type UrlQueryMap = { [s: string]: UrlQueryValue };