Skip to content

Support inline object definition with jsdocs @typedef #61

@pi0

Description

@pi0

Ref: #54

Currently, we have basic @typedef support for defining type and then later mapping it to tstypes here (only for loader). typedef docs: https://jsdoc.app/tags-typedef.html

This feature can be enhanced by supporting inline object definitions with jsdocs notion with properties and useful for array object typing and defining shared types.

In order to implement this, we need to map the inline custom type from jsdocs, to json schema and then add it to the $defs and later check and map it for precise type resolution in typescript generator here

Alternatives:

  • Directly use $schema for precise type declarations
  • We can introduce new $example (or $sample prop that acts like $default but only used for type definition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions