@layerzerolabs/typescript-utils 0.2.65 → 0.2.67

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.
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var _7BSTQVJO_cjs = require('./7BSTQVJO.cjs');
3
+ var QXEVXGNQ_cjs = require('./QXEVXGNQ.cjs');
4
4
  var _24WEKBY3_cjs = require('./24WEKBY3.cjs');
5
5
 
6
6
  // src/deep.test-d.ts
7
7
  _24WEKBY3_cjs.init_cjs_shims();
8
- _7BSTQVJO_cjs.test("DeepOptional", () => {
9
- (0, _7BSTQVJO_cjs.import_expect_type.expectTypeOf)().toEqualTypeOf();
10
- (0, _7BSTQVJO_cjs.import_expect_type.expectTypeOf)().toEqualTypeOf();
11
- (0, _7BSTQVJO_cjs.import_expect_type.expectTypeOf)().toEqualTypeOf();
12
- (0, _7BSTQVJO_cjs.import_expect_type.expectTypeOf)().toEqualTypeOf();
8
+ QXEVXGNQ_cjs.test("DeepOptional", () => {
9
+ (0, QXEVXGNQ_cjs.import_expect_type.expectTypeOf)().toEqualTypeOf();
10
+ (0, QXEVXGNQ_cjs.import_expect_type.expectTypeOf)().toEqualTypeOf();
11
+ (0, QXEVXGNQ_cjs.import_expect_type.expectTypeOf)().toEqualTypeOf();
12
+ (0, QXEVXGNQ_cjs.import_expect_type.expectTypeOf)().toEqualTypeOf();
13
13
  });
14
14
  //# sourceMappingURL=deep.test-d.cjs.map
15
15
  //# sourceMappingURL=deep.test-d.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/deep.test-d.ts"],"names":["init_cjs_shims","test","expectTypeOf","toEqualTypeOf"],"mappings":";;;;;;AAAAA,4BAAA,EAAA;AAKAC,kBAAAA,CAAK,gBAAgB,MAAA;AAGjBC,EAAAA,IAAAA,gCAAAA,CAAAA,YAAAA,IAAkBC,aAAAA,EAAa;AAI/BD,EAAAA,IAAAA,gCAAAA,CAAAA,YAAAA,IAAkBC,aAAAA,EAAa;AAM/BD,EAAAA,IAAAA,gCAAAA,CAAAA,YAAAA,IAAkBC,aAAAA,EAAa;AAK/BD,EAAAA,IAAAA,gCAAAA,CAAAA,YAAAA,IAAkBC,aAAAA,EAAa;AASnC,CAAA,CAAA","file":"deep.test-d.cjs","sourcesContent":["import { expectTypeOf, test } from 'vitest';\n\nimport type { Branded } from './branded';\nimport type { DeepOptional } from './deep';\n\ntest('DeepOptional', () => {\n // 1 level\n type A = DeepOptional<{ a: string; b: number }>;\n expectTypeOf<A>().toEqualTypeOf<{ a?: string; b?: number }>();\n\n // 2 levels\n type B = DeepOptional<{ a: { c: string }; b: number }>;\n expectTypeOf<B>().toEqualTypeOf<{ a?: { c?: string }; b?: number }>();\n\n // 1 level with brand tag\n type obj = { a: string; b: number };\n type branded = Branded<obj, 'foo'>;\n type C = DeepOptional<branded>;\n expectTypeOf<C>().toEqualTypeOf<{ a?: string; b?: number; ___tag___: 'foo' }>();\n\n // 2 levels with brand tag\n type obj2 = { a: branded; b: number };\n type D = DeepOptional<Branded<obj2, 'foo2'>>;\n expectTypeOf<D>().toEqualTypeOf<{\n a?: {\n a?: string;\n b?: number;\n ___tag___: 'foo';\n };\n b?: number;\n ___tag___: 'foo2';\n }>();\n});\n"]}
1
+ {"version":3,"sources":["../src/deep.test-d.ts"],"names":["init_cjs_shims","test","expectTypeOf","toEqualTypeOf"],"mappings":";;;;;;AAAAA,4BAAA,EAAA;AAKAC,iBAAAA,CAAK,gBAAgB,MAAA;AAGjBC,EAAAA,IAAAA,+BAAAA,CAAAA,YAAAA,IAAkBC,aAAAA,EAAa;AAI/BD,EAAAA,IAAAA,+BAAAA,CAAAA,YAAAA,IAAkBC,aAAAA,EAAa;AAM/BD,EAAAA,IAAAA,+BAAAA,CAAAA,YAAAA,IAAkBC,aAAAA,EAAa;AAK/BD,EAAAA,IAAAA,+BAAAA,CAAAA,YAAAA,IAAkBC,aAAAA,EAAa;AASnC,CAAA,CAAA","file":"deep.test-d.cjs","sourcesContent":["import { expectTypeOf, test } from 'vitest';\n\nimport type { Branded } from './branded';\nimport type { DeepOptional } from './deep';\n\ntest('DeepOptional', () => {\n // 1 level\n type A = DeepOptional<{ a: string; b: number }>;\n expectTypeOf<A>().toEqualTypeOf<{ a?: string; b?: number }>();\n\n // 2 levels\n type B = DeepOptional<{ a: { c: string }; b: number }>;\n expectTypeOf<B>().toEqualTypeOf<{ a?: { c?: string }; b?: number }>();\n\n // 1 level with brand tag\n type obj = { a: string; b: number };\n type branded = Branded<obj, 'foo'>;\n type C = DeepOptional<branded>;\n expectTypeOf<C>().toEqualTypeOf<{ a?: string; b?: number; ___tag___: 'foo' }>();\n\n // 2 levels with brand tag\n type obj2 = { a: branded; b: number };\n type D = DeepOptional<Branded<obj2, 'foo2'>>;\n expectTypeOf<D>().toEqualTypeOf<{\n a?: {\n a?: string;\n b?: number;\n ___tag___: 'foo';\n };\n b?: number;\n ___tag___: 'foo2';\n }>();\n});\n"]}
@@ -1,4 +1,4 @@
1
- import { test, import_expect_type } from './CI7BVOAG.js';
1
+ import { test, import_expect_type } from './QDQO2ODJ.js';
2
2
  import { init_esm_shims } from './6AHA7PAZ.js';
3
3
 
4
4
  // src/deep.test-d.ts
@@ -1,21 +1,21 @@
1
1
  'use strict';
2
2
 
3
- var _7BSTQVJO_cjs = require('./7BSTQVJO.cjs');
3
+ var QXEVXGNQ_cjs = require('./QXEVXGNQ.cjs');
4
4
  var _24WEKBY3_cjs = require('./24WEKBY3.cjs');
5
5
 
6
6
  // src/strings.test-d.ts
7
7
  _24WEKBY3_cjs.init_cjs_shims();
8
- _7BSTQVJO_cjs.test("StringWithoutSuffix", () => {
9
- (0, _7BSTQVJO_cjs.import_expect_type.expectTypeOf)().toBeString();
10
- (0, _7BSTQVJO_cjs.import_expect_type.expectTypeOf)().toBeNever();
11
- (0, _7BSTQVJO_cjs.import_expect_type.expectTypeOf)().toBeNever();
12
- (0, _7BSTQVJO_cjs.import_expect_type.expectTypeOf)().toBeNever();
13
- (0, _7BSTQVJO_cjs.import_expect_type.expectTypeOf)().toBeString();
8
+ QXEVXGNQ_cjs.test("StringWithoutSuffix", () => {
9
+ (0, QXEVXGNQ_cjs.import_expect_type.expectTypeOf)().toBeString();
10
+ (0, QXEVXGNQ_cjs.import_expect_type.expectTypeOf)().toBeNever();
11
+ (0, QXEVXGNQ_cjs.import_expect_type.expectTypeOf)().toBeNever();
12
+ (0, QXEVXGNQ_cjs.import_expect_type.expectTypeOf)().toBeNever();
13
+ (0, QXEVXGNQ_cjs.import_expect_type.expectTypeOf)().toBeString();
14
14
  });
15
- _7BSTQVJO_cjs.test("HexStringIsTrimmed", () => {
16
- (0, _7BSTQVJO_cjs.import_expect_type.expectTypeOf)().toExtend();
17
- (0, _7BSTQVJO_cjs.import_expect_type.expectTypeOf)().toExtend();
18
- (0, _7BSTQVJO_cjs.import_expect_type.expectTypeOf)().toExtend();
15
+ QXEVXGNQ_cjs.test("HexStringIsTrimmed", () => {
16
+ (0, QXEVXGNQ_cjs.import_expect_type.expectTypeOf)().toExtend();
17
+ (0, QXEVXGNQ_cjs.import_expect_type.expectTypeOf)().toExtend();
18
+ (0, QXEVXGNQ_cjs.import_expect_type.expectTypeOf)().toExtend();
19
19
  });
20
20
  //# sourceMappingURL=strings.test-d.cjs.map
21
21
  //# sourceMappingURL=strings.test-d.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/strings.test-d.ts"],"names":["init_cjs_shims","test","expectTypeOf","toBeString","toBeNever","toExtend"],"mappings":";;;;;;AAAAA,4BAAA,EAAA;AAIAC,kBAAAA,CAAK,uBAAuB,MAAA;AAExBC,EAAAA,IAAAA,gCAAAA,CAAAA,YAAAA,IAAkBC,UAAAA,EAAU;AAG5BD,EAAAA,IAAAA,gCAAAA,CAAAA,YAAAA,IAAkBE,SAAAA,EAAS;AAI3BF,EAAAA,IAAAA,gCAAAA,CAAAA,YAAAA,IAAkBE,SAAAA,EAAS;AAG3BF,EAAAA,IAAAA,gCAAAA,CAAAA,YAAAA,IAAkBE,SAAAA,EAAS;AAG3BF,EAAAA,IAAAA,gCAAAA,CAAAA,YAAAA,IAAkBC,UAAAA,EAAU;AAChC,CAAA,CAAA;AAEAF,kBAAAA,CAAK,sBAAsB,MAAA;AAEvBC,EAAAA,IAAAA,gCAAAA,CAAAA,YAAAA,IAAkBG,QAAAA,EAAQ;AAG1BH,EAAAA,IAAAA,gCAAAA,CAAAA,YAAAA,IAAkBG,QAAAA,EAAQ;AAG1BH,EAAAA,IAAAA,gCAAAA,CAAAA,YAAAA,IAAkBG,QAAAA,EAAQ;AAC9B,CAAA,CAAA","file":"strings.test-d.cjs","sourcesContent":["import { expectTypeOf, test } from 'vitest';\n\nimport type { HexStringIsTrimmed, StringWithoutSuffix } from './strings';\n\ntest('StringWithoutSuffix', () => {\n type A = StringWithoutSuffix<'hello', 'world'>;\n expectTypeOf<A>().toBeString();\n\n type B = StringWithoutSuffix<'hello', 'lo'>;\n expectTypeOf<B>().toBeNever();\n\n // Multiple suffixes test:\n type C = StringWithoutSuffix<'hello', 'lo' | 'world'>;\n expectTypeOf<C>().toBeNever();\n\n type D = StringWithoutSuffix<'hello world', 'lo' | 'world'>;\n expectTypeOf<D>().toBeNever();\n\n type E = StringWithoutSuffix<'hello world!', 'lo' | 'world'>;\n expectTypeOf<E>().toBeString();\n});\n\ntest('HexStringIsTrimmed', () => {\n type A = HexStringIsTrimmed<'0x0'>;\n expectTypeOf<A>().toExtend<true>();\n\n type B = HexStringIsTrimmed<'0x00'>;\n expectTypeOf<B>().toExtend<false>();\n\n type C = HexStringIsTrimmed<'0x'>;\n expectTypeOf<C>().toExtend<false>();\n});\n"]}
1
+ {"version":3,"sources":["../src/strings.test-d.ts"],"names":["init_cjs_shims","test","expectTypeOf","toBeString","toBeNever","toExtend"],"mappings":";;;;;;AAAAA,4BAAA,EAAA;AAIAC,iBAAAA,CAAK,uBAAuB,MAAA;AAExBC,EAAAA,IAAAA,+BAAAA,CAAAA,YAAAA,IAAkBC,UAAAA,EAAU;AAG5BD,EAAAA,IAAAA,+BAAAA,CAAAA,YAAAA,IAAkBE,SAAAA,EAAS;AAI3BF,EAAAA,IAAAA,+BAAAA,CAAAA,YAAAA,IAAkBE,SAAAA,EAAS;AAG3BF,EAAAA,IAAAA,+BAAAA,CAAAA,YAAAA,IAAkBE,SAAAA,EAAS;AAG3BF,EAAAA,IAAAA,+BAAAA,CAAAA,YAAAA,IAAkBC,UAAAA,EAAU;AAChC,CAAA,CAAA;AAEAF,iBAAAA,CAAK,sBAAsB,MAAA;AAEvBC,EAAAA,IAAAA,+BAAAA,CAAAA,YAAAA,IAAkBG,QAAAA,EAAQ;AAG1BH,EAAAA,IAAAA,+BAAAA,CAAAA,YAAAA,IAAkBG,QAAAA,EAAQ;AAG1BH,EAAAA,IAAAA,+BAAAA,CAAAA,YAAAA,IAAkBG,QAAAA,EAAQ;AAC9B,CAAA,CAAA","file":"strings.test-d.cjs","sourcesContent":["import { expectTypeOf, test } from 'vitest';\n\nimport type { HexStringIsTrimmed, StringWithoutSuffix } from './strings';\n\ntest('StringWithoutSuffix', () => {\n type A = StringWithoutSuffix<'hello', 'world'>;\n expectTypeOf<A>().toBeString();\n\n type B = StringWithoutSuffix<'hello', 'lo'>;\n expectTypeOf<B>().toBeNever();\n\n // Multiple suffixes test:\n type C = StringWithoutSuffix<'hello', 'lo' | 'world'>;\n expectTypeOf<C>().toBeNever();\n\n type D = StringWithoutSuffix<'hello world', 'lo' | 'world'>;\n expectTypeOf<D>().toBeNever();\n\n type E = StringWithoutSuffix<'hello world!', 'lo' | 'world'>;\n expectTypeOf<E>().toBeString();\n});\n\ntest('HexStringIsTrimmed', () => {\n type A = HexStringIsTrimmed<'0x0'>;\n expectTypeOf<A>().toExtend<true>();\n\n type B = HexStringIsTrimmed<'0x00'>;\n expectTypeOf<B>().toExtend<false>();\n\n type C = HexStringIsTrimmed<'0x'>;\n expectTypeOf<C>().toExtend<false>();\n});\n"]}
@@ -1,4 +1,4 @@
1
- import { test, import_expect_type } from './CI7BVOAG.js';
1
+ import { test, import_expect_type } from './QDQO2ODJ.js';
2
2
  import { init_esm_shims } from './6AHA7PAZ.js';
3
3
 
4
4
  // src/strings.test-d.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layerzerolabs/typescript-utils",
3
- "version": "0.2.65",
3
+ "version": "0.2.67",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -16,8 +16,8 @@
16
16
  "devDependencies": {
17
17
  "tsup": "^8.4.0",
18
18
  "vitest": "^3.2.3",
19
- "@layerzerolabs/tsup-configuration": "0.2.65",
20
- "@layerzerolabs/typescript-configuration": "0.2.65"
19
+ "@layerzerolabs/tsup-configuration": "0.2.67",
20
+ "@layerzerolabs/typescript-configuration": "0.2.67"
21
21
  },
22
22
  "publishConfig": {
23
23
  "access": "public",