Type generation improvement #542
hi94740
started this conversation in
Feature Requests & Ideas
Replies: 1 comment 1 reply
-
Hey @hi94740 — this is a great idea and would be fairly trivial to implement I think. We'll slate this into our workload! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There are a ton of cms out there. And the reason I chose payload is because of the official type generation support 👍
But I think it could be improved:
An example of the current generated file:
The improvement is simply add an interface that has every interface generated above in it and their slugs as property names:
With this improvement, I can write something like this:
This way all my api calls would be correctly typed 😆 (At least for the read operation, not planning on modifying the contents yet)
Beta Was this translation helpful? Give feedback.
All reactions