ts-data-forge 2.0.2 → 2.0.3

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.
@@ -0,0 +1,27 @@
1
+ import 'ts-type-forge';
2
+ export * from './index.mjs';
3
+ declare global {
4
+ type SmallPositiveInt = WithSmallInt<PositiveInt>;
5
+ /**
6
+ * Represents the type of keys that can be used in a standard JavaScript Map.
7
+ */
8
+ type MapSetKeyType = Primitive;
9
+ namespace SizeType {
10
+ type Arr = Uint32;
11
+ type TypedArray = SafeUint;
12
+ type Str = SafeUint;
13
+ type ArrSearchResult = Arr | -1;
14
+ type TypedArraySearchResult = TypedArray | -1;
15
+ type StrSearchResult = Str | -1;
16
+ type ArgArr = WithSmallInt<Arr>;
17
+ type ArgTypedArray = WithSmallInt<TypedArray>;
18
+ type ArgStr = WithSmallInt<Str>;
19
+ type ArgArrWithNegative = WithSmallInt<NormalizeBrandUnion<NegativeInt32 | Arr>>;
20
+ type ArgTypedArrayWithNegative = WithSmallInt<SafeInt>;
21
+ type ArgStrWithNegative = WithSmallInt<SafeInt>;
22
+ type ArgArrPositive = WithSmallInt<IntersectBrand<PositiveNumber, Arr>>;
23
+ type ArgTypedArrayPositive = WithSmallInt<IntersectBrand<PositiveNumber, TypedArray>>;
24
+ type ArgStrPositive = WithSmallInt<IntersectBrand<PositiveNumber, Str>>;
25
+ }
26
+ }
27
+ //# sourceMappingURL=entry-point.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-point.d.mts","sourceRoot":"","sources":["../src/entry-point.mts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAEvB,cAAc,aAAa,CAAC;AAE5B,OAAO,CAAC,MAAM,CAAC;IACb,KAAK,gBAAgB,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;IAElD;;OAEG;IACH,KAAK,aAAa,GAAG,SAAS,CAAC;IAO/B,UAAU,QAAQ,CAAC;QACjB,KAAK,GAAG,GAAG,MAAM,CAAC;QAClB,KAAK,UAAU,GAAG,QAAQ,CAAC;QAC3B,KAAK,GAAG,GAAG,QAAQ,CAAC;QAEpB,KAAK,eAAe,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC;QAChC,KAAK,sBAAsB,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC;QAC9C,KAAK,eAAe,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC;QAEhC,KAAK,MAAM,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;QAChC,KAAK,aAAa,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;QAC9C,KAAK,MAAM,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;QAEhC,KAAK,kBAAkB,GAAG,YAAY,CACpC,mBAAmB,CAAC,aAAa,GAAG,GAAG,CAAC,CACzC,CAAC;QACF,KAAK,yBAAyB,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;QACvD,KAAK,kBAAkB,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;QAEhD,KAAK,cAAc,GAAG,YAAY,CAAC,cAAc,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC,CAAC;QACxE,KAAK,qBAAqB,GAAG,YAAY,CACvC,cAAc,CAAC,cAAc,EAAE,UAAU,CAAC,CAC3C,CAAC;QACF,KAAK,cAAc,GAAG,YAAY,CAAC,cAAc,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC,CAAC;KACzE;CACF"}
@@ -0,0 +1,62 @@
1
+ import 'ts-type-forge';
2
+ export { Arr } from './array/array-utils.mjs';
3
+ export { IMapMapped } from './collections/imap-mapped.mjs';
4
+ export { IMap } from './collections/imap.mjs';
5
+ export { ISetMapped } from './collections/iset-mapped.mjs';
6
+ export { ISet } from './collections/iset.mjs';
7
+ export { createQueue } from './collections/queue.mjs';
8
+ export { createStack } from './collections/stack.mjs';
9
+ export { expectType } from './expect-type.mjs';
10
+ export { match } from './functional/match.mjs';
11
+ export { Optional } from './functional/optional.mjs';
12
+ export { pipe } from './functional/pipe.mjs';
13
+ export { Result } from './functional/result.mjs';
14
+ export { hasKey } from './guard/has-key.mjs';
15
+ export { isNonEmptyString } from './guard/is-non-empty-string.mjs';
16
+ export { isNonNullObject } from './guard/is-non-null-object.mjs';
17
+ export { isPrimitive } from './guard/is-primitive.mjs';
18
+ export { isRecord } from './guard/is-record.mjs';
19
+ export { isBigint, isBoolean, isNonNullish, isNotBigint, isNotBoolean, isNotNull, isNotNumber, isNotString, isNotSymbol, isNotUndefined, isNull, isNullish, isNumber, isString, isSymbol, isUndefined } from './guard/is-type.mjs';
20
+ export { keyIsIn } from './guard/key-is-in.mjs';
21
+ export { range } from './iterator/range.mjs';
22
+ export { Json } from './json/json.mjs';
23
+ export { FiniteNumber, asFiniteNumber, isFiniteNumber } from './number/branded-types/finite-number.mjs';
24
+ export { Int, asInt, isInt } from './number/branded-types/int.mjs';
25
+ export { Int16, asInt16, isInt16 } from './number/branded-types/int16.mjs';
26
+ export { Int32, asInt32, isInt32 } from './number/branded-types/int32.mjs';
27
+ export { NonNegativeFiniteNumber, asNonNegativeFiniteNumber, isNonNegativeFiniteNumber } from './number/branded-types/non-negative-finite-number.mjs';
28
+ export { NonNegativeInt16, asNonNegativeInt16, isNonNegativeInt16 } from './number/branded-types/non-negative-int16.mjs';
29
+ export { NonNegativeInt32, asNonNegativeInt32, isNonNegativeInt32 } from './number/branded-types/non-negative-int32.mjs';
30
+ export { NonZeroFiniteNumber, asNonZeroFiniteNumber, isNonZeroFiniteNumber } from './number/branded-types/non-zero-finite-number.mjs';
31
+ export { NonZeroInt, asNonZeroInt, isNonZeroInt } from './number/branded-types/non-zero-int.mjs';
32
+ export { NonZeroInt16, asNonZeroInt16, isNonZeroInt16 } from './number/branded-types/non-zero-int16.mjs';
33
+ export { NonZeroInt32, asNonZeroInt32, isNonZeroInt32 } from './number/branded-types/non-zero-int32.mjs';
34
+ export { NonZeroSafeInt, asNonZeroSafeInt, isNonZeroSafeInt } from './number/branded-types/non-zero-safe-int.mjs';
35
+ export { NonZeroUint16, asNonZeroUint16, isNonZeroUint16 } from './number/branded-types/non-zero-uint16.mjs';
36
+ export { NonZeroUint32, asNonZeroUint32, isNonZeroUint32 } from './number/branded-types/non-zero-uint32.mjs';
37
+ export { PositiveFiniteNumber, asPositiveFiniteNumber, isPositiveFiniteNumber } from './number/branded-types/positive-finite-number.mjs';
38
+ export { PositiveInt, asPositiveInt, isPositiveInt } from './number/branded-types/positive-int.mjs';
39
+ export { PositiveInt16, asPositiveInt16, isPositiveInt16 } from './number/branded-types/positive-int16.mjs';
40
+ export { PositiveInt32, asPositiveInt32, isPositiveInt32 } from './number/branded-types/positive-int32.mjs';
41
+ export { PositiveSafeInt, asPositiveSafeInt, isPositiveSafeInt } from './number/branded-types/positive-safe-int.mjs';
42
+ export { PositiveUint16, asPositiveUint16, isPositiveUint16 } from './number/branded-types/positive-uint16.mjs';
43
+ export { PositiveUint32, asPositiveUint32, isPositiveUint32 } from './number/branded-types/positive-uint32.mjs';
44
+ export { SafeInt, asSafeInt, isSafeInt } from './number/branded-types/safe-int.mjs';
45
+ export { SafeUint, asSafeUint, isSafeUint } from './number/branded-types/safe-uint.mjs';
46
+ export { Uint, asUint, isUint } from './number/branded-types/uint.mjs';
47
+ export { Uint16, asUint16, isUint16 } from './number/branded-types/uint16.mjs';
48
+ export { Uint32, asUint32, isUint32 } from './number/branded-types/uint32.mjs';
49
+ export { Int8, asInt8, isInt8 } from './number/enum/int8.mjs';
50
+ export { Uint8, asUint8, isUint8 } from './number/enum/uint8.mjs';
51
+ export { Num } from './number/num.mjs';
52
+ export { TsDataForgeInternals } from './number/refined-number-utils.mjs';
53
+ export { Obj } from './object/object.mjs';
54
+ export { castDeepMutable, castMutable } from './others/cast-mutable.mjs';
55
+ export { castDeepReadonly, castReadonly } from './others/cast-readonly.mjs';
56
+ export { ifThen } from './others/if-then.mjs';
57
+ export { mapNullable } from './others/map-nullable.mjs';
58
+ export { memoizeFunction } from './others/memoize-function.mjs';
59
+ export { tp } from './others/tuple.mjs';
60
+ export { unknownToString } from './others/unknown-to-string.mjs';
61
+ export { createPromise } from './promise/promise.mjs';
62
+ //# sourceMappingURL=entry-point.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-point.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-data-forge",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "private": false,
5
5
  "keywords": [
6
6
  "typescript",
@@ -21,13 +21,13 @@
21
21
  "exports": {
22
22
  ".": {
23
23
  "import": {
24
- "types": "./dist/index.d.mts",
25
- "default": "./dist/index.mjs"
24
+ "types": "./dist/entry-point.d.mts",
25
+ "default": "./dist/entry-point.mjs"
26
26
  }
27
27
  }
28
28
  },
29
- "module": "./dist/index.js",
30
- "types": "./dist/index.d.ts",
29
+ "module": "./dist/entry-point.js",
30
+ "types": "./dist/entry-point.d.ts",
31
31
  "files": [
32
32
  "src",
33
33
  "dist",
@@ -69,7 +69,7 @@
69
69
  "devDependencies": {
70
70
  "@emotion/react": "^11.14.0",
71
71
  "@emotion/styled": "^11.14.1",
72
- "@eslint/js": "^9.30.0",
72
+ "@eslint/js": "^9.31.0",
73
73
  "@mui/material": "^7.2.0",
74
74
  "@rollup/plugin-replace": "^6.0.2",
75
75
  "@rollup/plugin-strip": "^3.0.4",
@@ -81,7 +81,7 @@
81
81
  "@semantic-release/github": "^11.0.3",
82
82
  "@semantic-release/npm": "^12.0.2",
83
83
  "@semantic-release/release-notes-generator": "^14.0.3",
84
- "@types/node": "^20.19.4",
84
+ "@types/node": "^20.19.7",
85
85
  "@vitest/coverage-v8": "^3.2.4",
86
86
  "@vitest/ui": "^3.2.4",
87
87
  "conventional-changelog-conventionalcommits": "^9.0.0",
@@ -93,14 +93,14 @@
93
93
  "prettier": "^3.5.3",
94
94
  "prettier-plugin-organize-imports": "^4.1.0",
95
95
  "prettier-plugin-packagejson": "^2.5.18",
96
- "rollup": "^4.44.2",
97
- "semantic-release": "^24.2.6",
98
- "ts-repo-utils": "^3.0.1",
96
+ "rollup": "^4.45.0",
97
+ "semantic-release": "^24.2.7",
98
+ "ts-repo-utils": "^3.1.1",
99
99
  "tsx": "^4.20.3",
100
100
  "typedoc": "^0.28.7",
101
101
  "typedoc-plugin-markdown": "^4.7.0",
102
102
  "typescript": "^5.8.3",
103
- "typescript-eslint": "^8.35.1",
103
+ "typescript-eslint": "^8.36.0",
104
104
  "vitest": "^3.2.4"
105
105
  },
106
106
  "peerDependencies": {
@@ -0,0 +1,43 @@
1
+ import 'ts-type-forge';
2
+
3
+ export * from './index.mjs';
4
+
5
+ declare global {
6
+ type SmallPositiveInt = WithSmallInt<PositiveInt>;
7
+
8
+ /**
9
+ * Represents the type of keys that can be used in a standard JavaScript Map.
10
+ */
11
+ type MapSetKeyType = Primitive;
12
+
13
+ // https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Array/length
14
+ // https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/String/length
15
+ // Max array length : 2^32 - 1
16
+ // Max string length : 2^53 - 1
17
+
18
+ namespace SizeType {
19
+ type Arr = Uint32;
20
+ type TypedArray = SafeUint;
21
+ type Str = SafeUint;
22
+
23
+ type ArrSearchResult = Arr | -1;
24
+ type TypedArraySearchResult = TypedArray | -1;
25
+ type StrSearchResult = Str | -1;
26
+
27
+ type ArgArr = WithSmallInt<Arr>;
28
+ type ArgTypedArray = WithSmallInt<TypedArray>;
29
+ type ArgStr = WithSmallInt<Str>;
30
+
31
+ type ArgArrWithNegative = WithSmallInt<
32
+ NormalizeBrandUnion<NegativeInt32 | Arr>
33
+ >;
34
+ type ArgTypedArrayWithNegative = WithSmallInt<SafeInt>;
35
+ type ArgStrWithNegative = WithSmallInt<SafeInt>;
36
+
37
+ type ArgArrPositive = WithSmallInt<IntersectBrand<PositiveNumber, Arr>>;
38
+ type ArgTypedArrayPositive = WithSmallInt<
39
+ IntersectBrand<PositiveNumber, TypedArray>
40
+ >;
41
+ type ArgStrPositive = WithSmallInt<IntersectBrand<PositiveNumber, Str>>;
42
+ }
43
+ }
@@ -1,39 +0,0 @@
1
- /// <reference types="ts-type-forge" />
2
-
3
- type SmallPositiveInt = WithSmallInt<PositiveInt>;
4
-
5
- /**
6
- * Represents the type of keys that can be used in a standard JavaScript Map.
7
- */
8
- type MapSetKeyType = Primitive;
9
-
10
- // https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Array/length
11
- // https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/String/length
12
- // Max array length : 2^32 - 1
13
- // Max string length : 2^53 - 1
14
-
15
- declare namespace SizeType {
16
- type Arr = Uint32;
17
- type TypedArray = SafeUint;
18
- type Str = SafeUint;
19
-
20
- type ArrSearchResult = Arr | -1;
21
- type TypedArraySearchResult = TypedArray | -1;
22
- type StrSearchResult = Str | -1;
23
-
24
- type ArgArr = WithSmallInt<Arr>;
25
- type ArgTypedArray = WithSmallInt<TypedArray>;
26
- type ArgStr = WithSmallInt<Str>;
27
-
28
- type ArgArrWithNegative = WithSmallInt<
29
- NormalizeBrandUnion<NegativeInt32 | Arr>
30
- >;
31
- type ArgTypedArrayWithNegative = WithSmallInt<SafeInt>;
32
- type ArgStrWithNegative = WithSmallInt<SafeInt>;
33
-
34
- type ArgArrPositive = WithSmallInt<IntersectBrand<PositiveNumber, Arr>>;
35
- type ArgTypedArrayPositive = WithSmallInt<
36
- IntersectBrand<PositiveNumber, TypedArray>
37
- >;
38
- type ArgStrPositive = WithSmallInt<IntersectBrand<PositiveNumber, Str>>;
39
- }
package/src/globals.d.mts DELETED
@@ -1,39 +0,0 @@
1
- /// <reference types="ts-type-forge" />
2
-
3
- type SmallPositiveInt = WithSmallInt<PositiveInt>;
4
-
5
- /**
6
- * Represents the type of keys that can be used in a standard JavaScript Map.
7
- */
8
- type MapSetKeyType = Primitive;
9
-
10
- // https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Array/length
11
- // https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/String/length
12
- // Max array length : 2^32 - 1
13
- // Max string length : 2^53 - 1
14
-
15
- declare namespace SizeType {
16
- type Arr = Uint32;
17
- type TypedArray = SafeUint;
18
- type Str = SafeUint;
19
-
20
- type ArrSearchResult = Arr | -1;
21
- type TypedArraySearchResult = TypedArray | -1;
22
- type StrSearchResult = Str | -1;
23
-
24
- type ArgArr = WithSmallInt<Arr>;
25
- type ArgTypedArray = WithSmallInt<TypedArray>;
26
- type ArgStr = WithSmallInt<Str>;
27
-
28
- type ArgArrWithNegative = WithSmallInt<
29
- NormalizeBrandUnion<NegativeInt32 | Arr>
30
- >;
31
- type ArgTypedArrayWithNegative = WithSmallInt<SafeInt>;
32
- type ArgStrWithNegative = WithSmallInt<SafeInt>;
33
-
34
- type ArgArrPositive = WithSmallInt<IntersectBrand<PositiveNumber, Arr>>;
35
- type ArgTypedArrayPositive = WithSmallInt<
36
- IntersectBrand<PositiveNumber, TypedArray>
37
- >;
38
- type ArgStrPositive = WithSmallInt<IntersectBrand<PositiveNumber, Str>>;
39
- }