|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
1.1 KB
|
| Line | |
|---|
| 1 | import { RouteHandler, RouteMatchCallback } from 'workbox-core/types.js';
|
|---|
| 2 | import { Route } from './Route.js';
|
|---|
| 3 | import { HTTPMethod } from './utils/constants.js';
|
|---|
| 4 | import './_version.js';
|
|---|
| 5 | /**
|
|---|
| 6 | * Easily register a RegExp, string, or function with a caching
|
|---|
| 7 | * strategy to a singleton Router instance.
|
|---|
| 8 | *
|
|---|
| 9 | * This method will generate a Route for you if needed and
|
|---|
| 10 | * call {@link workbox-routing.Router#registerRoute}.
|
|---|
| 11 | *
|
|---|
| 12 | * @param {RegExp|string|workbox-routing.Route~matchCallback|workbox-routing.Route} capture
|
|---|
| 13 | * If the capture param is a `Route`, all other arguments will be ignored.
|
|---|
| 14 | * @param {workbox-routing~handlerCallback} [handler] A callback
|
|---|
| 15 | * function that returns a Promise resulting in a Response. This parameter
|
|---|
| 16 | * is required if `capture` is not a `Route` object.
|
|---|
| 17 | * @param {string} [method='GET'] The HTTP method to match the Route
|
|---|
| 18 | * against.
|
|---|
| 19 | * @return {workbox-routing.Route} The generated `Route`.
|
|---|
| 20 | *
|
|---|
| 21 | * @memberof workbox-routing
|
|---|
| 22 | */
|
|---|
| 23 | declare function registerRoute(capture: RegExp | string | RouteMatchCallback | Route, handler?: RouteHandler, method?: HTTPMethod): Route;
|
|---|
| 24 | export { registerRoute };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.