a zip code crypto-currency system good for red ONLY

index.d.ts 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. declare module 'sw-toolbox' {
  2. type URLPattern = string | RegExp
  3. type PrecacheURL = Request | string
  4. type PrecacheURLs = Promise<PrecacheURL[]> | PrecacheURL[]
  5. interface Request {
  6. }
  7. interface Response {
  8. }
  9. export interface CacheOptions {
  10. name: string
  11. maxEntries: number
  12. maxAgeSeconds: number
  13. }
  14. export interface Options {
  15. debug: boolean
  16. networkTimeoutSeconds: number
  17. cache: CacheOptions
  18. }
  19. export interface Handler {
  20. (request: Request): Promise<Response>
  21. }
  22. export interface Router {
  23. any(urlPattern: URLPattern, handler: Handler, options?: Options): void
  24. default(handler: Handler, options?: Options): void
  25. delete(urlPattern: URLPattern, handler: Handler, options?: Options): void
  26. get(urlPattern: URLPattern, handler: Handler, options?: Options): void
  27. head(urlPattern: URLPattern, handler: Handler, options?: Options): void
  28. post(urlPattern: URLPattern, handler: Handler, options?: Options): void
  29. put(urlPattern: URLPattern, handler: Handler, options?: Options): void
  30. }
  31. export const cacheFirst: Handler
  32. export const cacheOnly: Handler
  33. export const fastest: Handler
  34. export const networkFirst: Handler
  35. export const networkOnly: Handler
  36. export const options: Options
  37. export const router: Router
  38. export function cache(url: string, options: Options): void
  39. export function precache(urls: PrecacheURLs): void
  40. export function uncache(url: string): Promise<void>
  41. }