feat: fix imported typedef for JSdocs
This commit is contained in:
parent
f801e424a0
commit
a1d8ba483b
1 changed files with 8 additions and 7 deletions
15
index.js
15
index.js
|
@ -1,26 +1,27 @@
|
||||||
import { AstroIntegration } from 'astro';
|
|
||||||
import { readFile, writeFile } from 'node:fs/promises';
|
import { readFile, writeFile } from 'node:fs/promises';
|
||||||
import { fileURLToPath } from 'node:url';
|
import { fileURLToPath } from 'node:url';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
import { randomUUID } from "node:crypto";
|
import { randomUUID } from "node:crypto";
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {Array<string>}
|
|
||||||
*/
|
|
||||||
let assets = [];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {{
|
* @typedef {{
|
||||||
* assetCachePrefix?: string,
|
* assetCachePrefix?: string,
|
||||||
* assetCacheVersionID?: string,
|
* assetCacheVersionID?: string,
|
||||||
* path: string,
|
* path: string,
|
||||||
* }} ServiceWorkerConfig
|
* }} ServiceWorkerConfig
|
||||||
|
* @typedef {import('astro').AstroIntegration} AstroIntegration
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {Array<string>}
|
||||||
|
*/
|
||||||
|
let assets = [];
|
||||||
|
|
||||||
const plugin_dir = path.resolve(path.dirname('.'));
|
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
|
* @param {ServiceWorkerConfig} config
|
||||||
* @returns {AstroIntegration}
|
* @returns {AstroIntegration}
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue