less annoying JSDoc types
This commit is contained in:
parent
b366f3af8f
commit
38a715b3a2
4 changed files with 9 additions and 16 deletions
|
|
@ -3,7 +3,7 @@ import CSS from './css.js';
|
||||||
import JS from './js.js';
|
import JS from './js.js';
|
||||||
import setCookie from 'set-cookie-parser';
|
import setCookie from 'set-cookie-parser';
|
||||||
import { xor, base64, plain } from './codecs.js';
|
import { xor, base64, plain } from './codecs.js';
|
||||||
import mimeTypes from './mime.js';
|
import mimeTypes from 'mime-types';
|
||||||
import {
|
import {
|
||||||
validateCookie,
|
validateCookie,
|
||||||
db,
|
db,
|
||||||
|
|
|
||||||
5
src/uv.d.ts
vendored
Normal file
5
src/uv.d.ts
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
const Ultraviolet: typeof import('./rewrite/index').default;
|
||||||
|
const UVClient: typeof import('./client/index').default;
|
||||||
|
|
||||||
|
export type UltravioletCtor = typeof Ultraviolet;
|
||||||
|
export type UVClientCtor = typeof UVClient;
|
||||||
|
|
@ -1,18 +1,10 @@
|
||||||
/**
|
/**
|
||||||
* @typedef {import("./rewrite/index.js").default} Ultraviolet
|
* @type {import('./uv').UltravioletCtor}
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {import("./client/index.js").default} UVClient
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {typeof Ultraviolet}
|
|
||||||
*/
|
*/
|
||||||
const Ultraviolet = globalThis.Ultraviolet;
|
const Ultraviolet = globalThis.Ultraviolet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {typeof UVClient}
|
* @type {import('./uv').UVClientCtor}
|
||||||
*/
|
*/
|
||||||
const UVClient = globalThis.UVClient;
|
const UVClient = globalThis.UVClient;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,7 @@
|
||||||
// This is to allow us to produce a generic bundle with no hard-coded paths.
|
// This is to allow us to produce a generic bundle with no hard-coded paths.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {import("./rewrite/index.js").default} Ultraviolet
|
* @type {import('./uv').UltravioletCtor}
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {typeof Ultraviolet}
|
|
||||||
*/
|
*/
|
||||||
const Ultraviolet = globalThis.Ultraviolet;
|
const Ultraviolet = globalThis.Ultraviolet;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue