@naturalcycles/js-lib 15.54.0 → 15.55.0

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.
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @file Old inclusion of 3rd party `type-fest` lib inlined here.
3
+ */
1
4
  /**
2
5
  Flatten the type output to improve type hints shown in editors.
3
6
  */
@@ -167,20 +170,6 @@ export type ConditionalExcept<Base, Condition> = Except<Base, ConditionalKeys<Ba
167
170
  ```
168
171
  */
169
172
  export type ConditionalPick<Base, Condition> = Pick<Base, ConditionalKeys<Base, Condition>>;
170
- /**
171
- Makes one property of T required instead of optional.
172
- @example
173
- ```
174
- import {RequireProp} from 'type-fest';
175
- interface Example {
176
- a?: string
177
- b?: string
178
- };
179
- type ExampleA = RequireProp<Example, 'a'>;
180
- //=> {a: string; b?: string};
181
- ```
182
- */
183
- export type RequireProp<T, K extends keyof T> = Required<Pick<T, K>> & T;
184
173
  /**
185
174
  Matches any [typed array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray), like `Uint8Array` or `Float64Array`.
186
175
  */
package/dist/types.d.ts CHANGED
@@ -403,4 +403,18 @@ interface ReadonlySetDeep<ItemType> extends ReadonlySet<ReadonlyDeep<ItemType>>
403
403
  type ReadonlyObjectDeep<ObjectType extends object> = {
404
404
  readonly [KeyType in keyof ObjectType]: ReadonlyDeep<ObjectType[KeyType]>;
405
405
  };
406
- export {};
406
+ /**
407
+ Makes one property of T required instead of optional.
408
+ @example
409
+ ```
410
+ import { RequiredProp } from '@naturalcycles/js-lib/types'
411
+ interface Example {
412
+ a?: string
413
+ b?: string
414
+ };
415
+ type ExampleA = RequiredProp<Example, 'a'>;
416
+ //=> {a: string; b?: string};
417
+ ```
418
+ */
419
+ export type RequiredProp<T, K extends keyof T> = Required<Pick<T, K>> & T;
420
+ export * from './typeFest.js';
package/dist/types.js CHANGED
@@ -59,3 +59,4 @@ export function _typeCast(_v) { }
59
59
  */
60
60
  export const _objectAssign = Object.assign;
61
61
  /* eslint-enable */
62
+ export * from './typeFest.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/js-lib",
3
3
  "type": "module",
4
- "version": "15.54.0",
4
+ "version": "15.55.0",
5
5
  "dependencies": {
6
6
  "tslib": "^2",
7
7
  "undici": "^7",
package/src/typeFest.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  /* eslint-disable */
2
2
 
3
+ /**
4
+ * @file Old inclusion of 3rd party `type-fest` lib inlined here.
5
+ */
6
+
3
7
  /**
4
8
  Flatten the type output to improve type hints shown in editors.
5
9
  */
@@ -197,21 +201,6 @@ export type ConditionalExcept<Base, Condition> = Except<Base, ConditionalKeys<Ba
197
201
  */
198
202
  export type ConditionalPick<Base, Condition> = Pick<Base, ConditionalKeys<Base, Condition>>
199
203
 
200
- /**
201
- Makes one property of T required instead of optional.
202
- @example
203
- ```
204
- import {RequireProp} from 'type-fest';
205
- interface Example {
206
- a?: string
207
- b?: string
208
- };
209
- type ExampleA = RequireProp<Example, 'a'>;
210
- //=> {a: string; b?: string};
211
- ```
212
- */
213
- export type RequireProp<T, K extends keyof T> = Required<Pick<T, K>> & T
214
-
215
204
  /**
216
205
  Matches any [typed array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray), like `Uint8Array` or `Float64Array`.
217
206
  */
package/src/types.ts CHANGED
@@ -509,4 +509,21 @@ type ReadonlyObjectDeep<ObjectType extends object> = {
509
509
  readonly [KeyType in keyof ObjectType]: ReadonlyDeep<ObjectType[KeyType]>
510
510
  }
511
511
 
512
+ /**
513
+ Makes one property of T required instead of optional.
514
+ @example
515
+ ```
516
+ import { RequiredProp } from '@naturalcycles/js-lib/types'
517
+ interface Example {
518
+ a?: string
519
+ b?: string
520
+ };
521
+ type ExampleA = RequiredProp<Example, 'a'>;
522
+ //=> {a: string; b?: string};
523
+ ```
524
+ */
525
+ export type RequiredProp<T, K extends keyof T> = Required<Pick<T, K>> & T
526
+
512
527
  /* eslint-enable */
528
+
529
+ export * from './typeFest.js'