@tb-dev/utils 5.0.0 → 5.1.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.
- package/dist/types.d.ts +3 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -26,10 +26,12 @@ export type PickByValue<T, V> = {
|
|
|
26
26
|
export type PickPartial<T, K extends keyof T> = Pick<Partial<T>, K>;
|
|
27
27
|
/** Constructs a type by picking the set of properties `K` from a required version of `T`. */
|
|
28
28
|
export type PickRequired<T, K extends keyof T> = Pick<Required<T>, K>;
|
|
29
|
-
/**
|
|
29
|
+
/** Constructs a type where all properties of `T` may be written. */
|
|
30
30
|
export type Writable<T> = {
|
|
31
31
|
-readonly [P in keyof T]: T[P];
|
|
32
32
|
};
|
|
33
|
+
/** Constructs a type where all properties of `T` may be written and nullish. */
|
|
34
|
+
export type WritablePartial<T> = Writable<PartialNullish<T>>;
|
|
33
35
|
/** Constructs a type consisting of some properties of T set to partial. */
|
|
34
36
|
export type WithPartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
35
37
|
/** Constructs a type consisting of some properties of T set to required. */
|