@layerzerolabs/typescript-utils 0.0.44 → 0.0.46

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.
@@ -4,5 +4,5 @@ var U7VZULNU_cjs = require('./U7VZULNU.cjs');
4
4
 
5
5
  // src/strings.ts
6
6
  U7VZULNU_cjs.init_cjs_shims();
7
- //# sourceMappingURL=OQCEYCFE.cjs.map
8
- //# sourceMappingURL=OQCEYCFE.cjs.map
7
+ //# sourceMappingURL=KLHW5WN3.cjs.map
8
+ //# sourceMappingURL=KLHW5WN3.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/strings.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAyCAA,2BAAA,EAAA","file":"OQCEYCFE.cjs","sourcesContent":["import type { Branded } from './branded';\n\n/**\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\nexport type HexString = `0x${string}`;\n\nexport declare const _NormalizedHexString: unique symbol;\n\nexport type NormalizedHexString = Branded<typeof _NormalizedHexString, 'NormalizedHexString'>;\n\n/**\n * Guarantees that a hex string is trimmed.\n *\n * @example\n * type A = HexStringIsTrimmed<'0x0'>; // true\n * type B = HexStringIsTrimmed<'0x00'>; // false\n * type C = HexStringIsTrimmed<'0x'>; // false\n * type D = HexStringIsTrimmed<'0x100'>; // true\n */\nexport type HexStringIsTrimmed<T extends HexString> = T extends '0x0'\n ? true\n : T extends '0x'\n ? false\n : T extends `0x0${string}`\n ? false\n : true;\n\nexport declare const _DecimalString: unique symbol;\n\nexport type DecimalString = Branded<typeof _DecimalString, 'DecimalString'>;\n"]}
1
+ {"version":3,"sources":["../src/strings.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAyCAA,2BAAA,EAAA","file":"KLHW5WN3.cjs","sourcesContent":["import type { Branded } from './branded';\n\n/**\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\nexport type HexString = `0x${string}`;\n\nexport declare const _NormalizedHexString: unique symbol;\n\nexport type NormalizedHexString = Branded<typeof _NormalizedHexString, 'NormalizedHexString'>;\n\n/**\n * Guarantees that a hex string is trimmed.\n *\n * @example\n * type A = HexStringIsTrimmed<'0x0'>; // true\n * type B = HexStringIsTrimmed<'0x00'>; // false\n * type C = HexStringIsTrimmed<'0x'>; // false\n * type D = HexStringIsTrimmed<'0x100'>; // true\n */\nexport type HexStringIsTrimmed<T extends HexString> = T extends '0x0'\n ? true\n : T extends '0x'\n ? false\n : T extends `0x0${string}`\n ? false\n : true;\n\nexport declare const _NumberString: unique symbol;\n\nexport type DecimalString = Branded<typeof _NumberString, 'DecimalString'>;\n"]}
@@ -4,5 +4,5 @@ var U7VZULNU_cjs = require('./U7VZULNU.cjs');
4
4
 
5
5
  // src/deep.ts
6
6
  U7VZULNU_cjs.init_cjs_shims();
7
- //# sourceMappingURL=PUPSLF67.cjs.map
8
- //# sourceMappingURL=PUPSLF67.cjs.map
7
+ //# sourceMappingURL=LJLAUEED.cjs.map
8
+ //# sourceMappingURL=LJLAUEED.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/deep.ts"],"names":["init_cjs_shims"],"mappings":";;;;;AAEAA,2BAAA,EAAA","file":"LJLAUEED.cjs","sourcesContent":["import type { Prettify } from './viem';\n\n/**\n * Copy the brand tag from the branded.ts file, can't import it to keep it hidden from library users\n */\nconst brandTag = '___tag___';\n\nexport type DeepRequire<T> = {\n [P in keyof T]-?: DeepRequire<T[P]>;\n};\n\nexport type DeepOptional<T> = T extends { [brandTag]: infer U }\n ? Prettify<\n { [brandTag]: U } & {\n [P in keyof T]?: DeepOptional<T[P]>;\n }\n >\n : {\n [P in keyof T]?: DeepOptional<T[P]>;\n };\n"]}