@blake.regalia/belt
Advanced tools
Comparing version 0.8.1 to 0.9.0
@@ -76,1 +76,7 @@ import type { A } from 'ts-toolbelt'; | ||
export type RemoveJsonInterfaces<w_type> = Exclude<A.Compute<Exclude<Extract<w_type, object>, JsonArray>>, JsonObject>; | ||
/** | ||
* Reinterprets the given type as being JSON-compatible | ||
*/ | ||
export type AsJson<z_test extends JsonValue | {} | {}[]> = z_test extends JsonValue ? z_test : z_test extends Array<infer w_type> ? AsJson<w_type>[] : { | ||
[si_each in keyof z_test]: AsJson<z_test[si_each]>; | ||
}; |
@@ -76,1 +76,7 @@ import type { A } from 'ts-toolbelt'; | ||
export type RemoveJsonInterfaces<w_type> = Exclude<A.Compute<Exclude<Extract<w_type, object>, JsonArray>>, JsonObject>; | ||
/** | ||
* Reinterprets the given type as being JSON-compatible | ||
*/ | ||
export type AsJson<z_test extends JsonValue | {} | {}[]> = z_test extends JsonValue ? z_test : z_test extends Array<infer w_type> ? AsJson<w_type>[] : { | ||
[si_each in keyof z_test]: AsJson<z_test[si_each]>; | ||
}; |
{ | ||
"name": "@blake.regalia/belt", | ||
"version": "0.8.1", | ||
"version": "0.9.0", | ||
"repository": "github:blake-regalia/belt", | ||
@@ -5,0 +5,0 @@ "license": "ISC", |
158715
3149