Skip to content

Conversation

@luxass
Copy link

@luxass luxass commented May 5, 2025

resolves #110

I have a leftover question about whether we should support jsdoc on more that interfaces? Maybe it would make sense to also have it on generated objects?

There is one thing i could think about that this will break, and that is if you want to generate an interface like this:

interface FooInterface {
  foo?: {
    type: "string",
    jsdoc: "string"
  }
}

But since we generate jsdoc when we receive an object with type and jsdoc, that's no longer possible. Maybe we should take a different approach and use a withJSDOC function which returns an object with a special symbol which we can use to differentiate between jsdoc or not.

Let me know what you think about this approach!

@luxass luxass changed the title feat(typescript): add support for jsdoc in interfaces feat: add support for jsdoc in interfaces May 5, 2025
@luxass luxass marked this pull request as ready for review May 5, 2025 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support jsdoc comments for interface fields

1 participant