Fix ts errors
This commit is contained in:
@@ -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)
|
||||
@@ -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 {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user