Conversation
|
Can you add a test where this option is on? Thanks |
sure, I'll add it in a few moments |
done! |
| */ | ||
| type _PluginRuleWithDescriptionInPropertiesSchemaBId = string | ||
| interface _PluginRuleWithDescriptionInPropertiesSchemaSchemaId { | ||
| a?: _PluginRuleWithDescriptionInPropertiesSchemaAId |
There was a problem hiding this comment.
I think the jsdocs should be here to make it effective on the userland, no?
There was a problem hiding this comment.
Yep, I think that too, but the snapshot in the tests places it there, and all tests will pass, it's strange but works xD
There was a problem hiding this comment.
Well, snapshot only tests changes, but not correctness. If snapshot shows that, it means the implementation should be updated
There was a problem hiding this comment.
It's a good point, I'll try out how to fix this.
There was a problem hiding this comment.
currently, the json-schema-to-typescript-lite package
in the generateInterface and generateStandaloneType functions
the jsdocs is conditioned by ast.standaloneName if has standaloneName the jsdoc is placed in the top level type definition.
It can be fixed by adding an option to prefer the jsdoc of the options inside the interface instead of the top level type, (I can send a pr for this), or it can be left as is, and used in this way, because the original package also has this behavior (bcherny/json-schema-to-typescript), generateInterface and generateStandaloneType functions

Description
Add option to include the jsdoc of the rule options
Linked Issues
#17