diff --git a/package/src/index.ts b/package/src/index.ts index e0bbf24..36d765f 100644 --- a/package/src/index.ts +++ b/package/src/index.ts @@ -13,10 +13,12 @@ import type { AstroIntegration } from 'astro' const ASTROSW = '@ayco/astro-sw' /** + * TODO: update JSDoc * Accepts configuration options with service worker path * and injects needed variables such as `__assets` generated by Astro */ export default function serviceWorker( + // TODO handle options undefined options?: AstroServiceWorkerConfig ): AstroIntegration { const { @@ -29,7 +31,7 @@ export default function serviceWorker( logAssets = false, esbuild = {}, registrationHooks = {}, - } = options || {} + } = options ?? {} const { installing: installingFn = () => {},