Skip to content

Commit

Permalink
JSDoc link cleanup (#2999)
Browse files Browse the repository at this point in the history
* JSDoc cleanup

* Remove module:

* More replacements
  • Loading branch information
jeffposnick committed Dec 14, 2021
1 parent 61d54d7 commit 48f53f7
Show file tree
Hide file tree
Showing 77 changed files with 215 additions and 216 deletions.
6 changes: 3 additions & 3 deletions packages/workbox-background-sync/src/BackgroundSyncPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ import './_version.js';
* A class implementing the `fetchDidFail` lifecycle callback. This makes it
* easier to add failed requests to a background sync Queue.
*
* @memberof module:workbox-background-sync
* @memberof workbox-background-sync
*/
class BackgroundSyncPlugin implements WorkboxPlugin {
private readonly _queue: Queue;

/**
* @param {string} name See the [Queue]{@link module:workbox-background-sync.Queue}
* @param {string} name See the {@link workbox-background-sync.Queue}
* documentation for parameter details.
* @param {Object} [options] See the
* [Queue]{@link module:workbox-background-sync.Queue} documentation for
* {@link workbox-background-sync.Queue} documentation for
* parameter details.
*/
constructor(name: string, options?: QueueOptions) {
Expand Down
2 changes: 1 addition & 1 deletion packages/workbox-background-sync/src/Queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const convertEntry = (
* later. All parts of the storing and replaying process are observable via
* callbacks.
*
* @memberof module:workbox-background-sync
* @memberof workbox-background-sync
*/
class Queue {
private readonly _name: string;
Expand Down
4 changes: 2 additions & 2 deletions packages/workbox-background-sync/src/lib/QueueStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export class QueueStore {
/**
* Returns all entries in the store matching the `queueName`.
*
* @param {Object} options See {@link module:workbox-background-sync.Queue~getAll}
* @param {Object} options See {@link workbox-background-sync.Queue~getAll}
* @return {Promise<Array<Object>>}
*/
async getAll(): Promise<QueueStoreEntry[]> {
Expand All @@ -140,7 +140,7 @@ export class QueueStore {
/**
* Returns the number of entries in the store matching the `queueName`.
*
* @param {Object} options See {@link module:workbox-background-sync.Queue~size}
* @param {Object} options See {@link workbox-background-sync.Queue~size}
* @return {Promise<number>}
*/
async size(): Promise<number> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function defaultPayloadGenerator(
* For efficiency's sake, the underlying response bodies are not compared;
* only specific response headers are checked.
*
* @memberof module:workbox-broadcast-update
* @memberof workbox-broadcast-update
*/
class BroadcastCacheUpdate {
private readonly _headersToCheck: string[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ import './_version.js';
* This plugin will automatically broadcast a message whenever a cached response
* is updated.
*
* @memberof module:workbox-broadcast-update
* @memberof workbox-broadcast-update
*/
class BroadcastUpdatePlugin implements WorkboxPlugin {
private readonly _broadcastUpdate: BroadcastCacheUpdate;

/**
* Construct a BroadcastCacheUpdate instance with the passed options and
* calls its [`notifyIfUpdated()`]{@link module:workbox-broadcast-update.BroadcastCacheUpdate~notifyIfUpdated}
* calls its {@link workbox-broadcast-update.BroadcastCacheUpdate~notifyIfUpdated}
* method whenever the plugin's `cacheDidUpdate` callback is invoked.
*
* @param {Object} [options]
Expand Down
2 changes: 1 addition & 1 deletion packages/workbox-broadcast-update/src/responsesAreSame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import './_version.js';
* @param {Array<string>} headersToCheck
* @return {boolean}
*
* @memberof module:workbox-broadcast-update
* @memberof workbox-broadcast-update
*/
const responsesAreSame = (
firstResponse: Response,
Expand Down
8 changes: 4 additions & 4 deletions packages/workbox-build/src/generate-sw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {writeSWUsingDefaultTemplate} from './lib/write-sw-using-default-template
* that will be created by the build process, relative to the current working
* directory. It must end in '.js'.
*
* @param {Array<module:workbox-build.ManifestEntry>} [config.additionalManifestEntries]
* @param {Array<workbox-build.ManifestEntry>} [config.additionalManifestEntries]
* A list of entries to be precached, in addition to any entries that are
* generated as part of the build configuration.
*
Expand Down Expand Up @@ -105,7 +105,7 @@ import {writeSWUsingDefaultTemplate} from './lib/write-sw-using-default-template
* worker. Keeping the runtime separate means that users will not have to
* re-download the Workbox code each time your top-level service worker changes.
*
* @param {Array<module:workbox-build.ManifestTransform>} [config.manifestTransforms] One or more
* @param {Array<workbox-build.ManifestTransform>} [config.manifestTransforms] One or more
* functions which will be applied sequentially against the generated manifest.
* If `modifyURLPrefix` or `dontCacheBustURLsMatching` are also specified, their
* corresponding transformations will be applied first.
Expand Down Expand Up @@ -168,7 +168,7 @@ import {writeSWUsingDefaultTemplate} from './lib/write-sw-using-default-template
* @param {Array<RuntimeCachingEntry>} [config.runtimeCaching]
*
* @param {boolean} [config.skipWaiting=false] Whether to add an
* unconditional call to [`skipWaiting()`]{@link module:workbox-core.skipWaiting}
* unconditional call to [`skipWaiting()`](https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#skip_the_waiting_phase)
* to the generated service worker. If `false`, then a `message` listener will
* be added instead, allowing you to conditionally call `skipWaiting()` by posting
* a message containing {type: 'SKIP_WAITING'}.
Expand All @@ -191,7 +191,7 @@ import {writeSWUsingDefaultTemplate} from './lib/write-sw-using-default-template
* `count` property contains the total number of precached entries. Any
* non-fatal warning messages will be returned via `warnings`.
*
* @memberof module:workbox-build
* @memberof workbox-build
*/
export async function generateSW(config: unknown): Promise<BuildResult> {
const options = validateGenerateSWOptions(config);
Expand Down
8 changes: 4 additions & 4 deletions packages/workbox-build/src/get-manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {validateGetManifestOptions} from './lib/validate-options';
* @param {string} config.globDirectory The local directory you wish to match
* `globPatterns` against. The path is relative to the current directory.
*
* @param {Array<module:workbox-build.ManifestEntry>} [config.additionalManifestEntries]
* @param {Array<workbox-build.ManifestEntry>} [config.additionalManifestEntries]
* A list of entries to be precached, in addition to any entries that are
* generated as part of the build configuration.
*
Expand Down Expand Up @@ -53,7 +53,7 @@ import {validateGetManifestOptions} from './lib/validate-options';
* definition of `strict` in the `glob`
* [documentation](https://github.com/isaacs/node-glob#options).
*
* @param {Array<module:workbox-build.ManifestTransform>} [config.manifestTransforms] One or more
* @param {Array<workbox-build.ManifestTransform>} [config.manifestTransforms] One or more
* functions which will be applied sequentially against the generated manifest.
* If `modifyURLPrefix` or `dontCacheBustURLsMatching` are also specified, their
* corresponding transformations will be applied first.
Expand All @@ -79,14 +79,14 @@ import {validateGetManifestOptions} from './lib/validate-options';
* version the URL. If used with a single string, it will be interpreted as
* unique versioning information that you've generated for a given URL.
*
* @return {Promise<{count: number, manifestEntries: Array<module:workbox-build.ManifestEntry>, size: number, warnings: Array<string>}>}
* @return {Promise<{count: number, manifestEntries: Array<workbox-build.ManifestEntry>, size: number, warnings: Array<string>}>}
* A promise that resolves once the precache manifest (available in the
* `manifestEntries` property) has been determined. The `size` property
* contains the aggregate size of all the precached entries, in bytes, and the
* `count` property contains the total number of precached entries. Any
* non-fatal warning messages will be returned via `warnings`.
*
* @memberof module:workbox-build
* @memberof workbox-build
*/
export async function getManifest(config: unknown): Promise<GetManifestResult> {
const options = validateGetManifestOptions(config);
Expand Down
6 changes: 3 additions & 3 deletions packages/workbox-build/src/inject-manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import {validateInjectManifestOptions} from './lib/validate-options';
* that will be read during the build process, relative to the current working
* directory.
*
* @param {Array<module:workbox-build.ManifestEntry>} [config.additionalManifestEntries]
* @param {Array<workbox-build.ManifestEntry>} [config.additionalManifestEntries]
* A list of entries to be precached, in addition to any entries that are
* generated as part of the build configuration.
*
Expand Down Expand Up @@ -82,7 +82,7 @@ import {validateInjectManifestOptions} from './lib/validate-options';
* find inside of the `swSrc` file. Once found, it will be replaced by the
* generated precache manifest.
*
* @param {Array<module:workbox-build.ManifestTransform>} [config.manifestTransforms] One or more
* @param {Array<workbox-build.ManifestTransform>} [config.manifestTransforms] One or more
* functions which will be applied sequentially against the generated manifest.
* If `modifyURLPrefix` or `dontCacheBustURLsMatching` are also specified, their
* corresponding transformations will be applied first.
Expand Down Expand Up @@ -115,7 +115,7 @@ import {validateInjectManifestOptions} from './lib/validate-options';
* `count` property contains the total number of precached entries. Any
* non-fatal warning messages will be returned via `warnings`.
*
* @memberof module:workbox-build
* @memberof workbox-build
*/
export async function injectManifest(config: unknown): Promise<BuildResult> {
const options = validateInjectManifestOptions(config);
Expand Down
6 changes: 3 additions & 3 deletions packages/workbox-build/src/lib/copy-workbox-libraries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ const BUILD_DIR = 'build';
* Workbox from its official CDN URL.
*
* This method is exposed for the benefit of developers using
* [injectManifest()]{@link module:workbox-build.injectManifest} who would
* [injectManifest()]{@link workbox-build.injectManifest} who would
* prefer not to use the CDN copies of Workbox. Developers using
* [generateSW()]{@link module:workbox-build.generateSW} don't need to
* [generateSW()]{@link workbox-build.generateSW} don't need to
* explicitly call this method.
*
* @param {string} destDirectory The path to the parent directory under which
* the new directory of libraries will be created.
* @return {Promise<string>} The name of the newly created directory.
*
* @alias module:workbox-build.copyWorkboxLibraries
* @alias workbox-build.copyWorkboxLibraries
*/
export async function copyWorkboxLibraries(
destDirectory: string,
Expand Down
8 changes: 4 additions & 4 deletions packages/workbox-build/src/lib/transform-manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {noRevisionForURLsMatchingTransform} from './no-revision-for-urls-matchin
/**
* A `ManifestTransform` function can be used to modify the modify the `url` or
* `revision` properties of some or all of the
* {@link module:workbox-build.ManifestEntry|ManifestEntries} in the manifest.
* {@link workbox-build.ManifestEntry|ManifestEntries} in the manifest.
*
* Deleting the `revision` property of an entry will cause
* the corresponding `url` to be precached without cache-busting parameters
Expand Down Expand Up @@ -59,15 +59,15 @@ import {noRevisionForURLsMatchingTransform} from './no-revision-for-urls-matchin
* };
*
* @callback ManifestTransform
* @param {Array<module:workbox-build.ManifestEntry>} manifestEntries The full
* @param {Array<workbox-build.ManifestEntry>} manifestEntries The full
* array of entries, prior to the current transformation.
* @param {Object} [compilation] When used in the webpack plugins, this param
* will be set to the current `compilation`.
* @return {Promise<module:workbox-build.ManifestTransformResult>}
* @return {Promise<workbox-build.ManifestTransformResult>}
* The array of entries with the transformation applied, and optionally, any
* warnings that should be reported back to the build tool.
*
* @memberof module:workbox-build
* @memberof workbox-build
*/

interface ManifestTransformResultWithWarnings {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface CacheableResponseOptions {
* [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
* to be considered cacheable.
*
* @memberof module:workbox-cacheable-response
* @memberof workbox-cacheable-response
*/
class CacheableResponse {
private readonly _statuses?: CacheableResponseOptions['statuses'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import './_version.js';
* easier to add in cacheability checks to requests made via Workbox's built-in
* strategies.
*
* @memberof module:workbox-cacheable-response
* @memberof workbox-cacheable-response
*/
class CacheableResponsePlugin implements WorkboxPlugin {
private readonly _cacheableResponse: CacheableResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import '../_version.js';
* Runs all of the callback functions, one at a time sequentially, in the order
* in which they were registered.
*
* @memberof module:workbox-core
* @memberof workbox-core
* @private
*/
async function executeQuotaErrorCallbacks(): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion packages/workbox-core/src/cacheNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import './_version.js';
* @return {Object} An object with `precache`, `runtime`, `prefix`, and
* `googleAnalytics` properties.
*
* @memberof module:workbox-core
* @memberof workbox-core
*/
const cacheNames = {
get googleAnalytics(): string {
Expand Down
2 changes: 1 addition & 1 deletion packages/workbox-core/src/clientsClaim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ declare let self: ServiceWorkerGlobalScope;
* Claim any currently available clients once the service worker
* becomes active. This is normally used in conjunction with `skipWaiting()`.
*
* @memberof module:workbox-core
* @memberof workbox-core
*/
function clientsClaim(): void {
self.addEventListener('activate', () => self.clients.claim());
Expand Down
2 changes: 1 addition & 1 deletion packages/workbox-core/src/copyResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import './_version.js';
*
* @param {Response} response
* @param {Function} modifier
* @memberof module:workbox-core
* @memberof workbox-core
*/
async function copyResponse(
response: Response,
Expand Down
2 changes: 1 addition & 1 deletion packages/workbox-core/src/registerQuotaErrorCallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import './_version.js';
* there's a quota error.
*
* @param {Function} callback
* @memberof module:workbox-core
* @memberof workbox-core
*/
// Can't change Function type
// eslint-disable-next-line @typescript-eslint/ban-types
Expand Down
2 changes: 1 addition & 1 deletion packages/workbox-core/src/setCacheNameDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import './_version.js';
* @param {Object} [details.googleAnalytics] The cache name to use for
* `workbox-google-analytics` caching.
*
* @memberof module:workbox-core
* @memberof workbox-core
*/
function setCacheNameDetails(details: PartialCacheNameDetails): void {
if (process.env.NODE_ENV !== 'production') {
Expand Down
2 changes: 1 addition & 1 deletion packages/workbox-core/src/skipWaiting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ declare let self: ServiceWorkerGlobalScope;
*
* Calling self.skipWaiting() is equivalent, and should be used instead.
*
* @memberof module:workbox-core
* @memberof workbox-core
*/
function skipWaiting(): void {
// Just call self.skipWaiting() directly.
Expand Down
2 changes: 1 addition & 1 deletion packages/workbox-expiration/src/CacheExpiration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface CacheExpirationConfig {
* limit on the number of responses stored in a
* [`Cache`](https://developer.mozilla.org/en-US/docs/Web/API/Cache).
*
* @memberof module:workbox-expiration
* @memberof workbox-expiration
*/
class CacheExpiration {
private _isRunning = false;
Expand Down
2 changes: 1 addition & 1 deletion packages/workbox-expiration/src/ExpirationPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export interface ExpirationPluginOptions {
* When using `maxEntries`, the entry least-recently requested will be removed
* from the cache first.
*
* @memberof module:workbox-expiration
* @memberof workbox-expiration
*/
class ExpirationPlugin implements WorkboxPlugin {
private readonly _config: ExpirationPluginOptions;
Expand Down
4 changes: 2 additions & 2 deletions packages/workbox-google-analytics/src/initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface GoogleAnalyticsInitializeOptions {
* `qt` param based on the current time, as well as applies any other
* user-defined hit modifications.
*
* @param {Object} config See {@link module:workbox-google-analytics.initialize}.
* @param {Object} config See {@link workbox-google-analytics.initialize}.
* @return {Function} The requestWillDequeue callback function.
*
* @private
Expand Down Expand Up @@ -205,7 +205,7 @@ const createGtmJsRoute = (cacheName: string) => {
* the hit. The function is invoked with the original hit's URLSearchParams
* object as its only argument.
*
* @memberof module:workbox-google-analytics
* @memberof workbox-google-analytics
*/
const initialize = (options: GoogleAnalyticsInitializeOptions = {}): void => {
const cacheName = cacheNames.getGoogleAnalyticsName(options.cacheName);
Expand Down
2 changes: 1 addition & 1 deletion packages/workbox-navigation-preload/src/disable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ declare let self: ServiceWorkerGlobalScope;
/**
* If the browser supports Navigation Preload, then this will disable it.
*
* @memberof module:workbox-navigation-preload
* @memberof workbox-navigation-preload
*/
function disable(): void {
if (isSupported()) {
Expand Down
2 changes: 1 addition & 1 deletion packages/workbox-navigation-preload/src/enable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ declare let self: ServiceWorkerGlobalScope;
* the value of the `Service-Worker-Navigation-Preload` header which will be
* sent to the server when making the navigation request.
*
* @memberof module:workbox-navigation-preload
* @memberof workbox-navigation-preload
*/
function enable(headerValue?: string): void {
if (isSupported()) {
Expand Down
2 changes: 1 addition & 1 deletion packages/workbox-navigation-preload/src/isSupported.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ declare let self: ServiceWorkerGlobalScope;
* @return {boolean} Whether or not the current browser supports enabling
* navigation preload.
*
* @memberof module:workbox-navigation-preload
* @memberof workbox-navigation-preload
*/
function isSupported(): boolean {
return Boolean(self.registration && self.registration.navigationPreload);
Expand Down

0 comments on commit 48f53f7

Please sign in to comment.