@synstack/resolved 1.0.6 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/callable/callable.index.cjs.map +1 -1
- package/dist/callable/callable.index.js.map +1 -1
- package/dist/resolved.index.cjs.map +1 -1
- package/dist/resolved.index.js.map +1 -1
- package/package.json +7 -9
- package/src/callable/callable.bundle.ts +1 -1
- package/src/callable/callable.default.ts +1 -1
- package/src/callable/callable.index.ts +4 -4
- package/src/callable/callable.lib.ts +1 -1
- package/src/resolved.bundle.ts +1 -1
- package/src/resolved.index.ts +3 -3
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/callable/callable.index.ts","../../src/callable/callable.bundle.ts","../../src/callable/callable.lib.ts"],"sourcesContent":["export * as callable from \"./callable.bundle\";\nexport { default } from \"./callable.default\";\nexport { resolveNested } from \"./callable.lib\";\nexport type { Callable, CallableResolvable } from \"./callable.lib\";\n","export { resolveNested } from \"./callable.lib\";\n","import { Resolvable } from \"../resolvable.lib\";\n\nexport type Callable<T> = T | (() => T);\nexport declare namespace Callable {\n export type Infer<T> = T extends () => infer U ? U : T;\n export type IsPromise<T> = T extends () => infer U\n ? Resolvable.IsPromise<U>\n : Resolvable.IsPromise<T>;\n}\n\nexport type CallableResolvable<T> = Callable<Resolvable<T>>;\n\nexport declare namespace CallableResolvable {\n export type Infer<T> = Resolvable.Infer<Callable.Infer<T>>;\n\n export type IsPromise<T> = Resolvable.IsPromise<Callable.Infer<T>>;\n\n export type Return<T> =\n true extends IsPromise<T> ? Promise<Infer<T>> : Infer<T>;\n\n export type MaybeArray<T> =\n | CallableResolvable<T>\n | Array<CallableResolvable<T>>;\n\n export namespace MaybeArray {\n export type InferExact<T> = T extends readonly any[]\n ? { [K in keyof T]: CallableResolvable.Infer<T[K]> }\n : CallableResolvable.Infer<T>;\n export type Infer<T> = T extends readonly any[]\n ? Array<{ [K in keyof T]: CallableResolvable.Infer<T[K]> }[number]>\n : CallableResolvable.Infer<T>;\n export type IsPromise<T> = T extends readonly any[]\n ? { [K in keyof T]: CallableResolvable.IsPromise<T[K]> }[number]\n : CallableResolvable.IsPromise<T>;\n export type Return<T> =\n true extends IsPromise<T> ? Promise<Infer<T>> : Infer<T>;\n\n export type ArrayOf<T> = Array<MaybeArray<T>>;\n export namespace ArrayOf {\n export type InferExact<T extends readonly any[]> = {\n [K in keyof T]: MaybeArray.InferExact<T[K]>;\n };\n export type Infer<T extends readonly any[]> = Array<\n {\n [K in keyof T]: MaybeArray.Infer<T[K]>;\n }[number]\n >;\n export type IsPromise<T extends readonly any[]> = {\n [K in keyof T]: MaybeArray.IsPromise<T[K]>;\n }[number];\n export type Return<T extends readonly any[]> =\n true extends IsPromise<T> ? Promise<Infer<T>> : Infer<T>;\n }\n }\n}\n\nexport const resolveNested = <T extends readonly any[]>(\n args: T,\n): CallableResolvable.MaybeArray.ArrayOf.Return<T> => {\n // @ts-expect-error - Fix later\n if (args.length === 0) return [];\n\n const unresolvedValues = args.map((v) => {\n if (typeof v === \"function\") return v();\n if (Array.isArray(v))\n return v.map((sv) => (typeof sv === \"function\" ? sv() : sv));\n return v;\n });\n\n const isPromise = unresolvedValues.some((v) => {\n if (v instanceof Promise) return true;\n if (Array.isArray(v)) return v.some((v) => v instanceof Promise);\n return false;\n });\n\n // @ts-expect-error - We know that the values is not a promise\n if (!isPromise) return unresolvedValues;\n\n // @ts-expect-error - We know that the values is a promise\n return Promise.all(\n unresolvedValues.map((v) => (Array.isArray(v) ? Promise.all(v) : v)),\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;;;ACwDO,IAAM,gBAAgB,CAC3B,SACoD;AAEpD,MAAI,KAAK,WAAW,EAAG,QAAO,CAAC;AAE/B,QAAM,mBAAmB,KAAK,IAAI,CAAC,MAAM;AACvC,QAAI,OAAO,MAAM,WAAY,QAAO,EAAE;AACtC,QAAI,MAAM,QAAQ,CAAC;AACjB,aAAO,EAAE,IAAI,CAAC,OAAQ,OAAO,OAAO,aAAa,GAAG,IAAI,EAAG;AAC7D,WAAO;AAAA,EACT,CAAC;AAED,QAAM,YAAY,iBAAiB,KAAK,CAAC,MAAM;AAC7C,QAAI,aAAa,QAAS,QAAO;AACjC,QAAI,MAAM,QAAQ,CAAC,EAAG,QAAO,EAAE,KAAK,CAACA,OAAMA,cAAa,OAAO;AAC/D,WAAO;AAAA,EACT,CAAC;AAGD,MAAI,CAAC,UAAW,QAAO;AAGvB,SAAO,QAAQ;AAAA,IACb,iBAAiB,IAAI,CAAC,MAAO,MAAM,QAAQ,CAAC,IAAI,QAAQ,IAAI,CAAC,IAAI,CAAE;AAAA,EACrE;AACF;","names":["v"]}
|
1
|
+
{"version":3,"sources":["../../src/callable/callable.index.ts","../../src/callable/callable.bundle.ts","../../src/callable/callable.lib.ts"],"sourcesContent":["export * as callable from \"./callable.bundle.ts\";\nexport { default } from \"./callable.default.ts\";\nexport { resolveNested } from \"./callable.lib.ts\";\nexport type { Callable, CallableResolvable } from \"./callable.lib.ts\";\n","export { resolveNested } from \"./callable.lib.ts\";\n","import { type Resolvable } from \"../resolvable.lib.ts\";\n\nexport type Callable<T> = T | (() => T);\nexport declare namespace Callable {\n export type Infer<T> = T extends () => infer U ? U : T;\n export type IsPromise<T> = T extends () => infer U\n ? Resolvable.IsPromise<U>\n : Resolvable.IsPromise<T>;\n}\n\nexport type CallableResolvable<T> = Callable<Resolvable<T>>;\n\nexport declare namespace CallableResolvable {\n export type Infer<T> = Resolvable.Infer<Callable.Infer<T>>;\n\n export type IsPromise<T> = Resolvable.IsPromise<Callable.Infer<T>>;\n\n export type Return<T> =\n true extends IsPromise<T> ? Promise<Infer<T>> : Infer<T>;\n\n export type MaybeArray<T> =\n | CallableResolvable<T>\n | Array<CallableResolvable<T>>;\n\n export namespace MaybeArray {\n export type InferExact<T> = T extends readonly any[]\n ? { [K in keyof T]: CallableResolvable.Infer<T[K]> }\n : CallableResolvable.Infer<T>;\n export type Infer<T> = T extends readonly any[]\n ? Array<{ [K in keyof T]: CallableResolvable.Infer<T[K]> }[number]>\n : CallableResolvable.Infer<T>;\n export type IsPromise<T> = T extends readonly any[]\n ? { [K in keyof T]: CallableResolvable.IsPromise<T[K]> }[number]\n : CallableResolvable.IsPromise<T>;\n export type Return<T> =\n true extends IsPromise<T> ? Promise<Infer<T>> : Infer<T>;\n\n export type ArrayOf<T> = Array<MaybeArray<T>>;\n export namespace ArrayOf {\n export type InferExact<T extends readonly any[]> = {\n [K in keyof T]: MaybeArray.InferExact<T[K]>;\n };\n export type Infer<T extends readonly any[]> = Array<\n {\n [K in keyof T]: MaybeArray.Infer<T[K]>;\n }[number]\n >;\n export type IsPromise<T extends readonly any[]> = {\n [K in keyof T]: MaybeArray.IsPromise<T[K]>;\n }[number];\n export type Return<T extends readonly any[]> =\n true extends IsPromise<T> ? Promise<Infer<T>> : Infer<T>;\n }\n }\n}\n\nexport const resolveNested = <T extends readonly any[]>(\n args: T,\n): CallableResolvable.MaybeArray.ArrayOf.Return<T> => {\n // @ts-expect-error - Fix later\n if (args.length === 0) return [];\n\n const unresolvedValues = args.map((v) => {\n if (typeof v === \"function\") return v();\n if (Array.isArray(v))\n return v.map((sv) => (typeof sv === \"function\" ? sv() : sv));\n return v;\n });\n\n const isPromise = unresolvedValues.some((v) => {\n if (v instanceof Promise) return true;\n if (Array.isArray(v)) return v.some((v) => v instanceof Promise);\n return false;\n });\n\n // @ts-expect-error - We know that the values is not a promise\n if (!isPromise) return unresolvedValues;\n\n // @ts-expect-error - We know that the values is a promise\n return Promise.all(\n unresolvedValues.map((v) => (Array.isArray(v) ? Promise.all(v) : v)),\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;;;ACwDO,IAAM,gBAAgB,CAC3B,SACoD;AAEpD,MAAI,KAAK,WAAW,EAAG,QAAO,CAAC;AAE/B,QAAM,mBAAmB,KAAK,IAAI,CAAC,MAAM;AACvC,QAAI,OAAO,MAAM,WAAY,QAAO,EAAE;AACtC,QAAI,MAAM,QAAQ,CAAC;AACjB,aAAO,EAAE,IAAI,CAAC,OAAQ,OAAO,OAAO,aAAa,GAAG,IAAI,EAAG;AAC7D,WAAO;AAAA,EACT,CAAC;AAED,QAAM,YAAY,iBAAiB,KAAK,CAAC,MAAM;AAC7C,QAAI,aAAa,QAAS,QAAO;AACjC,QAAI,MAAM,QAAQ,CAAC,EAAG,QAAO,EAAE,KAAK,CAACA,OAAMA,cAAa,OAAO;AAC/D,WAAO;AAAA,EACT,CAAC;AAGD,MAAI,CAAC,UAAW,QAAO;AAGvB,SAAO,QAAQ;AAAA,IACb,iBAAiB,IAAI,CAAC,MAAO,MAAM,QAAQ,CAAC,IAAI,QAAQ,IAAI,CAAC,IAAI,CAAE;AAAA,EACrE;AACF;","names":["v"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/callable/callable.bundle.ts","../../src/callable/callable.lib.ts"],"sourcesContent":["export { resolveNested } from \"./callable.lib\";\n","import { Resolvable } from \"../resolvable.lib\";\n\nexport type Callable<T> = T | (() => T);\nexport declare namespace Callable {\n export type Infer<T> = T extends () => infer U ? U : T;\n export type IsPromise<T> = T extends () => infer U\n ? Resolvable.IsPromise<U>\n : Resolvable.IsPromise<T>;\n}\n\nexport type CallableResolvable<T> = Callable<Resolvable<T>>;\n\nexport declare namespace CallableResolvable {\n export type Infer<T> = Resolvable.Infer<Callable.Infer<T>>;\n\n export type IsPromise<T> = Resolvable.IsPromise<Callable.Infer<T>>;\n\n export type Return<T> =\n true extends IsPromise<T> ? Promise<Infer<T>> : Infer<T>;\n\n export type MaybeArray<T> =\n | CallableResolvable<T>\n | Array<CallableResolvable<T>>;\n\n export namespace MaybeArray {\n export type InferExact<T> = T extends readonly any[]\n ? { [K in keyof T]: CallableResolvable.Infer<T[K]> }\n : CallableResolvable.Infer<T>;\n export type Infer<T> = T extends readonly any[]\n ? Array<{ [K in keyof T]: CallableResolvable.Infer<T[K]> }[number]>\n : CallableResolvable.Infer<T>;\n export type IsPromise<T> = T extends readonly any[]\n ? { [K in keyof T]: CallableResolvable.IsPromise<T[K]> }[number]\n : CallableResolvable.IsPromise<T>;\n export type Return<T> =\n true extends IsPromise<T> ? Promise<Infer<T>> : Infer<T>;\n\n export type ArrayOf<T> = Array<MaybeArray<T>>;\n export namespace ArrayOf {\n export type InferExact<T extends readonly any[]> = {\n [K in keyof T]: MaybeArray.InferExact<T[K]>;\n };\n export type Infer<T extends readonly any[]> = Array<\n {\n [K in keyof T]: MaybeArray.Infer<T[K]>;\n }[number]\n >;\n export type IsPromise<T extends readonly any[]> = {\n [K in keyof T]: MaybeArray.IsPromise<T[K]>;\n }[number];\n export type Return<T extends readonly any[]> =\n true extends IsPromise<T> ? Promise<Infer<T>> : Infer<T>;\n }\n }\n}\n\nexport const resolveNested = <T extends readonly any[]>(\n args: T,\n): CallableResolvable.MaybeArray.ArrayOf.Return<T> => {\n // @ts-expect-error - Fix later\n if (args.length === 0) return [];\n\n const unresolvedValues = args.map((v) => {\n if (typeof v === \"function\") return v();\n if (Array.isArray(v))\n return v.map((sv) => (typeof sv === \"function\" ? sv() : sv));\n return v;\n });\n\n const isPromise = unresolvedValues.some((v) => {\n if (v instanceof Promise) return true;\n if (Array.isArray(v)) return v.some((v) => v instanceof Promise);\n return false;\n });\n\n // @ts-expect-error - We know that the values is not a promise\n if (!isPromise) return unresolvedValues;\n\n // @ts-expect-error - We know that the values is a promise\n return Promise.all(\n unresolvedValues.map((v) => (Array.isArray(v) ? Promise.all(v) : v)),\n );\n};\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;;;ACwDO,IAAM,gBAAgB,CAC3B,SACoD;AAEpD,MAAI,KAAK,WAAW,EAAG,QAAO,CAAC;AAE/B,QAAM,mBAAmB,KAAK,IAAI,CAAC,MAAM;AACvC,QAAI,OAAO,MAAM,WAAY,QAAO,EAAE;AACtC,QAAI,MAAM,QAAQ,CAAC;AACjB,aAAO,EAAE,IAAI,CAAC,OAAQ,OAAO,OAAO,aAAa,GAAG,IAAI,EAAG;AAC7D,WAAO;AAAA,EACT,CAAC;AAED,QAAM,YAAY,iBAAiB,KAAK,CAAC,MAAM;AAC7C,QAAI,aAAa,QAAS,QAAO;AACjC,QAAI,MAAM,QAAQ,CAAC,EAAG,QAAO,EAAE,KAAK,CAACA,OAAMA,cAAa,OAAO;AAC/D,WAAO;AAAA,EACT,CAAC;AAGD,MAAI,CAAC,UAAW,QAAO;AAGvB,SAAO,QAAQ;AAAA,IACb,iBAAiB,IAAI,CAAC,MAAO,MAAM,QAAQ,CAAC,IAAI,QAAQ,IAAI,CAAC,IAAI,CAAE;AAAA,EACrE;AACF;","names":["v"]}
|
1
|
+
{"version":3,"sources":["../../src/callable/callable.bundle.ts","../../src/callable/callable.lib.ts"],"sourcesContent":["export { resolveNested } from \"./callable.lib.ts\";\n","import { type Resolvable } from \"../resolvable.lib.ts\";\n\nexport type Callable<T> = T | (() => T);\nexport declare namespace Callable {\n export type Infer<T> = T extends () => infer U ? U : T;\n export type IsPromise<T> = T extends () => infer U\n ? Resolvable.IsPromise<U>\n : Resolvable.IsPromise<T>;\n}\n\nexport type CallableResolvable<T> = Callable<Resolvable<T>>;\n\nexport declare namespace CallableResolvable {\n export type Infer<T> = Resolvable.Infer<Callable.Infer<T>>;\n\n export type IsPromise<T> = Resolvable.IsPromise<Callable.Infer<T>>;\n\n export type Return<T> =\n true extends IsPromise<T> ? Promise<Infer<T>> : Infer<T>;\n\n export type MaybeArray<T> =\n | CallableResolvable<T>\n | Array<CallableResolvable<T>>;\n\n export namespace MaybeArray {\n export type InferExact<T> = T extends readonly any[]\n ? { [K in keyof T]: CallableResolvable.Infer<T[K]> }\n : CallableResolvable.Infer<T>;\n export type Infer<T> = T extends readonly any[]\n ? Array<{ [K in keyof T]: CallableResolvable.Infer<T[K]> }[number]>\n : CallableResolvable.Infer<T>;\n export type IsPromise<T> = T extends readonly any[]\n ? { [K in keyof T]: CallableResolvable.IsPromise<T[K]> }[number]\n : CallableResolvable.IsPromise<T>;\n export type Return<T> =\n true extends IsPromise<T> ? Promise<Infer<T>> : Infer<T>;\n\n export type ArrayOf<T> = Array<MaybeArray<T>>;\n export namespace ArrayOf {\n export type InferExact<T extends readonly any[]> = {\n [K in keyof T]: MaybeArray.InferExact<T[K]>;\n };\n export type Infer<T extends readonly any[]> = Array<\n {\n [K in keyof T]: MaybeArray.Infer<T[K]>;\n }[number]\n >;\n export type IsPromise<T extends readonly any[]> = {\n [K in keyof T]: MaybeArray.IsPromise<T[K]>;\n }[number];\n export type Return<T extends readonly any[]> =\n true extends IsPromise<T> ? Promise<Infer<T>> : Infer<T>;\n }\n }\n}\n\nexport const resolveNested = <T extends readonly any[]>(\n args: T,\n): CallableResolvable.MaybeArray.ArrayOf.Return<T> => {\n // @ts-expect-error - Fix later\n if (args.length === 0) return [];\n\n const unresolvedValues = args.map((v) => {\n if (typeof v === \"function\") return v();\n if (Array.isArray(v))\n return v.map((sv) => (typeof sv === \"function\" ? sv() : sv));\n return v;\n });\n\n const isPromise = unresolvedValues.some((v) => {\n if (v instanceof Promise) return true;\n if (Array.isArray(v)) return v.some((v) => v instanceof Promise);\n return false;\n });\n\n // @ts-expect-error - We know that the values is not a promise\n if (!isPromise) return unresolvedValues;\n\n // @ts-expect-error - We know that the values is a promise\n return Promise.all(\n unresolvedValues.map((v) => (Array.isArray(v) ? Promise.all(v) : v)),\n );\n};\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;;;ACwDO,IAAM,gBAAgB,CAC3B,SACoD;AAEpD,MAAI,KAAK,WAAW,EAAG,QAAO,CAAC;AAE/B,QAAM,mBAAmB,KAAK,IAAI,CAAC,MAAM;AACvC,QAAI,OAAO,MAAM,WAAY,QAAO,EAAE;AACtC,QAAI,MAAM,QAAQ,CAAC;AACjB,aAAO,EAAE,IAAI,CAAC,OAAQ,OAAO,OAAO,aAAa,GAAG,IAAI,EAAG;AAC7D,WAAO;AAAA,EACT,CAAC;AAED,QAAM,YAAY,iBAAiB,KAAK,CAAC,MAAM;AAC7C,QAAI,aAAa,QAAS,QAAO;AACjC,QAAI,MAAM,QAAQ,CAAC,EAAG,QAAO,EAAE,KAAK,CAACA,OAAMA,cAAa,OAAO;AAC/D,WAAO;AAAA,EACT,CAAC;AAGD,MAAI,CAAC,UAAW,QAAO;AAGvB,SAAO,QAAQ;AAAA,IACb,iBAAiB,IAAI,CAAC,MAAO,MAAM,QAAQ,CAAC,IAAI,QAAQ,IAAI,CAAC,IAAI,CAAE;AAAA,EACrE;AACF;","names":["v"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/resolved.index.ts","../src/resolved.bundle.ts","../src/resolvable.lib.ts"],"sourcesContent":["export type { Resolvable, Resolver } from \"./resolvable.lib\";\nexport * from \"./resolved.bundle\";\nexport * as resolvable from \"./resolved.bundle\";\n","export { pipe, resolveAll } from \"./resolvable.lib\";\n","export type Resolvable<T> = Promise<T> | T;\n\nexport declare namespace Resolvable {\n export type Infer<T> = Awaited<T>;\n export type IsPromise<T> = T extends Promise<any> ? true : never;\n\n namespace ArrayOf {\n export type Infer<T> = T extends readonly any[]\n ? {\n [K in keyof T]: Resolvable.Infer<T[K]>;\n }\n : never;\n\n export type HasPromise<T> = T extends readonly any[]\n ? {\n [K in keyof T]: Resolvable.IsPromise<T[K]>;\n }[number]\n : never;\n }\n\n namespace MaybeArray {\n export type Infer<T> = T extends readonly any[]\n ? { [K in keyof T]: Resolvable.Infer<T[K]> }\n : Resolvable.Infer<T>;\n\n export type IsPromise<T> = T extends readonly any[]\n ? { [K in keyof T]: Resolvable.IsPromise<T[K]> }[number]\n : Resolvable.IsPromise<T>;\n }\n}\n\n/**\n * Resolves all values in the array in parallel\n * @param value The array to resolve\n * @returns If the array contains promises, a promise of an array of values. Otherwise, the array.\n */\nexport const resolveAll = <U extends readonly any[]>(\n value: U,\n): true extends Resolvable.ArrayOf.HasPromise<U>\n ? Promise<Resolvable.ArrayOf.Infer<U>>\n : U => {\n if (!Array.isArray(value)) throw new Error(\"Expected an array\");\n // @ts-expect-error - We know that the value is not a promise\n if (value.some((v) => v instanceof Promise)) return Promise.all(value);\n // @ts-expect-error - We know that the value is not a promise\n return value;\n};\n\nexport class Resolver<T extends Resolvable<any>> {\n private readonly _value: T;\n\n public constructor(value: T) {\n this._value = value;\n }\n\n /**\n * Get the value of the resolver\n * @returns The value or a single promise of the value\n *\n * - If the value is an array containing promises, the array will be resolved with `Promise.all`\n */\n public get $(): T extends readonly any[]\n ? true extends Resolvable.ArrayOf.HasPromise<T>\n ? Promise<Resolvable.ArrayOf.Infer<T>>\n : T\n : T {\n if (Array.isArray(this._value)) {\n // @ts-expect-error - We know that the value is an array\n return resolveAll(this._value);\n }\n // @ts-expect-error - We know that the value is not an array\n return this._value;\n }\n\n public valueOf(): T {\n return this._value;\n }\n\n /**\n * Apply a function to the value\n * @param fn the function to apply to the value\n * @returns a new Resolver instance with the result of the function, either a value or a promise of a value\n */\n public _<R>(\n fn: (value: Resolvable.MaybeArray.Infer<T>) => R,\n ): true extends Resolvable.MaybeArray.IsPromise<T>\n ? true extends Resolvable.MaybeArray.IsPromise<R>\n ? Resolver<R>\n : Resolver<Promise<R>>\n : Resolver<R> {\n if (Array.isArray(this._value)) {\n const hasPromise = this._value.some((v) => v instanceof Promise);\n if (hasPromise)\n // @ts-expect-error - We know that the value is a promise\n return new Resolver(Promise.all(this._value).then(fn));\n // @ts-expect-error - We know that the value is not a promise\n return new Resolver(fn(this._value));\n }\n if (this._value instanceof Promise)\n // @ts-expect-error - We know that the value is a promise\n return new Resolver(this._value.then(fn));\n // @ts-expect-error - We know that the value is not a promise\n return new Resolver(fn(this._value as Resolvable.Infer<T>));\n }\n}\n\n/**\n * A piping utility which preserves the sync/async state of the value\n * @param value The value to pipe\n * @returns A new Resolver instance\n *\n * ```ts\n * import { pipe } from \"@synstack/resolved\";\n *\n * // Sync\n * const value: string = pipe(\"Hello World\")._((v) => v.toUpperCase()).$;\n *\n * // Async\n * const promiseValue: Promise<string> = pipe(\"Hello World\")._((v) => Promise.resolve(v.toUpperCase())).$;\n * ```\n */\nexport const pipe = <T>(value: T) => {\n return new Resolver<T>(value);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;;;ACoCO,IAAM,aAAa,CACxB,UAGO;AACP,MAAI,CAAC,MAAM,QAAQ,KAAK,EAAG,OAAM,IAAI,MAAM,mBAAmB;AAE9D,MAAI,MAAM,KAAK,CAAC,MAAM,aAAa,OAAO,EAAG,QAAO,QAAQ,IAAI,KAAK;AAErE,SAAO;AACT;AAEO,IAAM,WAAN,MAAM,UAAoC;AAAA,EAC9B;AAAA,EAEV,YAAY,OAAU;AAC3B,SAAK,SAAS;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAW,IAIL;AACJ,QAAI,MAAM,QAAQ,KAAK,MAAM,GAAG;AAE9B,aAAO,WAAW,KAAK,MAAM;AAAA,IAC/B;AAEA,WAAO,KAAK;AAAA,EACd;AAAA,EAEO,UAAa;AAClB,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,EACL,IAKc;AACd,QAAI,MAAM,QAAQ,KAAK,MAAM,GAAG;AAC9B,YAAM,aAAa,KAAK,OAAO,KAAK,CAAC,MAAM,aAAa,OAAO;AAC/D,UAAI;AAEF,eAAO,IAAI,UAAS,QAAQ,IAAI,KAAK,MAAM,EAAE,KAAK,EAAE,CAAC;AAEvD,aAAO,IAAI,UAAS,GAAG,KAAK,MAAM,CAAC;AAAA,IACrC;AACA,QAAI,KAAK,kBAAkB;AAEzB,aAAO,IAAI,UAAS,KAAK,OAAO,KAAK,EAAE,CAAC;AAE1C,WAAO,IAAI,UAAS,GAAG,KAAK,MAA6B,CAAC;AAAA,EAC5D;AACF;AAiBO,IAAM,OAAO,CAAI,UAAa;AACnC,SAAO,IAAI,SAAY,KAAK;AAC9B;","names":[]}
|
1
|
+
{"version":3,"sources":["../src/resolved.index.ts","../src/resolved.bundle.ts","../src/resolvable.lib.ts"],"sourcesContent":["export type { Resolvable, Resolver } from \"./resolvable.lib.ts\";\nexport * from \"./resolved.bundle.ts\";\nexport * as resolvable from \"./resolved.bundle.ts\";\n","export { pipe, resolveAll } from \"./resolvable.lib.ts\";\n","export type Resolvable<T> = Promise<T> | T;\n\nexport declare namespace Resolvable {\n export type Infer<T> = Awaited<T>;\n export type IsPromise<T> = T extends Promise<any> ? true : never;\n\n namespace ArrayOf {\n export type Infer<T> = T extends readonly any[]\n ? {\n [K in keyof T]: Resolvable.Infer<T[K]>;\n }\n : never;\n\n export type HasPromise<T> = T extends readonly any[]\n ? {\n [K in keyof T]: Resolvable.IsPromise<T[K]>;\n }[number]\n : never;\n }\n\n namespace MaybeArray {\n export type Infer<T> = T extends readonly any[]\n ? { [K in keyof T]: Resolvable.Infer<T[K]> }\n : Resolvable.Infer<T>;\n\n export type IsPromise<T> = T extends readonly any[]\n ? { [K in keyof T]: Resolvable.IsPromise<T[K]> }[number]\n : Resolvable.IsPromise<T>;\n }\n}\n\n/**\n * Resolves all values in the array in parallel\n * @param value The array to resolve\n * @returns If the array contains promises, a promise of an array of values. Otherwise, the array.\n */\nexport const resolveAll = <U extends readonly any[]>(\n value: U,\n): true extends Resolvable.ArrayOf.HasPromise<U>\n ? Promise<Resolvable.ArrayOf.Infer<U>>\n : U => {\n if (!Array.isArray(value)) throw new Error(\"Expected an array\");\n // @ts-expect-error - We know that the value is not a promise\n if (value.some((v) => v instanceof Promise)) return Promise.all(value);\n // @ts-expect-error - We know that the value is not a promise\n return value;\n};\n\nexport class Resolver<T extends Resolvable<any>> {\n private readonly _value: T;\n\n public constructor(value: T) {\n this._value = value;\n }\n\n /**\n * Get the value of the resolver\n * @returns The value or a single promise of the value\n *\n * - If the value is an array containing promises, the array will be resolved with `Promise.all`\n */\n public get $(): T extends readonly any[]\n ? true extends Resolvable.ArrayOf.HasPromise<T>\n ? Promise<Resolvable.ArrayOf.Infer<T>>\n : T\n : T {\n if (Array.isArray(this._value)) {\n // @ts-expect-error - We know that the value is an array\n return resolveAll(this._value);\n }\n // @ts-expect-error - We know that the value is not an array\n return this._value;\n }\n\n public valueOf(): T {\n return this._value;\n }\n\n /**\n * Apply a function to the value\n * @param fn the function to apply to the value\n * @returns a new Resolver instance with the result of the function, either a value or a promise of a value\n */\n public _<R>(\n fn: (value: Resolvable.MaybeArray.Infer<T>) => R,\n ): true extends Resolvable.MaybeArray.IsPromise<T>\n ? true extends Resolvable.MaybeArray.IsPromise<R>\n ? Resolver<R>\n : Resolver<Promise<R>>\n : Resolver<R> {\n if (Array.isArray(this._value)) {\n const hasPromise = this._value.some((v) => v instanceof Promise);\n if (hasPromise)\n // @ts-expect-error - We know that the value is a promise\n return new Resolver(Promise.all(this._value).then(fn));\n // @ts-expect-error - We know that the value is not a promise\n return new Resolver(fn(this._value));\n }\n if (this._value instanceof Promise)\n // @ts-expect-error - We know that the value is a promise\n return new Resolver(this._value.then(fn));\n // @ts-expect-error - We know that the value is not a promise\n return new Resolver(fn(this._value as Resolvable.Infer<T>));\n }\n}\n\n/**\n * A piping utility which preserves the sync/async state of the value\n * @param value The value to pipe\n * @returns A new Resolver instance\n *\n * ```ts\n * import { pipe } from \"@synstack/resolved\";\n *\n * // Sync\n * const value: string = pipe(\"Hello World\")._((v) => v.toUpperCase()).$;\n *\n * // Async\n * const promiseValue: Promise<string> = pipe(\"Hello World\")._((v) => Promise.resolve(v.toUpperCase())).$;\n * ```\n */\nexport const pipe = <T>(value: T) => {\n return new Resolver<T>(value);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;;;ACoCO,IAAM,aAAa,CACxB,UAGO;AACP,MAAI,CAAC,MAAM,QAAQ,KAAK,EAAG,OAAM,IAAI,MAAM,mBAAmB;AAE9D,MAAI,MAAM,KAAK,CAAC,MAAM,aAAa,OAAO,EAAG,QAAO,QAAQ,IAAI,KAAK;AAErE,SAAO;AACT;AAEO,IAAM,WAAN,MAAM,UAAoC;AAAA,EAC9B;AAAA,EAEV,YAAY,OAAU;AAC3B,SAAK,SAAS;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAW,IAIL;AACJ,QAAI,MAAM,QAAQ,KAAK,MAAM,GAAG;AAE9B,aAAO,WAAW,KAAK,MAAM;AAAA,IAC/B;AAEA,WAAO,KAAK;AAAA,EACd;AAAA,EAEO,UAAa;AAClB,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,EACL,IAKc;AACd,QAAI,MAAM,QAAQ,KAAK,MAAM,GAAG;AAC9B,YAAM,aAAa,KAAK,OAAO,KAAK,CAAC,MAAM,aAAa,OAAO;AAC/D,UAAI;AAEF,eAAO,IAAI,UAAS,QAAQ,IAAI,KAAK,MAAM,EAAE,KAAK,EAAE,CAAC;AAEvD,aAAO,IAAI,UAAS,GAAG,KAAK,MAAM,CAAC;AAAA,IACrC;AACA,QAAI,KAAK,kBAAkB;AAEzB,aAAO,IAAI,UAAS,KAAK,OAAO,KAAK,EAAE,CAAC;AAE1C,WAAO,IAAI,UAAS,GAAG,KAAK,MAA6B,CAAC;AAAA,EAC5D;AACF;AAiBO,IAAM,OAAO,CAAI,UAAa;AACnC,SAAO,IAAI,SAAY,KAAK;AAC9B;","names":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../src/resolved.bundle.ts","../src/resolvable.lib.ts"],"sourcesContent":["export { pipe, resolveAll } from \"./resolvable.lib\";\n","export type Resolvable<T> = Promise<T> | T;\n\nexport declare namespace Resolvable {\n export type Infer<T> = Awaited<T>;\n export type IsPromise<T> = T extends Promise<any> ? true : never;\n\n namespace ArrayOf {\n export type Infer<T> = T extends readonly any[]\n ? {\n [K in keyof T]: Resolvable.Infer<T[K]>;\n }\n : never;\n\n export type HasPromise<T> = T extends readonly any[]\n ? {\n [K in keyof T]: Resolvable.IsPromise<T[K]>;\n }[number]\n : never;\n }\n\n namespace MaybeArray {\n export type Infer<T> = T extends readonly any[]\n ? { [K in keyof T]: Resolvable.Infer<T[K]> }\n : Resolvable.Infer<T>;\n\n export type IsPromise<T> = T extends readonly any[]\n ? { [K in keyof T]: Resolvable.IsPromise<T[K]> }[number]\n : Resolvable.IsPromise<T>;\n }\n}\n\n/**\n * Resolves all values in the array in parallel\n * @param value The array to resolve\n * @returns If the array contains promises, a promise of an array of values. Otherwise, the array.\n */\nexport const resolveAll = <U extends readonly any[]>(\n value: U,\n): true extends Resolvable.ArrayOf.HasPromise<U>\n ? Promise<Resolvable.ArrayOf.Infer<U>>\n : U => {\n if (!Array.isArray(value)) throw new Error(\"Expected an array\");\n // @ts-expect-error - We know that the value is not a promise\n if (value.some((v) => v instanceof Promise)) return Promise.all(value);\n // @ts-expect-error - We know that the value is not a promise\n return value;\n};\n\nexport class Resolver<T extends Resolvable<any>> {\n private readonly _value: T;\n\n public constructor(value: T) {\n this._value = value;\n }\n\n /**\n * Get the value of the resolver\n * @returns The value or a single promise of the value\n *\n * - If the value is an array containing promises, the array will be resolved with `Promise.all`\n */\n public get $(): T extends readonly any[]\n ? true extends Resolvable.ArrayOf.HasPromise<T>\n ? Promise<Resolvable.ArrayOf.Infer<T>>\n : T\n : T {\n if (Array.isArray(this._value)) {\n // @ts-expect-error - We know that the value is an array\n return resolveAll(this._value);\n }\n // @ts-expect-error - We know that the value is not an array\n return this._value;\n }\n\n public valueOf(): T {\n return this._value;\n }\n\n /**\n * Apply a function to the value\n * @param fn the function to apply to the value\n * @returns a new Resolver instance with the result of the function, either a value or a promise of a value\n */\n public _<R>(\n fn: (value: Resolvable.MaybeArray.Infer<T>) => R,\n ): true extends Resolvable.MaybeArray.IsPromise<T>\n ? true extends Resolvable.MaybeArray.IsPromise<R>\n ? Resolver<R>\n : Resolver<Promise<R>>\n : Resolver<R> {\n if (Array.isArray(this._value)) {\n const hasPromise = this._value.some((v) => v instanceof Promise);\n if (hasPromise)\n // @ts-expect-error - We know that the value is a promise\n return new Resolver(Promise.all(this._value).then(fn));\n // @ts-expect-error - We know that the value is not a promise\n return new Resolver(fn(this._value));\n }\n if (this._value instanceof Promise)\n // @ts-expect-error - We know that the value is a promise\n return new Resolver(this._value.then(fn));\n // @ts-expect-error - We know that the value is not a promise\n return new Resolver(fn(this._value as Resolvable.Infer<T>));\n }\n}\n\n/**\n * A piping utility which preserves the sync/async state of the value\n * @param value The value to pipe\n * @returns A new Resolver instance\n *\n * ```ts\n * import { pipe } from \"@synstack/resolved\";\n *\n * // Sync\n * const value: string = pipe(\"Hello World\")._((v) => v.toUpperCase()).$;\n *\n * // Async\n * const promiseValue: Promise<string> = pipe(\"Hello World\")._((v) => Promise.resolve(v.toUpperCase())).$;\n * ```\n */\nexport const pipe = <T>(value: T) => {\n return new Resolver<T>(value);\n};\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACoCO,IAAM,aAAa,CACxB,UAGO;AACP,MAAI,CAAC,MAAM,QAAQ,KAAK,EAAG,OAAM,IAAI,MAAM,mBAAmB;AAE9D,MAAI,MAAM,KAAK,CAAC,MAAM,aAAa,OAAO,EAAG,QAAO,QAAQ,IAAI,KAAK;AAErE,SAAO;AACT;AAEO,IAAM,WAAN,MAAM,UAAoC;AAAA,EAC9B;AAAA,EAEV,YAAY,OAAU;AAC3B,SAAK,SAAS;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAW,IAIL;AACJ,QAAI,MAAM,QAAQ,KAAK,MAAM,GAAG;AAE9B,aAAO,WAAW,KAAK,MAAM;AAAA,IAC/B;AAEA,WAAO,KAAK;AAAA,EACd;AAAA,EAEO,UAAa;AAClB,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,EACL,IAKc;AACd,QAAI,MAAM,QAAQ,KAAK,MAAM,GAAG;AAC9B,YAAM,aAAa,KAAK,OAAO,KAAK,CAAC,MAAM,aAAa,OAAO;AAC/D,UAAI;AAEF,eAAO,IAAI,UAAS,QAAQ,IAAI,KAAK,MAAM,EAAE,KAAK,EAAE,CAAC;AAEvD,aAAO,IAAI,UAAS,GAAG,KAAK,MAAM,CAAC;AAAA,IACrC;AACA,QAAI,KAAK,kBAAkB;AAEzB,aAAO,IAAI,UAAS,KAAK,OAAO,KAAK,EAAE,CAAC;AAE1C,WAAO,IAAI,UAAS,GAAG,KAAK,MAA6B,CAAC;AAAA,EAC5D;AACF;AAiBO,IAAM,OAAO,CAAI,UAAa;AACnC,SAAO,IAAI,SAAY,KAAK;AAC9B;","names":[]}
|
1
|
+
{"version":3,"sources":["../src/resolved.bundle.ts","../src/resolvable.lib.ts"],"sourcesContent":["export { pipe, resolveAll } from \"./resolvable.lib.ts\";\n","export type Resolvable<T> = Promise<T> | T;\n\nexport declare namespace Resolvable {\n export type Infer<T> = Awaited<T>;\n export type IsPromise<T> = T extends Promise<any> ? true : never;\n\n namespace ArrayOf {\n export type Infer<T> = T extends readonly any[]\n ? {\n [K in keyof T]: Resolvable.Infer<T[K]>;\n }\n : never;\n\n export type HasPromise<T> = T extends readonly any[]\n ? {\n [K in keyof T]: Resolvable.IsPromise<T[K]>;\n }[number]\n : never;\n }\n\n namespace MaybeArray {\n export type Infer<T> = T extends readonly any[]\n ? { [K in keyof T]: Resolvable.Infer<T[K]> }\n : Resolvable.Infer<T>;\n\n export type IsPromise<T> = T extends readonly any[]\n ? { [K in keyof T]: Resolvable.IsPromise<T[K]> }[number]\n : Resolvable.IsPromise<T>;\n }\n}\n\n/**\n * Resolves all values in the array in parallel\n * @param value The array to resolve\n * @returns If the array contains promises, a promise of an array of values. Otherwise, the array.\n */\nexport const resolveAll = <U extends readonly any[]>(\n value: U,\n): true extends Resolvable.ArrayOf.HasPromise<U>\n ? Promise<Resolvable.ArrayOf.Infer<U>>\n : U => {\n if (!Array.isArray(value)) throw new Error(\"Expected an array\");\n // @ts-expect-error - We know that the value is not a promise\n if (value.some((v) => v instanceof Promise)) return Promise.all(value);\n // @ts-expect-error - We know that the value is not a promise\n return value;\n};\n\nexport class Resolver<T extends Resolvable<any>> {\n private readonly _value: T;\n\n public constructor(value: T) {\n this._value = value;\n }\n\n /**\n * Get the value of the resolver\n * @returns The value or a single promise of the value\n *\n * - If the value is an array containing promises, the array will be resolved with `Promise.all`\n */\n public get $(): T extends readonly any[]\n ? true extends Resolvable.ArrayOf.HasPromise<T>\n ? Promise<Resolvable.ArrayOf.Infer<T>>\n : T\n : T {\n if (Array.isArray(this._value)) {\n // @ts-expect-error - We know that the value is an array\n return resolveAll(this._value);\n }\n // @ts-expect-error - We know that the value is not an array\n return this._value;\n }\n\n public valueOf(): T {\n return this._value;\n }\n\n /**\n * Apply a function to the value\n * @param fn the function to apply to the value\n * @returns a new Resolver instance with the result of the function, either a value or a promise of a value\n */\n public _<R>(\n fn: (value: Resolvable.MaybeArray.Infer<T>) => R,\n ): true extends Resolvable.MaybeArray.IsPromise<T>\n ? true extends Resolvable.MaybeArray.IsPromise<R>\n ? Resolver<R>\n : Resolver<Promise<R>>\n : Resolver<R> {\n if (Array.isArray(this._value)) {\n const hasPromise = this._value.some((v) => v instanceof Promise);\n if (hasPromise)\n // @ts-expect-error - We know that the value is a promise\n return new Resolver(Promise.all(this._value).then(fn));\n // @ts-expect-error - We know that the value is not a promise\n return new Resolver(fn(this._value));\n }\n if (this._value instanceof Promise)\n // @ts-expect-error - We know that the value is a promise\n return new Resolver(this._value.then(fn));\n // @ts-expect-error - We know that the value is not a promise\n return new Resolver(fn(this._value as Resolvable.Infer<T>));\n }\n}\n\n/**\n * A piping utility which preserves the sync/async state of the value\n * @param value The value to pipe\n * @returns A new Resolver instance\n *\n * ```ts\n * import { pipe } from \"@synstack/resolved\";\n *\n * // Sync\n * const value: string = pipe(\"Hello World\")._((v) => v.toUpperCase()).$;\n *\n * // Async\n * const promiseValue: Promise<string> = pipe(\"Hello World\")._((v) => Promise.resolve(v.toUpperCase())).$;\n * ```\n */\nexport const pipe = <T>(value: T) => {\n return new Resolver<T>(value);\n};\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACoCO,IAAM,aAAa,CACxB,UAGO;AACP,MAAI,CAAC,MAAM,QAAQ,KAAK,EAAG,OAAM,IAAI,MAAM,mBAAmB;AAE9D,MAAI,MAAM,KAAK,CAAC,MAAM,aAAa,OAAO,EAAG,QAAO,QAAQ,IAAI,KAAK;AAErE,SAAO;AACT;AAEO,IAAM,WAAN,MAAM,UAAoC;AAAA,EAC9B;AAAA,EAEV,YAAY,OAAU;AAC3B,SAAK,SAAS;AAAA,EAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IAAW,IAIL;AACJ,QAAI,MAAM,QAAQ,KAAK,MAAM,GAAG;AAE9B,aAAO,WAAW,KAAK,MAAM;AAAA,IAC/B;AAEA,WAAO,KAAK;AAAA,EACd;AAAA,EAEO,UAAa;AAClB,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,EACL,IAKc;AACd,QAAI,MAAM,QAAQ,KAAK,MAAM,GAAG;AAC9B,YAAM,aAAa,KAAK,OAAO,KAAK,CAAC,MAAM,aAAa,OAAO;AAC/D,UAAI;AAEF,eAAO,IAAI,UAAS,QAAQ,IAAI,KAAK,MAAM,EAAE,KAAK,EAAE,CAAC;AAEvD,aAAO,IAAI,UAAS,GAAG,KAAK,MAAM,CAAC;AAAA,IACrC;AACA,QAAI,KAAK,kBAAkB;AAEzB,aAAO,IAAI,UAAS,KAAK,OAAO,KAAK,EAAE,CAAC;AAE1C,WAAO,IAAI,UAAS,GAAG,KAAK,MAA6B,CAAC;AAAA,EAC5D;AACF;AAiBO,IAAM,OAAO,CAAI,UAAa;AACnC,SAAO,IAAI,SAAY,KAAK;AAC9B;","names":[]}
|
package/package.json
CHANGED
@@ -4,8 +4,7 @@
|
|
4
4
|
"publishConfig": {
|
5
5
|
"access": "public"
|
6
6
|
},
|
7
|
-
"
|
8
|
-
"version": "1.0.6",
|
7
|
+
"version": "1.1.0",
|
9
8
|
"author": {
|
10
9
|
"name": "pAIrprog",
|
11
10
|
"url": "https://pairprog.io"
|
@@ -21,8 +20,8 @@
|
|
21
20
|
"build": "tsup",
|
22
21
|
"build:watch": "tsup --watch",
|
23
22
|
"test:types": "tsc --noEmit",
|
24
|
-
"test:unit": "node --
|
25
|
-
"test:unit:watch": "node --
|
23
|
+
"test:unit": "node --experimental-strip-types --test src/**/*.test.ts",
|
24
|
+
"test:unit:watch": "node --experimental-strip-types --watch --test --watch src/**/*.test.ts",
|
26
25
|
"test": "yarn test:types && yarn test:unit",
|
27
26
|
"prepare": "yarn test && yarn build"
|
28
27
|
},
|
@@ -49,15 +48,14 @@
|
|
49
48
|
}
|
50
49
|
},
|
51
50
|
"devDependencies": {
|
52
|
-
"@types/node": "^22.
|
53
|
-
"tsup": "^8.3.
|
54
|
-
"
|
55
|
-
"typescript": "^5.6.3"
|
51
|
+
"@types/node": "^22.9.3",
|
52
|
+
"tsup": "^8.3.5",
|
53
|
+
"typescript": "^5.7.2"
|
56
54
|
},
|
57
55
|
"files": [
|
58
56
|
"src/**/*.ts",
|
59
57
|
"!src/**/*.test.ts",
|
60
58
|
"dist/**/*"
|
61
59
|
],
|
62
|
-
"gitHead": "
|
60
|
+
"gitHead": "7f68a964a86707c6b5f0928182b77911e048bea2"
|
63
61
|
}
|
@@ -1 +1 @@
|
|
1
|
-
export { resolveNested } from "./callable.lib";
|
1
|
+
export { resolveNested } from "./callable.lib.ts";
|
@@ -1 +1 @@
|
|
1
|
-
export * as default from "./callable.bundle";
|
1
|
+
export * as default from "./callable.bundle.ts";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export * as callable from "./callable.bundle";
|
2
|
-
export { default } from "./callable.default";
|
3
|
-
export { resolveNested } from "./callable.lib";
|
4
|
-
export type { Callable, CallableResolvable } from "./callable.lib";
|
1
|
+
export * as callable from "./callable.bundle.ts";
|
2
|
+
export { default } from "./callable.default.ts";
|
3
|
+
export { resolveNested } from "./callable.lib.ts";
|
4
|
+
export type { Callable, CallableResolvable } from "./callable.lib.ts";
|
package/src/resolved.bundle.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export { pipe, resolveAll } from "./resolvable.lib";
|
1
|
+
export { pipe, resolveAll } from "./resolvable.lib.ts";
|
package/src/resolved.index.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
export type { Resolvable, Resolver } from "./resolvable.lib";
|
2
|
-
export * from "./resolved.bundle";
|
3
|
-
export * as resolvable from "./resolved.bundle";
|
1
|
+
export type { Resolvable, Resolver } from "./resolvable.lib.ts";
|
2
|
+
export * from "./resolved.bundle.ts";
|
3
|
+
export * as resolvable from "./resolved.bundle.ts";
|