ts-data-forge 6.9.3 → 6.9.5

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/dist/index.d.mts CHANGED
@@ -7,4 +7,5 @@ export * from './number/index.mjs';
7
7
  export * from './object/index.mjs';
8
8
  export * from './others/index.mjs';
9
9
  export * from './promise/index.mjs';
10
+ export * from './types.mjs';
10
11
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC"}
package/dist/types.d.mts CHANGED
@@ -1 +1,66 @@
1
- export * from './entry-point.mjs';
1
+ import { type IndexOfTuple, type IntersectBrand, type IsFixedLengthList, type NegativeIndexOfTuple, type NegativeInt32, type NormalizeBrandUnion, type PositiveInt, type PositiveNumber, type Primitive, type SafeInt, type SafeUint, type Uint32, type WithSmallInt } from 'ts-type-forge';
2
+ export type SmallPositiveInt = WithSmallInt<PositiveInt>;
3
+ /** Represents the type of keys that can be used in a standard JavaScript Map. */
4
+ export type MapSetKeyType = Primitive;
5
+ export type ArrayIndex<Ar extends readonly unknown[]> = IsFixedLengthList<Ar> extends true ? IndexOfTuple<Ar> : SizeType.Arr;
6
+ export type ArgArrayIndex<Ar extends readonly unknown[]> = IsFixedLengthList<Ar> extends true ? IndexOfTuple<Ar> : SizeType.ArgArr;
7
+ export type ArgArrayIndexWithNegative<Ar extends readonly unknown[]> = IsFixedLengthList<Ar> extends true ? IndexOfTuple<readonly [...Ar, 0]> | NegativeIndexOfTuple<Ar> : SizeType.ArgArrWithNegative;
8
+ export declare namespace SizeType {
9
+ type Arr = Uint32;
10
+ type TypedArray = SafeUint;
11
+ type Str = SafeUint;
12
+ type ArrSearchResult = Arr | -1;
13
+ type TypedArraySearchResult = TypedArray | -1;
14
+ type StrSearchResult = Str | -1;
15
+ type ArgArr = WithSmallInt<Arr>;
16
+ type ArgTypedArray = WithSmallInt<TypedArray>;
17
+ type ArgStr = WithSmallInt<Str>;
18
+ type ArgArrWithNegative = WithSmallInt<NormalizeBrandUnion<NegativeInt32 | Arr>>;
19
+ type ArgTypedArrayWithNegative = WithSmallInt<SafeInt>;
20
+ type ArgStrWithNegative = WithSmallInt<SafeInt>;
21
+ type ArgArrPositive = WithSmallInt<IntersectBrand<PositiveNumber, Arr>>;
22
+ type ArgTypedArrayPositive = WithSmallInt<IntersectBrand<PositiveNumber, TypedArray>>;
23
+ type ArgStrPositive = WithSmallInt<IntersectBrand<PositiveNumber, Str>>;
24
+ }
25
+ /**
26
+ * Represents the 'Some' variant of an Optional, containing a value.
27
+ *
28
+ * @template S The type of the contained value.
29
+ */
30
+ export type Some<S> = Readonly<{
31
+ /** @internal Discriminant property for the 'Some' type. */
32
+ $$tag: 'ts-data-forge::Optional.some';
33
+ /** The contained value. */
34
+ value: S;
35
+ }>;
36
+ /**
37
+ * Represents the 'None' variant of an Optional, indicating the absence
38
+ * of a value.
39
+ */
40
+ export type None = Readonly<{
41
+ /** @internal Discriminant property for the 'None' type. */
42
+ $$tag: 'ts-data-forge::Optional.none';
43
+ }>;
44
+ /**
45
+ * Represents a `Result` that is a success, containing a value.
46
+ *
47
+ * @template S The type of the success value.
48
+ */
49
+ export type Ok<S> = Readonly<{
50
+ /** @internal Discriminant property for the 'Ok' type. */
51
+ $$tag: 'ts-data-forge::Result.ok';
52
+ /** The success value. */
53
+ value: S;
54
+ }>;
55
+ /**
56
+ * Represents a `Result` that is an error, containing an error value.
57
+ *
58
+ * @template E The type of the error value.
59
+ */
60
+ export type Err<E> = Readonly<{
61
+ /** @internal Discriminant property for the 'Err' type. */
62
+ $$tag: 'ts-data-forge::Result.err';
63
+ /** The error value. */
64
+ value: E;
65
+ }>;
66
+ //# sourceMappingURL=types.d.mts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-data-forge",
3
- "version": "6.9.3",
3
+ "version": "6.9.5",
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/types.d.mts",
24
+ "types": "./dist/entry-point.d.mts",
25
25
  "default": "./dist/entry-point.mjs"
26
26
  }
27
27
  }
28
28
  },
29
29
  "module": "./dist/entry-point.mjs",
30
- "types": "./dist/types.d.mts",
30
+ "types": "./dist/entry-point.d.mts",
31
31
  "files": [
32
32
  "src",
33
33
  "dist",
@@ -82,8 +82,8 @@
82
82
  "z:vitest:node": "pnpm run z:vitest --project='Node.js'"
83
83
  },
84
84
  "dependencies": {
85
- "@sindresorhus/is": "^8.0.0",
86
- "ts-type-forge": "^3.0.0"
85
+ "@sindresorhus/is": "8.0.0",
86
+ "ts-type-forge": "3.0.0"
87
87
  },
88
88
  "devDependencies": {
89
89
  "@emotion/react": "11.14.0",
@@ -106,7 +106,7 @@
106
106
  "@vitest/ui": "4.1.5",
107
107
  "conventional-changelog-conventionalcommits": "9.3.1",
108
108
  "cspell": "10.0.0",
109
- "dedent": "^1.7.2",
109
+ "dedent": "1.7.2",
110
110
  "eslint": "9.39.4",
111
111
  "eslint-config-typed": "4.9.6",
112
112
  "github-settings-as-code": "1.2.7",
@@ -119,11 +119,11 @@
119
119
  "prettier": "3.8.3",
120
120
  "prettier-plugin-organize-imports": "4.3.0",
121
121
  "prettier-plugin-packagejson": "3.0.2",
122
- "react": "^19.2.5",
122
+ "react": "19.2.5",
123
123
  "rollup": "4.60.2",
124
124
  "semantic-release": "25.0.3",
125
- "ts-codemod-lib": "^2.1.4",
126
- "ts-repo-utils": "10.0.0",
125
+ "ts-codemod-lib": "2.1.4",
126
+ "ts-repo-utils": "10.0.1",
127
127
  "tslib": "2.8.1",
128
128
  "tsx": "4.21.0",
129
129
  "typedoc": "0.28.19",
package/src/index.mts CHANGED
@@ -7,3 +7,4 @@ export * from './number/index.mjs';
7
7
  export * from './object/index.mjs';
8
8
  export * from './others/index.mjs';
9
9
  export * from './promise/index.mjs';
10
+ export * from './types.mjs';
@@ -1 +0,0 @@
1
- {"include":["."]}