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.
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.htmlThis 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 hereAlternatives:
$schema
for precise type declarations$example
(or$sample
prop that acts like$default
but only used for type definition.