@jakubmazanec/ts-utils 3.0.19-unstable.f50b9d9c → 3.0.19

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/README.md CHANGED
@@ -21,7 +21,7 @@ It cannot be required from a CommonJS module.
21
21
  #### Prerequisites
22
22
 
23
23
  - Node.js 24 or later
24
- - TypeScript 5 or later
24
+ - TypeScript 6 or later
25
25
 
26
26
  <!-- prerequisites -->
27
27
 
package/build/main.js CHANGED
@@ -1,3 +1,2 @@
1
- "use strict";
2
1
  export * from "./utils.js";
3
2
  //# sourceMappingURL=main.js.map
package/build/main.js.map CHANGED
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../source/main.ts"],
4
4
  "sourcesContent": ["export type * from './types.js';\nexport * from './utils.js';\n"],
5
- "mappings": ";AACA,cAAc;",
5
+ "mappings": "AACA,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,2 +1 @@
1
- "use strict";
2
1
  //# sourceMappingURL=AtLeastOneRequired.js.map
@@ -1,2 +1 @@
1
- "use strict";
2
1
  //# sourceMappingURL=DeepPartial.js.map
@@ -1,2 +1 @@
1
- "use strict";
2
1
  //# sourceMappingURL=DeepReadonly.js.map
package/build/types/If.js CHANGED
@@ -1,2 +1 @@
1
- "use strict";
2
1
  //# sourceMappingURL=If.js.map
@@ -1,2 +1 @@
1
- "use strict";
2
1
  //# sourceMappingURL=IsEqual.js.map
@@ -1,2 +1 @@
1
- "use strict";
2
1
  //# sourceMappingURL=LiteralUnion.js.map
@@ -1,2 +1 @@
1
- "use strict";
2
1
  //# sourceMappingURL=NonArray.js.map
@@ -1,2 +1 @@
1
- "use strict";
2
1
  //# sourceMappingURL=NonArrayLike.js.map
@@ -1,2 +1 @@
1
- "use strict";
2
1
  //# sourceMappingURL=OptionalKeys.js.map
@@ -1,2 +1 @@
1
- "use strict";
2
1
  //# sourceMappingURL=Parameters.js.map
@@ -1,2 +1 @@
1
- "use strict";
2
1
  //# sourceMappingURL=Primitive.js.map
@@ -1,2 +1 @@
1
- "use strict";
2
1
  //# sourceMappingURL=RequiredKeys.js.map
@@ -1,2 +1 @@
1
- "use strict";
2
1
  //# sourceMappingURL=ReturnType.js.map
@@ -1,2 +1 @@
1
- "use strict";
2
1
  //# sourceMappingURL=Simplify.js.map
@@ -1,2 +1 @@
1
- "use strict";
2
1
  //# sourceMappingURL=TupleToUnion.js.map
@@ -1,2 +1 @@
1
- "use strict";
2
1
  //# sourceMappingURL=UnionToIntersection.js.map
@@ -1,2 +1 @@
1
- "use strict";
2
1
  //# sourceMappingURL=Writable.js.map
package/build/types.js CHANGED
@@ -1,2 +1 @@
1
- "use strict";
2
1
  //# sourceMappingURL=types.js.map
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  export class AssertionError extends Error {
3
2
  name = "AssertionError";
4
3
  /**
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../source/utils/assert.ts"],
4
4
  "sourcesContent": ["/**\n * A subclass of `Error` that indicates an assertion failure.\n */\nexport class AssertionError extends Error {\n override name = 'AssertionError';\n\n /**\n * @param message Message added to the default error message\n */\n constructor(message?: string) {\n super(`Wrong assertion encountered${message ? `: \"${message}\"` : ''}!`);\n }\n}\n\n/**\n * A function that throws {@link AssertionError} (with optional message defined with `errorMessage`) if\n * `condition` is falsy.\n * You can use it to narrow types:\n *\n * ```TypeScript\n * interface Foo {\n * kind: 'Foo';\n * }\n *\n * interface Bar {\n * kind: 'Bar';\n * }\n *\n * declare const foobar: Foo | Bar;\n *\n * assert(is<Foo>(foobar, foobar.kind === 'Foo'));\n *\n * // `typeof foobar` is now `Foo`\n * ```\n *\n * @param condition Condition we're asserting isn't falsy\n * @param errorMessage Message for the `AssertionError`\n */\nexport function assert(condition: unknown, errorMessage?: string): asserts condition {\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions -- we don't mind here\n if (!condition) {\n throw new AssertionError(errorMessage);\n }\n}\n"],
5
- "mappings": ";AAGO,aAAM,uBAAuB,MAAM;AAAA,EAC/B,OAAO;AAAA;AAAA;AAAA;AAAA,EAKhB,YAAY,SAAkB;AAC5B,UAAM,8BAA8B,UAAU,MAAM,OAAO,MAAM,EAAE,GAAG;AAAA,EACxE;AACF;AA0BO,gBAAS,OAAO,WAAoB,cAA0C;AAEnF,MAAI,CAAC,WAAW;AACd,UAAM,IAAI,eAAe,YAAY;AAAA,EACvC;AACF;",
5
+ "mappings": "AAGO,aAAM,uBAAuB,MAAM;AAAA,EAC/B,OAAO;AAAA;AAAA;AAAA;AAAA,EAKhB,YAAY,SAAkB;AAC5B,UAAM,8BAA8B,UAAU,MAAM,OAAO,MAAM,EAAE,GAAG;AAAA,EACxE;AACF;AA0BO,gBAAS,OAAO,WAAoB,cAA0C;AAEnF,MAAI,CAAC,WAAW;AACd,UAAM,IAAI,eAAe,YAAY;AAAA,EACvC;AACF;",
6
6
  "names": []
7
7
  }
package/build/utils/is.js CHANGED
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  export function is(value, isMatched) {
3
2
  return isMatched;
4
3
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../source/utils/is.ts"],
4
4
  "sourcesContent": ["/**\n * A generic type guard. If `isMatched` is `true`, TypeScript assumes `value` is of type `T`.\n * You can use it to narrow types:\n *\n * ```TypeScript\n * interface Foo {\n * value: string;\n * }\n *\n * interface Bar {\n * value: number;\n * }\n *\n * declare let foobar: Foo | Bar;\n *\n * if (is<Foo>(foobar, typeof foobar.value === 'string')) {\n * // `typeof foobar` is now `Foo`\n * } else {\n * // `typeof foobar` is now `Bar`\n * }\n * ```\n *\n * @typeParam T Potential type of `value`\n * @param value Value being checked\n * @param isMatched Specifies if `value` is of type `T`\n * @return Value of `isMatched`\n */\nexport function is<T>(value: unknown, isMatched: boolean): value is T {\n return isMatched;\n}\n"],
5
- "mappings": ";AA2BO,gBAAS,GAAM,OAAgB,WAAgC;AACpE,SAAO;AACT;",
5
+ "mappings": "AA2BO,gBAAS,GAAM,OAAgB,WAAgC;AACpE,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  export function isNonNullable(value) {
3
2
  return value !== void 0 && value !== null;
4
3
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../source/utils/isNonNullable.ts"],
4
4
  "sourcesContent": ["/**\n * A type guard that checks whether variable is not `null` or `undefined`:\n *\n * ```TypeScript\n * declare let foobar: string | null;\n *\n * if (isNonNullable(foobar)) {\n * // `typeof foobar` is now `string`\n * } else {\n * // `typeof foobar` is now `null`\n * }\n * ```\n *\n * @typeParam T Type of `value`\n * @param value Value being checked\n * @return `true` if `value` is non-nullable\n */\nexport function isNonNullable<T>(value: T): value is NonNullable<T> {\n return value !== undefined && value !== null;\n}\n"],
5
- "mappings": ";AAiBO,gBAAS,cAAiB,OAAmC;AAClE,SAAO,UAAU,UAAa,UAAU;AAC1C;",
5
+ "mappings": "AAiBO,gBAAS,cAAiB,OAAmC;AAClE,SAAO,UAAU,UAAa,UAAU;AAC1C;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  export function tuple(...values) {
3
2
  return values;
4
3
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../source/utils/tuple.ts"],
4
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
- "mappings": ";AAGO,gBAAS,SAA0C,QAAW;AACnE,SAAO;AACT;",
5
+ "mappings": "AAGO,gBAAS,SAA0C,QAAW;AACnE,SAAO;AACT;",
6
6
  "names": []
7
7
  }
package/build/utils.js CHANGED
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  export * from "./utils/assert.js";
3
2
  export * from "./utils/is.js";
4
3
  export * from "./utils/isNonNullable.js";
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../source/utils.ts"],
4
4
  "sourcesContent": ["export * from './utils/assert.js';\nexport * from './utils/is.js';\nexport * from './utils/isNonNullable.js';\nexport * from './utils/tuple.js';\n"],
5
- "mappings": ";AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
5
+ "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
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.19-unstable.f50b9d9c",
3
+ "version": "3.0.19",
4
4
  "description": "Collection of TypeScript types and utilities.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,11 +27,11 @@
27
27
  "typecheck": "tsc --project tsconfig.typecheck.json"
28
28
  },
29
29
  "devDependencies": {
30
- "@jakubmazanec/eslint-config": "5.0.0-unstable.f50b9d9c",
30
+ "@jakubmazanec/eslint-config": "^5.0.0",
31
31
  "@types/lodash": "^4.17.24",
32
32
  "@types/node": "^24.0.4",
33
33
  "@vitest/coverage-v8": "^4.1.10",
34
- "concurrently": "^9.2.4",
34
+ "concurrently": "^10.0.3",
35
35
  "del-cli": "^7.0.0",
36
36
  "esbuild": "^0.28.1",
37
37
  "eslint": "^9.39.4",
@@ -40,7 +40,7 @@
40
40
  "prettier-plugin-packagejson": "^2.5.22",
41
41
  "typedoc": "^0.28.20",
42
42
  "typedoc-plugin-markdown": "^4.12.0",
43
- "typescript": "^5.9.3",
43
+ "typescript": "^6.0.0",
44
44
  "vitest": "^4.1.10"
45
45
  },
46
46
  "packageManager": "npm@11.3.0",