Skip to content

inline arrays of objects #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zacnoo
Copy link

@zacnoo zacnoo commented Jul 9, 2025

Just a starting point to bring a bit more level of detail to the JSDoc representation of arrays of objects.

Currently it just returns a generic array[]

This works for the exact case I'm using it for, but it would needs heaps of work since I've just kinda shoe-horned it in there for my use case, but would love pointers to complete it properly and make it viable to merge.

I'm not sure how universal this style of inline optional props is. Seems to work fine in SublimeText and TSC. What tooling do you usually test against?

@n3ps
Copy link
Owner

n3ps commented Jul 18, 2025

Thanks for this draft. I think you're on the right track if you're just looking to support a simple top-level inline object. Some suggestions:

  • Extract the inline object generation to a function, so the output can simply be pushed into result
  • Simplify the criteria to something like if (prop.type === 'array' && prop.items.type === 'object' ...)

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.

2 participants