@infra-blocks/types 0.30.0 → 0.31.0-alpha.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/lib/cjs/keys.d.ts +7 -1
- package/lib/esm/keys.d.ts +7 -1
- package/package.json +1 -1
package/lib/cjs/keys.d.ts
CHANGED
|
@@ -19,7 +19,13 @@ export type MapKeys<K, V> = {
|
|
|
19
19
|
* Extracts the optional keys of a given type.
|
|
20
20
|
*/
|
|
21
21
|
export type OptionalKeys<T> = keyof {
|
|
22
|
-
[Key in keyof T as Omit<T, Key> extends T ? Key : never]:
|
|
22
|
+
[Key in keyof T as Omit<T, Key> extends T ? Key : never]: Key;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Extracts the required keys of a given type.
|
|
26
|
+
*/
|
|
27
|
+
export type RequiredKeys<T> = keyof {
|
|
28
|
+
[Key in keyof T as Omit<T, Key> extends T ? never : Key]: Key;
|
|
23
29
|
};
|
|
24
30
|
/**
|
|
25
31
|
* A type utility useful to constrain types to have the same keys as M, without imposing
|
package/lib/esm/keys.d.ts
CHANGED
|
@@ -19,7 +19,13 @@ export type MapKeys<K, V> = {
|
|
|
19
19
|
* Extracts the optional keys of a given type.
|
|
20
20
|
*/
|
|
21
21
|
export type OptionalKeys<T> = keyof {
|
|
22
|
-
[Key in keyof T as Omit<T, Key> extends T ? Key : never]:
|
|
22
|
+
[Key in keyof T as Omit<T, Key> extends T ? Key : never]: Key;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Extracts the required keys of a given type.
|
|
26
|
+
*/
|
|
27
|
+
export type RequiredKeys<T> = keyof {
|
|
28
|
+
[Key in keyof T as Omit<T, Key> extends T ? never : Key]: Key;
|
|
23
29
|
};
|
|
24
30
|
/**
|
|
25
31
|
* A type utility useful to constrain types to have the same keys as M, without imposing
|