TypeScript support, allow missing index routes, and more #31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #5
Fixes #6
Fixes #13
Fixes #23
Fixes part of #7
Overall updates:
<required>
vs[optional]
)[variadic..]
)positionalArgs
order. It used to be random (or the order the keys inpropTypes
)positionalArgs
index.js
. If not, a default message rendering the other available subcommands is shown when "index" route is calledread-command.js
other than Add support for typescript #20tsconfig.json
if not present and there is a.tsx
command (like Next.js does)Note for TypeScript, I tried looking into generating args based on types instead of propTypes but I wasn't able to find something concrete with ast, since it can get really complex with something like:
If there's a good way to go about it I can add in a separate PR. From some research it seems like this might be useful: https://ts-morph.com/ but I wasn't able to get far (though I didn't spend much time on this)
Thank you for Pastel, I think it's an awesome way to develop complicated Ink APIs ❤️
Let me know if any updates are needed 😄