Fix ts errors

This commit is contained in:
Jon Staab
2025-03-31 12:49:28 -07:00
parent cfd2e3aac7
commit 1524d128e3
27 changed files with 357 additions and 448 deletions
-22
View File
@@ -1,22 +0,0 @@
import type {Context} from "@welshman/lib"
/**
* A global context variable for configuring libraries and applications.
*
* In your application, you'll want to add something like the following to your types.d.ts:
* type MyContext = {
* x: number
* }
*
* declare module "@welshman/lib" {
* interface Context {
* net: MyContext
* }
* }
*/
export const ctx: Context = {}
/**
* Adds data to ctx.
*/
export const setContext = (newCtx: Context) => Object.assign(ctx, newCtx)
-5
View File
@@ -1,4 +1,3 @@
export * from "./Context.js"
export * from "./Deferred.js"
export * from "./Emitter.js"
export * from "./LRUCache.js"
@@ -6,7 +5,3 @@ export * from "./Tools.js"
export * from "./Worker.js"
export * from "./TaskQueue.js"
export {default as normalizeUrl} from "./normalize-url/index.js"
declare module "@welshman/lib" {
export interface Context {}
}