[ci] yarn format

This commit is contained in:
natemoo-re 2021-11-23 02:05:07 +00:00 committed by GitHub Actions
parent f165004c10
commit f45936074e
3 changed files with 14 additions and 14 deletions

View file

@ -1,4 +1,4 @@
import { VitePWA } from 'vite-plugin-pwa' import { VitePWA } from 'vite-plugin-pwa';
// Full Astro Configuration API Documentation: // Full Astro Configuration API Documentation:
// https://docs.astro.build/reference/configuration-reference // https://docs.astro.build/reference/configuration-reference
@ -11,6 +11,6 @@ import { VitePWA } from 'vite-plugin-pwa'
// @ts-check // @ts-check
export default /** @type {import('astro').AstroUserConfig} */ ({ export default /** @type {import('astro').AstroUserConfig} */ ({
vite: { vite: {
plugins: [VitePWA()] plugins: [VitePWA()],
} },
}); });

View file

@ -1,10 +1,10 @@
import { registerSW } from 'virtual:pwa-register' import { registerSW } from 'virtual:pwa-register';
const updateSW = registerSW({ const updateSW = registerSW({
onNeedRefresh() {}, onNeedRefresh() {},
onOfflineReady() { onOfflineReady() {
console.log("Offline ready"); console.log('Offline ready');
} },
}) });
updateSW(); updateSW();

View file

@ -1,11 +1,11 @@
declare module 'virtual:pwa-register' { declare module 'virtual:pwa-register' {
export type RegisterSWOptions = { export type RegisterSWOptions = {
immediate?: boolean immediate?: boolean;
onNeedRefresh?: () => void onNeedRefresh?: () => void;
onOfflineReady?: () => void onOfflineReady?: () => void;
onRegistered?: (registration: ServiceWorkerRegistration | undefined) => void onRegistered?: (registration: ServiceWorkerRegistration | undefined) => void;
onRegisterError?: (error: any) => void onRegisterError?: (error: any) => void;
} };
export function registerSW(options?: RegisterSWOptions): (reloadPage?: boolean) => Promise<void> export function registerSW(options?: RegisterSWOptions): (reloadPage?: boolean) => Promise<void>;
} }