feat: fix imported typedef for JSdocs

This commit is contained in:
Ayo Ayco 2024-08-03 09:11:38 +02:00
parent f801e424a0
commit a1d8ba483b

View file

@ -1,26 +1,27 @@
import { AstroIntegration } from 'astro';
import { readFile, writeFile } from 'node:fs/promises';
import { fileURLToPath } from 'node:url';
import path from 'node:path';
import { randomUUID } from "node:crypto";
/**
* @type {Array<string>}
*/
let assets = [];
/**
* @typedef {{
* assetCachePrefix?: string,
* assetCacheVersionID?: string,
* path: string,
* }} ServiceWorkerConfig
* @typedef {import('astro').AstroIntegration} AstroIntegration
*/
/**
* @type {Array<string>}
*/
let assets = [];
const plugin_dir = path.resolve(path.dirname('.'));
/**
*
* Accepts configuration options with service worker path
* and injects needed variables such as `assets` generated by Astro
* @param {ServiceWorkerConfig} config
* @returns {AstroIntegration}
*/