@layerzerolabs/typescript-utils 0.0.19 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +85 -85
- package/dist/3JF2BSTM.cjs +8 -0
- package/dist/{TOTKQMPH.cjs.map → 3JF2BSTM.cjs.map} +1 -1
- package/dist/3OBHE7MG.js +6 -0
- package/dist/{QJAXZLK7.js.map → 3OBHE7MG.js.map} +1 -1
- package/dist/44IBECAR.cjs +8 -0
- package/dist/{TDKRCWOK.cjs.map → 44IBECAR.cjs.map} +1 -1
- package/dist/{2REBOV5B.js → 4RNWLMHM.js} +4 -4
- package/dist/{2REBOV5B.js.map → 4RNWLMHM.js.map} +1 -1
- package/dist/5YKETKDX.js +6 -0
- package/dist/5YKETKDX.js.map +1 -0
- package/dist/{YUKU3RHM.js → 6EIKSOH2.js} +3 -3
- package/dist/{YUKU3RHM.js.map → 6EIKSOH2.js.map} +1 -1
- package/dist/ATSF4XM5.cjs +8 -0
- package/dist/{XST6FSSR.cjs.map → ATSF4XM5.cjs.map} +1 -1
- package/dist/BPWNPHCG.cjs +8 -0
- package/dist/{7YDJI344.cjs.map → BPWNPHCG.cjs.map} +1 -1
- package/dist/C2AO2CD6.js +6 -0
- package/dist/{WJXYIZZS.js.map → C2AO2CD6.js.map} +1 -1
- package/dist/DXU6T5SS.js +6 -0
- package/dist/{ZSMDAHJ4.js.map → DXU6T5SS.js.map} +1 -1
- package/dist/FPWOFXCL.js +6 -0
- package/dist/{CNIGCGYE.js.map → FPWOFXCL.js.map} +1 -1
- package/dist/FQTDMGIM.cjs +8 -0
- package/dist/{KWHD5RBW.cjs.map → FQTDMGIM.cjs.map} +1 -1
- package/dist/GHCFU27L.js +6 -0
- package/dist/{ALPTZHCL.js.map → GHCFU27L.js.map} +1 -1
- package/dist/H4XPUNCM.js +6 -0
- package/dist/{RWFOPD3Y.js.map → H4XPUNCM.js.map} +1 -1
- package/dist/HBKMB3K6.js +6 -0
- package/dist/{KPK5A4XJ.js.map → HBKMB3K6.js.map} +1 -1
- package/dist/HVKBLL5V.js +6 -0
- package/dist/{JOO7TXPI.js.map → HVKBLL5V.js.map} +1 -1
- package/dist/JRGCWPQC.cjs +8 -0
- package/dist/{5LNMW3ZS.cjs.map → JRGCWPQC.cjs.map} +1 -1
- package/dist/KGYIWVDZ.cjs +8 -0
- package/dist/{K2JMEEP6.cjs.map → KGYIWVDZ.cjs.map} +1 -1
- package/dist/LRDSETNH.cjs +8 -0
- package/dist/LRDSETNH.cjs.map +1 -0
- package/dist/LSUYSAW6.cjs +8 -0
- package/dist/{YQRG2CIQ.cjs.map → LSUYSAW6.cjs.map} +1 -1
- package/dist/LXPGE3ZL.js +6 -0
- package/dist/{IZ5CM6Q4.js.map → LXPGE3ZL.js.map} +1 -1
- package/dist/M2FMGCRF.cjs +8 -0
- package/dist/{WEV7Y6VQ.cjs.map → M2FMGCRF.cjs.map} +1 -1
- package/dist/ODTE4REV.cjs +8 -0
- package/dist/{LNMKMOED.cjs.map → ODTE4REV.cjs.map} +1 -1
- package/dist/PUPSLF67.cjs +8 -0
- package/dist/{R7UDST72.cjs.map → PUPSLF67.cjs.map} +1 -1
- package/dist/Q3ZAC463.js +6 -0
- package/dist/{YRLNXXDO.js.map → Q3ZAC463.js.map} +1 -1
- package/dist/Q74ZLWCL.cjs +8 -0
- package/dist/{JY3BKGBV.cjs.map → Q74ZLWCL.cjs.map} +1 -1
- package/dist/TDMZOP4J.js +6 -0
- package/dist/{M5OAV7DM.js.map → TDMZOP4J.js.map} +1 -1
- package/dist/{6JPK4S2H.cjs → TFOJQQVJ.cjs} +23 -23
- package/dist/{6JPK4S2H.cjs.map → TFOJQQVJ.cjs.map} +1 -1
- package/dist/{BTZDOS52.cjs → U7VZULNU.cjs} +4 -4
- package/dist/{BTZDOS52.cjs.map → U7VZULNU.cjs.map} +1 -1
- package/dist/Y53SFKBY.cjs +8 -0
- package/dist/{DV6DXRH6.cjs.map → Y53SFKBY.cjs.map} +1 -1
- package/dist/YICPCKYH.js +6 -0
- package/dist/{SYHTUGPG.js.map → YICPCKYH.js.map} +1 -1
- package/dist/ZPWIEOJR.js +6 -0
- package/dist/{22CQNKAM.js.map → ZPWIEOJR.js.map} +1 -1
- package/dist/advancedRecord.cjs +2 -2
- package/dist/advancedRecord.js +2 -2
- package/dist/branded.cjs +2 -2
- package/dist/branded.js +2 -2
- package/dist/constructor.cjs +2 -2
- package/dist/constructor.js +2 -2
- package/dist/deep.cjs +2 -2
- package/dist/deep.js +2 -2
- package/dist/disallowedAny.cjs +2 -2
- package/dist/disallowedAny.js +2 -2
- package/dist/hexString.cjs +2 -2
- package/dist/hexString.d.ts +2 -0
- package/dist/hexString.d.ts.map +1 -1
- package/dist/hexString.js +2 -2
- package/dist/index.cjs +16 -16
- package/dist/index.js +15 -15
- package/dist/lastOf.cjs +2 -2
- package/dist/lastOf.js +2 -2
- package/dist/merge.cjs +2 -2
- package/dist/merge.js +2 -2
- package/dist/methodOf.cjs +2 -2
- package/dist/methodOf.js +2 -2
- package/dist/removeNever.cjs +2 -2
- package/dist/removeNever.js +2 -2
- package/dist/strings.cjs +2 -2
- package/dist/strings.js +2 -2
- package/dist/strings.test-d.cjs +453 -453
- package/dist/strings.test-d.cjs.map +1 -1
- package/dist/strings.test-d.js +3 -3
- package/dist/strings.test-d.js.map +1 -1
- package/dist/tuples.cjs +2 -2
- package/dist/tuples.js +2 -2
- package/dist/valueOf.cjs +2 -2
- package/dist/valueOf.js +2 -2
- package/dist/viem.cjs +2 -2
- package/dist/viem.js +2 -2
- package/package.json +3 -3
- package/src/hexString.ts +6 -0
- package/dist/22CQNKAM.js +0 -6
- package/dist/5LNMW3ZS.cjs +0 -8
- package/dist/7YDJI344.cjs +0 -8
- package/dist/ALPTZHCL.js +0 -6
- package/dist/CNIGCGYE.js +0 -6
- package/dist/DV6DXRH6.cjs +0 -8
- package/dist/ERXL2KYR.cjs +0 -8
- package/dist/ERXL2KYR.cjs.map +0 -1
- package/dist/IZ5CM6Q4.js +0 -6
- package/dist/JOO7TXPI.js +0 -6
- package/dist/JY3BKGBV.cjs +0 -8
- package/dist/K2JMEEP6.cjs +0 -8
- package/dist/KPK5A4XJ.js +0 -6
- package/dist/KWHD5RBW.cjs +0 -8
- package/dist/LNMKMOED.cjs +0 -8
- package/dist/M5OAV7DM.js +0 -6
- package/dist/QJAXZLK7.js +0 -6
- package/dist/R7UDST72.cjs +0 -8
- package/dist/RWFOPD3Y.js +0 -6
- package/dist/SYHTUGPG.js +0 -6
- package/dist/TDKRCWOK.cjs +0 -8
- package/dist/TOTKQMPH.cjs +0 -8
- package/dist/WEV7Y6VQ.cjs +0 -8
- package/dist/WJXYIZZS.js +0 -6
- package/dist/XST6FSSR.cjs +0 -8
- package/dist/YQRG2CIQ.cjs +0 -8
- package/dist/YRLNXXDO.js +0 -6
- package/dist/Z2NWGMCP.js +0 -6
- package/dist/Z2NWGMCP.js.map +0 -1
- package/dist/ZSMDAHJ4.js +0 -6
package/dist/FPWOFXCL.js
ADDED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/removeNever.ts"],"names":[],"mappings":";;;AAAA,cAAA,EAAA","file":"
|
|
1
|
+
{"version":3,"sources":["../src/removeNever.ts"],"names":[],"mappings":";;;AAAA,cAAA,EAAA","file":"FPWOFXCL.js","sourcesContent":["export type RemoveNever<T> = {\n [K in keyof T as T[K] extends never ? never : K]: T[K];\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/methodOf.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAIAA,2BAAA,EAAA","file":"
|
|
1
|
+
{"version":3,"sources":["../src/methodOf.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAIAA,2BAAA,EAAA","file":"FQTDMGIM.cjs","sourcesContent":["export type MethodOf<T> = {\n [key in keyof T]: T[key] extends (...args: any[]) => any ? T[key] : never;\n}[keyof T];\n\nexport type MethodNameOf<T> = {\n [key in keyof T]: T[key] extends (...args: any[]) => any ? key : never;\n}[keyof T];\n"]}
|
package/dist/GHCFU27L.js
ADDED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/viem.ts"],"names":[],"mappings":";;;AAAA,cAAA,EAAA","file":"
|
|
1
|
+
{"version":3,"sources":["../src/viem.ts"],"names":[],"mappings":";;;AAAA,cAAA,EAAA","file":"GHCFU27L.js","sourcesContent":["/**\n * Filters out all members of {@link T} that are not {@link P}\n *\n * @param T - Items to filter\n * @param P - Type to filter out\n * @returns Filtered items\n *\n * @example\n * type Result = Filter<['a', 'b', 'c'], 'b'>\n * // ^? type Result = ['a', 'c']\n */\nexport type Filter<\n T extends readonly unknown[],\n P,\n Acc extends readonly unknown[] = [],\n> = T extends readonly [infer F, ...infer Rest extends readonly unknown[]]\n ? [F] extends [P]\n ? Filter<Rest, P, [...Acc, F]>\n : Filter<Rest, P, Acc>\n : readonly [...Acc];\n\n/**\n * @description Checks if {@link T} can be narrowed further than {@link U}\n * @param T - Type to check\n * @param U - Type to against\n * @example\n * type Result = IsNarrowable<'foo', string>\n * // ^? true\n */\nexport type IsNarrowable<T, U> =\n IsNever<(T extends U ? true : false) & (U extends T ? false : true)> extends true\n ? false\n : true;\n\n/**\n * @description Checks if {@link T} is `never`\n * @param T - Type to check\n * @example\n * type Result = IsNever<never>\n * // ^? type Result = true\n */\nexport type IsNever<T> = [T] extends [never] ? true : false;\n\n/** Removes `readonly` from all properties of an object. */\nexport type Mutable<type extends object> = {\n -readonly [key in keyof type]: type[key];\n};\n\n/**\n * @description Evaluates boolean \"or\" condition for {@link T} properties.\n * @param T - Type to check\n *\n * * @example\n * type Result = Or<[false, true, false]>\n * // ^? type Result = true\n *\n * @example\n * type Result = Or<[false, false, false]>\n * // ^? type Result = false\n */\nexport type Or<T extends readonly unknown[]> = T extends readonly [infer Head, ...infer Tail]\n ? Head extends true\n ? true\n : Or<Tail>\n : false;\n\n/**\n * @description Checks if {@link T} is `undefined`\n * @param T - Type to check\n * @example\n * type Result = IsUndefined<undefined>\n * // ^? type Result = true\n */\nexport type IsUndefined<T> = [undefined] extends [T] ? true : false;\n\nexport type MaybePromise<T> = T | Promise<T>;\n\n/**\n * @description Makes attributes on the type T required if required is true.\n *\n * @example\n * MaybeRequired<{ a: string, b?: number }, true>\n * => { a: string, b: number }\n *\n * MaybeRequired<{ a: string, b?: number }, false>\n * => { a: string, b?: number }\n */\nexport type MaybeRequired<T, required extends boolean> = required extends true\n ? ExactRequired<T>\n : T;\n\n/**\n * @description Assigns the properties of U onto T.\n *\n * @example\n * Assign<{ a: string, b: number }, { a: undefined, c: boolean }>\n * => { a: undefined, b: number, c: boolean }\n */\nexport type Assign<T, U> = Assign_<T, U> & U;\ntype Assign_<T, U> = {\n [K in keyof T as K extends keyof U ? (U[K] extends void ? never : K) : K]: K extends keyof U\n ? U[K]\n : T[K];\n};\n\n// TODO: Remove when peer dep `typescript@>=4.5` (NoInfer is native)\nexport type NoInfer<type> = [type][type extends any ? 0 : never];\n\n/**\n * @description Constructs a type by excluding `undefined` from `T`.\n *\n * @example\n * NoUndefined<string | undefined>\n * => string\n *\n * @internal\n */\nexport type NoUndefined<T> = T extends undefined ? never : T;\n\n/** Strict version of built-in Omit type */\nexport type Omit<type, keys extends keyof type> = Pick<type, Exclude<keyof type, keys>>;\n\n/**\n * @description Creates a type that is a partial of T, but with the required keys K.\n *\n * @example\n * PartialBy<{ a: string, b: number }, 'a'>\n * => { a?: string, b: number }\n */\nexport type PartialBy<T, K extends keyof T> = Omit<T, K> & ExactPartial<Pick<T, K>>;\n\n/**\n * @description Combines members of an intersection into a readable type.\n *\n * @see {@link https://twitter.com/mattpocockuk/status/1622730173446557697?s=20&t=NdpAcmEFXY01xkqU3KO0Mg}\n * @example\n * Prettify<{ a: string } & { b: string } & { c: number, d: bigint }>\n * => { a: string, b: string, c: number, d: bigint }\n */\nexport type Prettify<T> = {\n [K in keyof T]: T[K];\n} & {};\n\n/** @internal */\nexport type Evaluate<type> = {\n [key in keyof type]: type[key];\n} & {};\n\n/**\n * @description Creates a type that is T with the required keys K.\n *\n * @example\n * RequiredBy<{ a?: string, b: number }, 'a'>\n * => { a: string, b: number }\n */\nexport type RequiredBy<T, K extends keyof T> = Omit<T, K> & ExactRequired<Pick<T, K>>;\n\n/**\n * @description Returns truthy if `array` contains `value`.\n *\n * @example\n * Some<[1, 2, 3], 2>\n * => true\n */\nexport type Some<array extends readonly unknown[], value> = array extends readonly [\n value,\n ...unknown[],\n]\n ? true\n : array extends readonly [unknown, ...infer rest]\n ? Some<rest, value>\n : false;\n\nexport type UnionToTuple<\n union,\n ///\n last = LastInUnion<union>,\n> = [union] extends [never] ? [] : [...UnionToTuple<Exclude<union, last>>, last];\ntype LastInUnion<U> =\n UnionToIntersection<U extends unknown ? (x: U) => 0 : never> extends (x: infer l) => 0\n ? l\n : never;\ntype UnionToIntersection<union> = (union extends unknown ? (arg: union) => 0 : never) extends (\n arg: infer i,\n) => 0\n ? i\n : never;\n\nexport type IsUnion<\n union,\n ///\n union2 = union,\n> = union extends union2 ? ([union2] extends [union] ? false : true) : never;\n\nexport type MaybePartial<type, enabled extends boolean | undefined> = enabled extends true\n ? Prettify<ExactPartial<type>>\n : type;\n\nexport type ExactPartial<type> = {\n [key in keyof type]?: type[key] | undefined;\n};\n\nexport type ExactRequired<type> = {\n [P in keyof type]-?: Exclude<type[P], undefined>;\n};\n\nexport type OneOf<\n union extends object,\n fallback extends object | undefined = undefined,\n ///\n keys extends KeyofUnion<union> = KeyofUnion<union>,\n> = union extends infer item\n ? Prettify<\n item & {\n [key in Exclude<keys, keyof item>]?: fallback extends object\n ? key extends keyof fallback\n ? fallback[key]\n : undefined\n : undefined;\n }\n >\n : never;\ntype KeyofUnion<type> = type extends type ? keyof type : never;\n\n///////////////////////////////////////////////////////////////////////////\n// Loose types\n\n/**\n * Loose version of {@link Omit}\n * @internal\n */\nexport type LooseOmit<type, keys extends string> = Pick<type, Exclude<keyof type, keys>>;\n\n///////////////////////////////////////////////////////////////////////////\n// Union types\n\nexport type UnionEvaluate<type> = type extends object ? Prettify<type> : type;\n\nexport type UnionLooseOmit<type, keys extends string> = type extends any\n ? LooseOmit<type, keys>\n : never;\n\n/**\n * @description Construct a type with the properties of union type T except for those in type K.\n * @example\n * type Result = UnionOmit<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'>\n * => { b: number } | { b: undefined, c: number }\n */\nexport type UnionOmit<type, keys extends keyof type> = type extends any ? Omit<type, keys> : never;\n\n/**\n * @description Construct a type with the properties of union type T except for those in type K.\n * @example\n * type Result = UnionOmit<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'>\n * => { b: number } | { b: undefined, c: number }\n */\nexport type UnionPick<type, keys extends keyof type> = type extends any ? Pick<type, keys> : never;\n\n/**\n * @description Creates a type that is a partial of T, but with the required keys K.\n *\n * @example\n * PartialBy<{ a: string, b: number } | { a: string, b: undefined, c: number }, 'a'>\n * => { a?: string, b: number } | { a?: string, b: undefined, c: number }\n */\nexport type UnionPartialBy<T, K extends keyof T> = T extends any ? PartialBy<T, K> : never;\n\n/**\n * @description Creates a type that is T with the required keys K.\n *\n * @example\n * RequiredBy<{ a?: string, b: number } | { a?: string, c?: number }, 'a'>\n * => { a: string, b: number } | { a: string, c?: number }\n */\nexport type UnionRequiredBy<T, K extends keyof T> = T extends any ? RequiredBy<T, K> : never;\n"]}
|
package/dist/H4XPUNCM.js
ADDED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/deep.ts"],"names":[],"mappings":";;;AAIA,cAAA,EAAA","file":"
|
|
1
|
+
{"version":3,"sources":["../src/deep.ts"],"names":[],"mappings":";;;AAIA,cAAA,EAAA","file":"H4XPUNCM.js","sourcesContent":["export type DeepRequire<T> = {\n [P in keyof T]-?: DeepRequire<T[P]>;\n};\n\nexport type DeepOptional<T> = {\n [P in keyof T]?: DeepOptional<T[P]>;\n};\n"]}
|
package/dist/HBKMB3K6.js
ADDED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/disallowedAny.ts"],"names":[],"mappings":";;;AAGA,cAAA,EAAA","file":"
|
|
1
|
+
{"version":3,"sources":["../src/disallowedAny.ts"],"names":[],"mappings":";;;AAGA,cAAA,EAAA","file":"HBKMB3K6.js","sourcesContent":["type IsAnyInner<T> = T extends never ? true : false;\ntype IsAny<T> = IsAnyInner<T> extends true ? false : IsAnyInner<T> extends false ? false : true;\n\nexport type DisallowedAny<T> = IsAny<T> extends true ? never : T;\n"]}
|
package/dist/HVKBLL5V.js
ADDED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/merge.ts"],"names":[],"mappings":";;;AAEA,cAAA,EAAA","file":"
|
|
1
|
+
{"version":3,"sources":["../src/merge.ts"],"names":[],"mappings":";;;AAEA,cAAA,EAAA","file":"HVKBLL5V.js","sourcesContent":["import type { Prettify } from './viem';\n\nexport type Merge<T, U> = {} extends T\n ? U\n : {} extends U\n ? T\n : Prettify<\n {\n [key in keyof T]: key extends keyof U ? U[key] : T[key];\n } & {\n [key in keyof U]: U[key];\n }\n >;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/removeNever.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAAAA,2BAAA,EAAA","file":"
|
|
1
|
+
{"version":3,"sources":["../src/removeNever.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAAAA,2BAAA,EAAA","file":"JRGCWPQC.cjs","sourcesContent":["export type RemoveNever<T> = {\n [K in keyof T as T[K] extends never ? never : K]: T[K];\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/advancedRecord.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAMAA,2BAAA,EAAA","file":"
|
|
1
|
+
{"version":3,"sources":["../src/advancedRecord.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAMAA,2BAAA,EAAA","file":"KGYIWVDZ.cjs","sourcesContent":["export type AdvancedRecord<T = any, U = any> = {\n readonly [key: string]: readonly [T, U];\n};\n\nexport type DeepWritable<T> = { -readonly [P in keyof T]: DeepWritable<T[P]> };\n\nexport type AdvancedRecordLookup<\n AR extends AdvancedRecord | undefined,\n KeyToFind,\n> = AR extends AdvancedRecord\n ? {\n [P in keyof AR]: AR[P] extends readonly [infer K, infer V]\n ? KeyToFind extends DeepWritable<K>\n ? V\n : DeepWritable<K> extends KeyToFind\n ? V\n : never\n : never;\n }[keyof AR]\n : never;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hexString.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAEAA,2BAAA,EAAA","file":"LRDSETNH.cjs","sourcesContent":["export type HexString = `0x${string}`;\nexport type NormalizedHexString = Symbol;\nexport type HexStringIsTrimmed<T extends HexString> = T extends '0x0'\n ? true\n : T extends `0x0${string}`\n ? false\n : true;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tuples.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAqBAA,2BAAA,EAAA","file":"
|
|
1
|
+
{"version":3,"sources":["../src/tuples.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAqBAA,2BAAA,EAAA","file":"LSUYSAW6.cjs","sourcesContent":["import type { BrandedError } from './branded';\n\n//check that the tuple T uses every type in the union K at least once\nexport type IsComplete<\n T extends readonly (string | number | symbol)[],\n K extends string | number | symbol,\n> = Exclude<K, T[number]> extends never ? true : false;\n\nexport type TryGetDuplicate<\n T extends readonly (string | number | symbol)[],\n Seen extends (string | number | symbol)[] = [],\n> = T extends [infer Head, ...infer Tail]\n ? Head extends Seen[number]\n ? Head\n : Head extends string | number | symbol\n ? Tail extends readonly (string | number | symbol)[]\n ? TryGetDuplicate<Tail, [...Seen, Head]>\n : false\n : false\n : false;\n\n//check that the tuple T is a valid ordering of AllKeys, using IsComplete and TryGetDuplicate\n//returns a branded error if there are missing keys or duplicates\nexport type AssertUniqueCompleteSet<\n T extends readonly (string | number | symbol)[],\n AllKeys extends string | number | symbol,\n> =\n IsComplete<T, AllKeys> extends false\n ? BrandedError<`Missing key: ${Exclude<AllKeys extends Symbol ? 'ERR' : AllKeys, T[number]>}`>\n : TryGetDuplicate<T> extends false\n ? T\n : BrandedError<`Duplicate key found: ${TryGetDuplicate<T>}`>;\n"]}
|
package/dist/LXPGE3ZL.js
ADDED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/strings.ts"],"names":[],"mappings":";;;AAAA,cAAA,EAAA","file":"
|
|
1
|
+
{"version":3,"sources":["../src/strings.ts"],"names":[],"mappings":";;;AAAA,cAAA,EAAA","file":"LXPGE3ZL.js","sourcesContent":["/**\n * Guarantees that a string does not end with a suffix.\n * You can remove multiple suffixes by using a union.\n *\n * @example\n * type A = StringWithoutSuffix<'hello', 'world'>; // 'hello'\n * type B = StringWithoutSuffix<'hello', 'lo'>; // never\n * type C = StringWithoutSuffix<'hello world', 'lo' | 'world'>; // never\n */\nexport type StringWithoutSuffix<\n T extends string,\n Suffix extends string,\n> = T extends `${infer _}${Suffix}` ? never : T;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/valueOf.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAMAA,2BAAA,EAAA","file":"
|
|
1
|
+
{"version":3,"sources":["../src/valueOf.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAMAA,2BAAA,EAAA","file":"M2FMGCRF.cjs","sourcesContent":["export type IntersectionValueOf<T> = (\n T[keyof T] extends infer U ? (U extends any ? (x: U) => void : never) : never\n) extends (x: infer I) => void\n ? I\n : never;\n\n/**\n * @description Creates a type that extracts the values of T.\n *\n * @example\n * ValueOf<{ a: string, b: number }>\n * => string | number\n *\n * @internal\n */\nexport type ValueOf<T> = T[keyof T];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/strings.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAAAA,2BAAA,EAAA","file":"
|
|
1
|
+
{"version":3,"sources":["../src/strings.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAAAA,2BAAA,EAAA","file":"ODTE4REV.cjs","sourcesContent":["/**\n * Guarantees that a string does not end with a suffix.\n * You can remove multiple suffixes by using a union.\n *\n * @example\n * type A = StringWithoutSuffix<'hello', 'world'>; // 'hello'\n * type B = StringWithoutSuffix<'hello', 'lo'>; // never\n * type C = StringWithoutSuffix<'hello world', 'lo' | 'world'>; // never\n */\nexport type StringWithoutSuffix<\n T extends string,\n Suffix extends string,\n> = T extends `${infer _}${Suffix}` ? never : T;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/deep.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAIAA,2BAAA,EAAA","file":"
|
|
1
|
+
{"version":3,"sources":["../src/deep.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAIAA,2BAAA,EAAA","file":"PUPSLF67.cjs","sourcesContent":["export type DeepRequire<T> = {\n [P in keyof T]-?: DeepRequire<T[P]>;\n};\n\nexport type DeepOptional<T> = {\n [P in keyof T]?: DeepOptional<T[P]>;\n};\n"]}
|
package/dist/Q3ZAC463.js
ADDED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/advancedRecord.ts"],"names":[],"mappings":";;;AAMA,cAAA,EAAA","file":"
|
|
1
|
+
{"version":3,"sources":["../src/advancedRecord.ts"],"names":[],"mappings":";;;AAMA,cAAA,EAAA","file":"Q3ZAC463.js","sourcesContent":["export type AdvancedRecord<T = any, U = any> = {\n readonly [key: string]: readonly [T, U];\n};\n\nexport type DeepWritable<T> = { -readonly [P in keyof T]: DeepWritable<T[P]> };\n\nexport type AdvancedRecordLookup<\n AR extends AdvancedRecord | undefined,\n KeyToFind,\n> = AR extends AdvancedRecord\n ? {\n [P in keyof AR]: AR[P] extends readonly [infer K, infer V]\n ? KeyToFind extends DeepWritable<K>\n ? V\n : DeepWritable<K> extends KeyToFind\n ? V\n : never\n : never;\n }[keyof AR]\n : never;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lastOf.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAcAA,2BAAA,EAAA","file":"
|
|
1
|
+
{"version":3,"sources":["../src/lastOf.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAcAA,2BAAA,EAAA","file":"Q74ZLWCL.cjs","sourcesContent":["export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (\n k: infer I,\n) => void\n ? I\n : never;\n\nexport type LastOf<T> =\n UnionToIntersection<T extends any ? () => T : never> extends () => infer R ? R : never;\n\ntype Prepend<T, U extends any[]> = [T, ...U];\n\nexport type UnionToArray<T, U extends any[] = []> =\n LastOf<T> extends never ? U : UnionToArray<Exclude<T, LastOf<T>>, Prepend<LastOf<T>, U>>;\n\nexport type RestOf<T> = Exclude<T, LastOf<T>>;\n"]}
|
package/dist/TDMZOP4J.js
ADDED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lastOf.ts"],"names":[],"mappings":";;;AAcA,cAAA,EAAA","file":"
|
|
1
|
+
{"version":3,"sources":["../src/lastOf.ts"],"names":[],"mappings":";;;AAcA,cAAA,EAAA","file":"TDMZOP4J.js","sourcesContent":["export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (\n k: infer I,\n) => void\n ? I\n : never;\n\nexport type LastOf<T> =\n UnionToIntersection<T extends any ? () => T : never> extends () => infer R ? R : never;\n\ntype Prepend<T, U extends any[]> = [T, ...U];\n\nexport type UnionToArray<T, U extends any[] = []> =\n LastOf<T> extends never ? U : UnionToArray<Exclude<T, LastOf<T>>, Prepend<LastOf<T>, U>>;\n\nexport type RestOf<T> = Exclude<T, LastOf<T>>;\n"]}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var U7VZULNU_cjs = require('./U7VZULNU.cjs');
|
|
6
6
|
|
|
7
7
|
// ../../node_modules/.pnpm/magic-string@0.30.17/node_modules/magic-string/dist/magic-string.es.mjs
|
|
8
|
-
|
|
8
|
+
U7VZULNU_cjs.init_cjs_shims();
|
|
9
9
|
|
|
10
10
|
// ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.4/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
11
|
-
|
|
11
|
+
U7VZULNU_cjs.init_cjs_shims();
|
|
12
12
|
var comma = ",".charCodeAt(0);
|
|
13
13
|
var semicolon = ";".charCodeAt(0);
|
|
14
14
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
@@ -30,7 +30,7 @@ function encodeInteger(builder, num, relative) {
|
|
|
30
30
|
} while (delta > 0);
|
|
31
31
|
return num;
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
U7VZULNU_cjs.__name(encodeInteger, "encodeInteger");
|
|
34
34
|
var bufLength = 1024 * 16;
|
|
35
35
|
var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? {
|
|
36
36
|
decode(buf) {
|
|
@@ -48,7 +48,7 @@ var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder()
|
|
|
48
48
|
};
|
|
49
49
|
var StringWriter = class {
|
|
50
50
|
static {
|
|
51
|
-
|
|
51
|
+
U7VZULNU_cjs.__name(this, "StringWriter");
|
|
52
52
|
}
|
|
53
53
|
constructor() {
|
|
54
54
|
this.pos = 0;
|
|
@@ -93,12 +93,12 @@ function encode(decoded) {
|
|
|
93
93
|
}
|
|
94
94
|
return writer.flush();
|
|
95
95
|
}
|
|
96
|
-
|
|
96
|
+
U7VZULNU_cjs.__name(encode, "encode");
|
|
97
97
|
|
|
98
98
|
// ../../node_modules/.pnpm/magic-string@0.30.17/node_modules/magic-string/dist/magic-string.es.mjs
|
|
99
99
|
var BitSet = class _BitSet {
|
|
100
100
|
static {
|
|
101
|
-
|
|
101
|
+
U7VZULNU_cjs.__name(this, "BitSet");
|
|
102
102
|
}
|
|
103
103
|
constructor(arg) {
|
|
104
104
|
this.bits = arg instanceof _BitSet ? arg.bits.slice() : [];
|
|
@@ -112,7 +112,7 @@ var BitSet = class _BitSet {
|
|
|
112
112
|
};
|
|
113
113
|
var Chunk = class _Chunk {
|
|
114
114
|
static {
|
|
115
|
-
|
|
115
|
+
U7VZULNU_cjs.__name(this, "Chunk");
|
|
116
116
|
}
|
|
117
117
|
constructor(start, end, content) {
|
|
118
118
|
this.start = start;
|
|
@@ -258,11 +258,11 @@ function getBtoa() {
|
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
|
-
|
|
261
|
+
U7VZULNU_cjs.__name(getBtoa, "getBtoa");
|
|
262
262
|
var btoa = /* @__PURE__ */ getBtoa();
|
|
263
263
|
var SourceMap = class {
|
|
264
264
|
static {
|
|
265
|
-
|
|
265
|
+
U7VZULNU_cjs.__name(this, "SourceMap");
|
|
266
266
|
}
|
|
267
267
|
constructor(properties) {
|
|
268
268
|
this.version = 3;
|
|
@@ -301,7 +301,7 @@ function guessIndent(code) {
|
|
|
301
301
|
}, Infinity);
|
|
302
302
|
return new Array(min + 1).join(" ");
|
|
303
303
|
}
|
|
304
|
-
|
|
304
|
+
U7VZULNU_cjs.__name(guessIndent, "guessIndent");
|
|
305
305
|
function getRelativePath(from, to) {
|
|
306
306
|
const fromParts = from.split(/[/\\]/);
|
|
307
307
|
const toParts = to.split(/[/\\]/);
|
|
@@ -316,12 +316,12 @@ function getRelativePath(from, to) {
|
|
|
316
316
|
}
|
|
317
317
|
return fromParts.concat(toParts).join("/");
|
|
318
318
|
}
|
|
319
|
-
|
|
319
|
+
U7VZULNU_cjs.__name(getRelativePath, "getRelativePath");
|
|
320
320
|
var toString = Object.prototype.toString;
|
|
321
321
|
function isObject(thing) {
|
|
322
322
|
return toString.call(thing) === "[object Object]";
|
|
323
323
|
}
|
|
324
|
-
|
|
324
|
+
U7VZULNU_cjs.__name(isObject, "isObject");
|
|
325
325
|
function getLocator(source) {
|
|
326
326
|
const originalLines = source.split("\n");
|
|
327
327
|
const lineOffsets = [];
|
|
@@ -329,7 +329,7 @@ function getLocator(source) {
|
|
|
329
329
|
lineOffsets.push(pos);
|
|
330
330
|
pos += originalLines[i].length + 1;
|
|
331
331
|
}
|
|
332
|
-
return /* @__PURE__ */
|
|
332
|
+
return /* @__PURE__ */ U7VZULNU_cjs.__name(function locate(index) {
|
|
333
333
|
let i = 0;
|
|
334
334
|
let j = lineOffsets.length;
|
|
335
335
|
while (i < j) {
|
|
@@ -345,11 +345,11 @@ function getLocator(source) {
|
|
|
345
345
|
return { line, column };
|
|
346
346
|
}, "locate");
|
|
347
347
|
}
|
|
348
|
-
|
|
348
|
+
U7VZULNU_cjs.__name(getLocator, "getLocator");
|
|
349
349
|
var wordRegex = /\w/;
|
|
350
350
|
var Mappings = class {
|
|
351
351
|
static {
|
|
352
|
-
|
|
352
|
+
U7VZULNU_cjs.__name(this, "Mappings");
|
|
353
353
|
}
|
|
354
354
|
constructor(hires) {
|
|
355
355
|
this.hires = hires;
|
|
@@ -447,7 +447,7 @@ var warned = {
|
|
|
447
447
|
};
|
|
448
448
|
var MagicString = class _MagicString {
|
|
449
449
|
static {
|
|
450
|
-
|
|
450
|
+
U7VZULNU_cjs.__name(this, "MagicString");
|
|
451
451
|
}
|
|
452
452
|
constructor(string, options = {}) {
|
|
453
453
|
const chunk = new Chunk(0, string.length, string);
|
|
@@ -601,7 +601,7 @@ var MagicString = class _MagicString {
|
|
|
601
601
|
});
|
|
602
602
|
}
|
|
603
603
|
let shouldIndentNextCharacter = options.indentStart !== false;
|
|
604
|
-
const replacer = /* @__PURE__ */
|
|
604
|
+
const replacer = /* @__PURE__ */ U7VZULNU_cjs.__name((match) => {
|
|
605
605
|
if (shouldIndentNextCharacter) return `${indentStr}${match}`;
|
|
606
606
|
shouldIndentNextCharacter = true;
|
|
607
607
|
return match;
|
|
@@ -1026,7 +1026,7 @@ var MagicString = class _MagicString {
|
|
|
1026
1026
|
return replacement(...match, match.index, str, match.groups);
|
|
1027
1027
|
}
|
|
1028
1028
|
}
|
|
1029
|
-
|
|
1029
|
+
U7VZULNU_cjs.__name(getReplacement, "getReplacement");
|
|
1030
1030
|
function matchAll(re, str) {
|
|
1031
1031
|
let match;
|
|
1032
1032
|
const matches = [];
|
|
@@ -1035,7 +1035,7 @@ var MagicString = class _MagicString {
|
|
|
1035
1035
|
}
|
|
1036
1036
|
return matches;
|
|
1037
1037
|
}
|
|
1038
|
-
|
|
1038
|
+
U7VZULNU_cjs.__name(matchAll, "matchAll");
|
|
1039
1039
|
if (searchValue.global) {
|
|
1040
1040
|
const matches = matchAll(searchValue, this.original);
|
|
1041
1041
|
matches.forEach((match) => {
|
|
@@ -1095,7 +1095,7 @@ var MagicString = class _MagicString {
|
|
|
1095
1095
|
var hasOwnProp = Object.prototype.hasOwnProperty;
|
|
1096
1096
|
var Bundle = class _Bundle {
|
|
1097
1097
|
static {
|
|
1098
|
-
|
|
1098
|
+
U7VZULNU_cjs.__name(this, "Bundle");
|
|
1099
1099
|
}
|
|
1100
1100
|
constructor(options = {}) {
|
|
1101
1101
|
this.intro = options.intro || "";
|
|
@@ -1328,5 +1328,5 @@ var Bundle = class _Bundle {
|
|
|
1328
1328
|
exports.Bundle = Bundle;
|
|
1329
1329
|
exports.SourceMap = SourceMap;
|
|
1330
1330
|
exports.default = MagicString;
|
|
1331
|
-
//# sourceMappingURL=
|
|
1332
|
-
//# sourceMappingURL=
|
|
1331
|
+
//# sourceMappingURL=TFOJQQVJ.cjs.map
|
|
1332
|
+
//# sourceMappingURL=TFOJQQVJ.cjs.map
|