diff options
author | 2021-11-23 02:05:07 +0000 | |
---|---|---|
committer | 2021-11-23 02:05:07 +0000 | |
commit | f45936074e621b31203fb2942250b8a21a11173d (patch) | |
tree | 650ede446edb47a9fb70bec836aa4b771cb0aefc /examples/with-vite-plugin-pwa/src | |
parent | f165004c10448d0f0f0d09093a44c8e01475ea68 (diff) | |
download | astro-f45936074e621b31203fb2942250b8a21a11173d.tar.gz astro-f45936074e621b31203fb2942250b8a21a11173d.tar.zst astro-f45936074e621b31203fb2942250b8a21a11173d.zip |
[ci] yarn format
Diffstat (limited to 'examples/with-vite-plugin-pwa/src')
-rw-r--r-- | examples/with-vite-plugin-pwa/src/index.ts | 8 | ||||
-rw-r--r-- | examples/with-vite-plugin-pwa/src/vite-env.d.ts | 14 |
2 files changed, 11 insertions, 11 deletions
diff --git a/examples/with-vite-plugin-pwa/src/index.ts b/examples/with-vite-plugin-pwa/src/index.ts index af679697f..187159528 100644 --- a/examples/with-vite-plugin-pwa/src/index.ts +++ b/examples/with-vite-plugin-pwa/src/index.ts @@ -1,10 +1,10 @@ -import { registerSW } from 'virtual:pwa-register' +import { registerSW } from 'virtual:pwa-register'; const updateSW = registerSW({ onNeedRefresh() {}, onOfflineReady() { - console.log("Offline ready"); - } -}) + console.log('Offline ready'); + }, +}); updateSW(); diff --git a/examples/with-vite-plugin-pwa/src/vite-env.d.ts b/examples/with-vite-plugin-pwa/src/vite-env.d.ts index 6b2c10cd8..6b53adfef 100644 --- a/examples/with-vite-plugin-pwa/src/vite-env.d.ts +++ b/examples/with-vite-plugin-pwa/src/vite-env.d.ts @@ -1,11 +1,11 @@ declare module 'virtual:pwa-register' { export type RegisterSWOptions = { - immediate?: boolean - onNeedRefresh?: () => void - onOfflineReady?: () => void - onRegistered?: (registration: ServiceWorkerRegistration | undefined) => void - onRegisterError?: (error: any) => void - } + immediate?: boolean; + onNeedRefresh?: () => void; + onOfflineReady?: () => void; + onRegistered?: (registration: ServiceWorkerRegistration | undefined) => void; + onRegisterError?: (error: any) => void; + }; - export function registerSW(options?: RegisterSWOptions): (reloadPage?: boolean) => Promise<void> + export function registerSW(options?: RegisterSWOptions): (reloadPage?: boolean) => Promise<void>; } |