type-fest
type-fest copied to clipboard
Jsonify breaks down with JsonValue, JsonObject
I was trying to use Jsonify
with a generic class and noticed things would break if I happened to pass in a type already using JsonValue
or JsonObject
:
// type Foo = {[x: string]: never}
type Foo = Jsonify<JsonObject>
// Type instantiation is excessively deep and possibly infinite.ts(2589)
type Bar = Jsonify<JsonValue>;
Upvote & Fund
- We're using Polar.sh so you can upvote and help fund this issue.
- The funding will be given to active contributors.
- Thank you in advance for helping prioritize & fund our backlog.
Good catch. We should check for those types and just return the types directly if matched.