@maz-ui/utils 4.2.1-alpha.9 → 4.2.1-beta.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,5 +1,5 @@
1
- function formatJson(json) {
2
- return JSON.stringify(json, null, 2);
1
+ function formatJson(json, indent = 2) {
2
+ return JSON.stringify(json, null, indent);
3
3
  }
4
4
  export {
5
5
  formatJson
@@ -1 +1 @@
1
- export declare function formatJson(json: unknown): string;
1
+ export declare function formatJson(json: unknown, indent?: number): string;
@@ -0,0 +1,3 @@
1
+ export type DeepRequired<T> = Required<{
2
+ [K in keyof T]: T[K] extends Required<T[K]> ? T[K] : DeepRequired<T[K]>;
3
+ }>;
@@ -1,5 +1,6 @@
1
1
  export * from './DeepKeyOf';
2
2
  export * from './DeepPartial';
3
+ export * from './DeepRequired';
3
4
  export * from './FlattenObjectKeys';
4
5
  export * from './GenericInstanceType';
5
6
  export * from './InferMaybeRef';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maz-ui/utils",
3
3
  "type": "module",
4
- "version": "4.2.1-alpha.9",
4
+ "version": "4.2.1-beta.0",
5
5
  "description": "Utils of maz-ui for JavaScript/TypeScript users",
6
6
  "author": "Louis Mazel <me@loicmazuel.com>",
7
7
  "license": "MIT",