@jakubmazanec/ts-utils 3.0.5-unstable.f4ff14e → 3.0.6-next.454b4abf

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.
@@ -31,6 +31,6 @@
31
31
  * @typeParam T Base for the new type
32
32
  * @typeParam P String literal or union of string literals specifying properties of `T`
33
33
  */
34
- export type AtLeastOneRequired<T, P extends keyof T = keyof T> = {
34
+ export type AtLeastOneRequired<T, P extends keyof T = keyof T> = Pick<T, Exclude<keyof T, P>> & {
35
35
  [K in P]-?: Partial<Pick<T, Exclude<P, K>>> & Required<Pick<T, K>>;
36
- }[P] & Pick<T, Exclude<keyof T, P>>;
36
+ }[P];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jakubmazanec/ts-utils",
3
- "version": "3.0.5-unstable.f4ff14e",
3
+ "version": "3.0.6-next.454b4abf",
4
4
  "description": "Collection of TypeScript types and utilities.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,7 +27,7 @@
27
27
  "typecheck": "tsc --project tsconfig.typecheck.json"
28
28
  },
29
29
  "devDependencies": {
30
- "@jakubmazanec/eslint-config": "4.0.0-unstable.f4ff14e",
30
+ "@jakubmazanec/eslint-config": "4.1.0-next.454b4abf",
31
31
  "@types/lodash": "^4.17.13",
32
32
  "@types/node": "^22.9.0",
33
33
  "@vitest/coverage-v8": "^2.1.5",
@@ -31,7 +31,7 @@
31
31
  * @typeParam T Base for the new type
32
32
  * @typeParam P String literal or union of string literals specifying properties of `T`
33
33
  */
34
- export type AtLeastOneRequired<T, P extends keyof T = keyof T> = {
35
- [K in P]-?: Partial<Pick<T, Exclude<P, K>>> & Required<Pick<T, K>>;
36
- }[P] &
37
- Pick<T, Exclude<keyof T, P>>;
34
+ export type AtLeastOneRequired<T, P extends keyof T = keyof T> = Pick<T, Exclude<keyof T, P>> &
35
+ {
36
+ [K in P]-?: Partial<Pick<T, Exclude<P, K>>> & Required<Pick<T, K>>;
37
+ }[P];