diff --git a/src/handler/dependencies/lifetimeFunctions.ts b/src/handler/dependencies/lifetimeFunctions.ts index a61087c..d505ef6 100644 --- a/src/handler/dependencies/lifetimeFunctions.ts +++ b/src/handler/dependencies/lifetimeFunctions.ts @@ -22,6 +22,7 @@ export function single(cb: T): () => T; */ export function single unknown>(cb: T): T; /** + * @__PURE__ * Please note that on intellij, the deprecation is for all signatures, which is unintended behavior (and * very annoying). * For future versions, ensure that single is being passed as a **callback!!** @@ -39,6 +40,7 @@ export function single(cb: T) { export function transient(cb: T): () => () => T; export function transient () => unknown>(cb: T): T; /** + * @__PURE__ * Following iti's singleton and transient implementation, * use transient if you want a new dependency every time your container getter is called * @param cb @@ -49,6 +51,7 @@ export function transient(cb: (() => () => T) | T) { } /** + * @__PURE__ * @deprecated * @param value * Please use the transient function instead diff --git a/src/handler/utilities/functions.ts b/src/handler/utilities/functions.ts index fbee0b1..ac22856 100644 --- a/src/handler/utilities/functions.ts +++ b/src/handler/utilities/functions.ts @@ -5,6 +5,7 @@ import { Err, Ok } from 'ts-results-es'; * A function that returns whatever value is provided. * Warning: this evaluates { @param value }. It does not defer a value. * @param value + * @__PURE__ */ // prettier-ignore export const _const = (value: T) => () => value; diff --git a/tsup.config.js b/tsup.config.js index 2ab83ce..cf9e02f 100644 --- a/tsup.config.js +++ b/tsup.config.js @@ -13,7 +13,6 @@ export default defineConfig([ target: 'node16', tsconfig: './tsconfig-esm.json', outDir: './dist/esm', - external: ['discord.js'], treeshake: true, outExtension() { return { @@ -25,7 +24,6 @@ export default defineConfig([ { format: 'cjs', splitting: false, - external: ['discord.js'], target: 'node16', tsconfig: './tsconfig-cjs.json', outDir: './dist/cjs',