Skip to content

Questions about the types located in the file /source/basic.d.ts #825

Open
@doox911

Description

@doox911

Source: https://github.com/sindresorhus/type-fest/blob/main/source/basic.d.ts

  1. Why do we specify ?: when the property might not exist due to | undefined
  2. Please, provide a practical use case types: JsonValue, JsonPrimitive, JsonObject, JsonArray, so how can one perform type conversion using as after JSON.parse?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions