@jakubmazanec/ts-utils 3.0.4 → 3.0.5-unstable.1be6df9

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/build/main.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './types.js';
1
+ export type * from './types.js';
2
2
  export * from './utils.js';
package/build/main.js CHANGED
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
- export * from "./types.js";
3
2
  export * from "./utils.js";
4
3
  //# sourceMappingURL=main.js.map
package/build/main.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../source/main.ts"],
4
- "sourcesContent": ["export * from './types.js';\nexport * from './utils.js';\n"],
5
- "mappings": ";AAAA,cAAc;AACd,cAAc;",
4
+ "sourcesContent": ["export type * from './types.js';\nexport * from './utils.js';\n"],
5
+ "mappings": ";AACA,cAAc;",
6
6
  "names": []
7
7
  }
@@ -14,4 +14,4 @@
14
14
  *
15
15
  * @typeParam T Base for the new type
16
16
  */
17
- export type Parameters<T extends '' | false | ((...args: any[]) => any) | null | undefined> = T extends (...args: infer P) => any ? P : never;
17
+ export type Parameters<T extends ((...args: any[]) => any) | '' | false | null | undefined> = T extends (...args: infer P) => any ? P : never;
@@ -15,4 +15,4 @@
15
15
  *
16
16
  * @typeParam T Base for the new type
17
17
  */
18
- export type ReturnType<T extends '' | false | ((...args: any[]) => any) | null | undefined> = T extends (...args: any[]) => infer R ? R extends PromiseLike<infer J> ? J : R : never;
18
+ export type ReturnType<T extends ((...args: any[]) => any) | '' | false | null | undefined> = T extends (...args: any[]) => infer R ? R extends PromiseLike<infer J> ? J : R : never;
package/build/types.d.ts CHANGED
@@ -1,17 +1,17 @@
1
- export * from './types/AtLeastOneRequired.js';
2
- export * from './types/DeepPartial.js';
3
- export * from './types/DeepReadonly.js';
4
- export * from './types/If.js';
5
- export * from './types/IsEqual.js';
6
- export * from './types/LiteralUnion.js';
7
- export * from './types/NonArray.js';
8
- export * from './types/NonArrayLike.js';
9
- export * from './types/OptionalKeys.js';
10
- export * from './types/Parameters.js';
11
- export * from './types/Primitive.js';
12
- export * from './types/RequiredKeys.js';
13
- export * from './types/ReturnType.js';
14
- export * from './types/Simplify.js';
15
- export * from './types/TupleToUnion.js';
16
- export * from './types/UnionToIntersection.js';
17
- export * from './types/Writable.js';
1
+ export type * from './types/AtLeastOneRequired.js';
2
+ export type * from './types/DeepPartial.js';
3
+ export type * from './types/DeepReadonly.js';
4
+ export type * from './types/If.js';
5
+ export type * from './types/IsEqual.js';
6
+ export type * from './types/LiteralUnion.js';
7
+ export type * from './types/NonArray.js';
8
+ export type * from './types/NonArrayLike.js';
9
+ export type * from './types/OptionalKeys.js';
10
+ export type * from './types/Parameters.js';
11
+ export type * from './types/Primitive.js';
12
+ export type * from './types/RequiredKeys.js';
13
+ export type * from './types/ReturnType.js';
14
+ export type * from './types/Simplify.js';
15
+ export type * from './types/TupleToUnion.js';
16
+ export type * from './types/UnionToIntersection.js';
17
+ export type * from './types/Writable.js';
package/build/types.js CHANGED
@@ -1,19 +1,2 @@
1
1
  "use strict";
2
- export * from "./types/AtLeastOneRequired.js";
3
- export * from "./types/DeepPartial.js";
4
- export * from "./types/DeepReadonly.js";
5
- export * from "./types/If.js";
6
- export * from "./types/IsEqual.js";
7
- export * from "./types/LiteralUnion.js";
8
- export * from "./types/NonArray.js";
9
- export * from "./types/NonArrayLike.js";
10
- export * from "./types/OptionalKeys.js";
11
- export * from "./types/Parameters.js";
12
- export * from "./types/Primitive.js";
13
- export * from "./types/RequiredKeys.js";
14
- export * from "./types/ReturnType.js";
15
- export * from "./types/Simplify.js";
16
- export * from "./types/TupleToUnion.js";
17
- export * from "./types/UnionToIntersection.js";
18
- export * from "./types/Writable.js";
19
2
  //# sourceMappingURL=types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../source/types.ts"],
4
- "sourcesContent": ["export * from './types/AtLeastOneRequired.js';\nexport * from './types/DeepPartial.js';\nexport * from './types/DeepReadonly.js';\nexport * from './types/If.js';\nexport * from './types/IsEqual.js';\nexport * from './types/LiteralUnion.js';\nexport * from './types/NonArray.js';\nexport * from './types/NonArrayLike.js';\nexport * from './types/OptionalKeys.js';\nexport * from './types/Parameters.js';\nexport * from './types/Primitive.js';\nexport * from './types/RequiredKeys.js';\nexport * from './types/ReturnType.js';\nexport * from './types/Simplify.js';\nexport * from './types/TupleToUnion.js';\nexport * from './types/UnionToIntersection.js';\nexport * from './types/Writable.js';\n"],
5
- "mappings": ";AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../source/utils/tuple.ts"],
4
- "sourcesContent": ["import {type Primitive} from '../types.js';\n\n// eslint-disable-next-line @typescript-eslint/ban-types -- this is intended\nexport function tuple<T extends Array<Primitive | {}>>(...values: T) {\n return values;\n}\n"],
4
+ "sourcesContent": ["import {type Primitive} from '../types.js';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type -- this is intended\nexport function tuple<T extends Array<Primitive | {}>>(...values: T) {\n return values;\n}\n"],
5
5
  "mappings": ";AAGO,gBAAS,SAA0C,QAAW;AACnE,SAAO;AACT;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jakubmazanec/ts-utils",
3
- "version": "3.0.4",
3
+ "version": "3.0.5-unstable.1be6df9",
4
4
  "description": "Collection of TypeScript types and utilities.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,21 +27,21 @@
27
27
  "typecheck": "tsc --project tsconfig.typecheck.json"
28
28
  },
29
29
  "devDependencies": {
30
- "@jakubmazanec/eslint-config": "^3.2.0",
30
+ "@jakubmazanec/eslint-config": "4.0.0-unstable.1be6df9",
31
31
  "@types/lodash": "^4.17.13",
32
32
  "@types/node": "^22.9.0",
33
- "@vitest/coverage-v8": "^2.1.4",
33
+ "@vitest/coverage-v8": "^2.1.5",
34
34
  "concurrently": "^9.1.0",
35
35
  "del-cli": "^6.0.0",
36
36
  "esbuild": "^0.24.0",
37
- "eslint": "^8.56.0",
37
+ "eslint": "^9.15.0",
38
38
  "lodash": "^4.17.21",
39
39
  "prettier": "^3.3.3",
40
40
  "prettier-plugin-packagejson": "^2.5.3",
41
41
  "typedoc": "^0.26.11",
42
42
  "typedoc-plugin-markdown": "^4.2.10",
43
43
  "typescript": "^5.6.3",
44
- "vitest": "^2.1.4"
44
+ "vitest": "^2.1.5"
45
45
  },
46
46
  "packageManager": "npm@10.9.0",
47
47
  "engines": {
package/source/main.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './types.js';
1
+ export type * from './types.js';
2
2
  export * from './utils.js';
@@ -1,4 +1,4 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-empty-interface -- needed */
1
+ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-empty-object-type -- needed */
2
2
 
3
3
  import {type Primitive} from './Primitive.js';
4
4
 
@@ -16,5 +16,5 @@
16
16
  *
17
17
  * @typeParam T Base for the new type
18
18
  */
19
- export type Parameters<T extends '' | false | ((...args: any[]) => any) | null | undefined> =
19
+ export type Parameters<T extends ((...args: any[]) => any) | '' | false | null | undefined> =
20
20
  T extends (...args: infer P) => any ? P : never;
@@ -17,7 +17,7 @@
17
17
  *
18
18
  * @typeParam T Base for the new type
19
19
  */
20
- export type ReturnType<T extends '' | false | ((...args: any[]) => any) | null | undefined> =
20
+ export type ReturnType<T extends ((...args: any[]) => any) | '' | false | null | undefined> =
21
21
  T extends (...args: any[]) => infer R ?
22
22
  R extends PromiseLike<infer J> ?
23
23
  J
package/source/types.ts CHANGED
@@ -1,17 +1,17 @@
1
- export * from './types/AtLeastOneRequired.js';
2
- export * from './types/DeepPartial.js';
3
- export * from './types/DeepReadonly.js';
4
- export * from './types/If.js';
5
- export * from './types/IsEqual.js';
6
- export * from './types/LiteralUnion.js';
7
- export * from './types/NonArray.js';
8
- export * from './types/NonArrayLike.js';
9
- export * from './types/OptionalKeys.js';
10
- export * from './types/Parameters.js';
11
- export * from './types/Primitive.js';
12
- export * from './types/RequiredKeys.js';
13
- export * from './types/ReturnType.js';
14
- export * from './types/Simplify.js';
15
- export * from './types/TupleToUnion.js';
16
- export * from './types/UnionToIntersection.js';
17
- export * from './types/Writable.js';
1
+ export type * from './types/AtLeastOneRequired.js';
2
+ export type * from './types/DeepPartial.js';
3
+ export type * from './types/DeepReadonly.js';
4
+ export type * from './types/If.js';
5
+ export type * from './types/IsEqual.js';
6
+ export type * from './types/LiteralUnion.js';
7
+ export type * from './types/NonArray.js';
8
+ export type * from './types/NonArrayLike.js';
9
+ export type * from './types/OptionalKeys.js';
10
+ export type * from './types/Parameters.js';
11
+ export type * from './types/Primitive.js';
12
+ export type * from './types/RequiredKeys.js';
13
+ export type * from './types/ReturnType.js';
14
+ export type * from './types/Simplify.js';
15
+ export type * from './types/TupleToUnion.js';
16
+ export type * from './types/UnionToIntersection.js';
17
+ export type * from './types/Writable.js';
@@ -1,6 +1,6 @@
1
1
  import {type Primitive} from '../types.js';
2
2
 
3
- // eslint-disable-next-line @typescript-eslint/ban-types -- this is intended
3
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type -- this is intended
4
4
  export function tuple<T extends Array<Primitive | {}>>(...values: T) {
5
5
  return values;
6
6
  }