@sinclair/typebox 0.33.18 → 0.33.19

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,2 +1,2 @@
1
1
  /** Specialized deep immutable value. Applies freeze recursively to the given value */
2
- export declare function Immutable<T>(value: T): T;
2
+ export declare function Immutable(value: unknown): unknown;
@@ -26,16 +26,12 @@ function ImmutableObject(value) {
26
26
  return globalThis.Object.freeze(result);
27
27
  }
28
28
  /** Specialized deep immutable value. Applies freeze recursively to the given value */
29
+ // prettier-ignore
29
30
  function Immutable(value) {
30
- return ValueGuard.IsArray(value)
31
- ? ImmutableArray(value)
32
- : ValueGuard.IsDate(value)
33
- ? ImmutableDate(value)
34
- : ValueGuard.IsUint8Array(value)
35
- ? ImmutableUint8Array(value)
36
- : ValueGuard.IsRegExp(value)
37
- ? ImmutableRegExp(value)
38
- : ValueGuard.IsObject(value)
39
- ? ImmutableObject(value)
40
- : value;
31
+ return (ValueGuard.IsArray(value) ? ImmutableArray(value) :
32
+ ValueGuard.IsDate(value) ? ImmutableDate(value) :
33
+ ValueGuard.IsUint8Array(value) ? ImmutableUint8Array(value) :
34
+ ValueGuard.IsRegExp(value) ? ImmutableRegExp(value) :
35
+ ValueGuard.IsObject(value) ? ImmutableObject(value) :
36
+ value);
41
37
  }
@@ -1,2 +1,2 @@
1
1
  /** Specialized deep immutable value. Applies freeze recursively to the given value */
2
- export declare function Immutable<T>(value: T): T;
2
+ export declare function Immutable(value: unknown): unknown;
@@ -22,16 +22,12 @@ function ImmutableObject(value) {
22
22
  return globalThis.Object.freeze(result);
23
23
  }
24
24
  /** Specialized deep immutable value. Applies freeze recursively to the given value */
25
+ // prettier-ignore
25
26
  export function Immutable(value) {
26
- return ValueGuard.IsArray(value)
27
- ? ImmutableArray(value)
28
- : ValueGuard.IsDate(value)
29
- ? ImmutableDate(value)
30
- : ValueGuard.IsUint8Array(value)
31
- ? ImmutableUint8Array(value)
32
- : ValueGuard.IsRegExp(value)
33
- ? ImmutableRegExp(value)
34
- : ValueGuard.IsObject(value)
35
- ? ImmutableObject(value)
36
- : value;
27
+ return (ValueGuard.IsArray(value) ? ImmutableArray(value) :
28
+ ValueGuard.IsDate(value) ? ImmutableDate(value) :
29
+ ValueGuard.IsUint8Array(value) ? ImmutableUint8Array(value) :
30
+ ValueGuard.IsRegExp(value) ? ImmutableRegExp(value) :
31
+ ValueGuard.IsObject(value) ? ImmutableObject(value) :
32
+ value);
37
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinclair/typebox",
3
- "version": "0.33.18",
3
+ "version": "0.33.19",
4
4
  "description": "Json Schema Type Builder with Static Type Resolution for TypeScript",
5
5
  "keywords": [
6
6
  "typescript",