Skip to content

v1.4.0

Choose a tag to compare

@ggoodman ggoodman released this 05 Apr 20:57

Added

  • The type used for open-ended schemas can be passed via the anyType option in the Partser's generateTypings method.

    Some use-cases may demand strict typing for values whose shape cannot be known a priori, in which case "unknown" would be a good fit. In other cases, a consumer of an object typed using this library might find it helpful to know that only JSON-serializable values can be present. In that case, the "JSONValue" option would be suitable. Finally, in cases where consumers of the type definitions may want minimal friction from the type-checker, "any" might be the best choice.