source: frontend/node_modules/workbox-core/src/skipWaiting.ts

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: 955 bytes
Line 
1/*
2 Copyright 2019 Google LLC
3
4 Use of this source code is governed by an MIT-style
5 license that can be found in the LICENSE file or at
6 https://opensource.org/licenses/MIT.
7*/
8
9import {logger} from './_private/logger.js';
10
11import './_version.js';
12
13// Give TypeScript the correct global.
14declare let self: ServiceWorkerGlobalScope;
15
16/**
17 * This method is deprecated, and will be removed in Workbox v7.
18 *
19 * Calling self.skipWaiting() is equivalent, and should be used instead.
20 *
21 * @memberof workbox-core
22 */
23function skipWaiting(): void {
24 // Just call self.skipWaiting() directly.
25 // See https://github.com/GoogleChrome/workbox/issues/2525
26 if (process.env.NODE_ENV !== 'production') {
27 logger.warn(
28 `skipWaiting() from workbox-core is no longer recommended ` +
29 `and will be removed in Workbox v7. Using self.skipWaiting() instead ` +
30 `is equivalent.`,
31 );
32 }
33
34 void self.skipWaiting();
35}
36
37export {skipWaiting};
Note: See TracBrowser for help on using the repository browser.