Skip to content

Commit

Permalink
Tweak TSDocs (#3078)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffposnick authored May 9, 2022
1 parent 5530e0b commit 0cc6975
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
26 changes: 23 additions & 3 deletions packages/workbox-build/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,23 @@ export interface BasePartial {
*/
maximumFileSizeToCacheInBytes?: number;
/**
* A mapping of prefixes that, if present in an entry in the precache
* manifest, will be replaced with the corresponding value. This can be used
* to, for example, remove or add a path prefix from a manifest entry if your
* An object mapping string prefixes to replacement string values. This can be
* used to, e.g., remove or add a path prefix from a manifest entry if your
* web hosting setup doesn't match your local filesystem setup. As an
* alternative with more flexibility, you can use the `manifestTransforms`
* option and provide a function that modifies the entries in the manifest
* using whatever logic you provide.
*
* Example usage:
*
* ```
* // Replace a '/dist/' prefix with '/', and also prepend
* // '/static' to every URL.
* modifyURLPrefix: {
* '/dist/': '/',
* '': '/static',
* }
* ```
*/
modifyURLPrefix?: {
[key: string]: string;
Expand Down Expand Up @@ -269,6 +279,11 @@ export interface GeneratePartial {
* [Single Page App](https://en.wikipedia.org/wiki/Single-page_application).
* If both `navigateFallbackDenylist` and `navigateFallbackAllowlist` are
* configured, the denylist takes precedent.
*
* *Note*: These RegExps may be evaluated against every destination URL during
* a navigation. Avoid using
* [complex RegExps](https://github.com/GoogleChrome/workbox/issues/3077),
* or else your users may see delays when navigating your site.
*/
navigateFallbackAllowlist?: Array<RegExp>;
/**
Expand All @@ -278,6 +293,11 @@ export interface GeneratePartial {
* [Single Page App](https://en.wikipedia.org/wiki/Single-page_application).
* If both `navigateFallbackDenylist` and `navigateFallbackAllowlist` are
* configured, the denylist takes precedence.
*
* *Note*: These RegExps may be evaluated against every destination URL during
* a navigation. Avoid using
* [complex RegExps](https://github.com/GoogleChrome/workbox/issues/3077),
* or else your users may see delays when navigating your site.
*/
navigateFallbackDenylist?: Array<RegExp>;
/**
Expand Down
5 changes: 5 additions & 0 deletions packages/workbox-routing/src/NavigationRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ class NavigationRoute extends Route {
* and [`search`]{@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/search}
* portions of the requested URL.
*
* *Note*: These RegExps may be evaluated against every destination URL during
* a navigation. Avoid using
* [complex RegExps](https://github.com/GoogleChrome/workbox/issues/3077),
* or else your users may see delays when navigating your site.
*
* @param {workbox-routing~handlerCallback} handler A callback
* function that returns a Promise resulting in a Response.
* @param {Object} options
Expand Down

0 comments on commit 0cc6975

Please sign in to comment.