Skip to content

Jsonify<unknown> should be either unknown or JsonValue #1195

@GerkinDev

Description

@GerkinDev

Assuming you're serializing a non-strictly typed JSON data, all of its descendents were serialized too, thus JsonValue seems like a reasonable assumption. But resolving to unknown would be enough too.

Currently:

type U = Jsonify<unknown> // never
type V = Jsonify<{foo: unknown}> // {}
type W = Jsonify<[unknown]> // [null]

I am OK to submit a PR if you're OK with it

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions