-
Notifications
You must be signed in to change notification settings - Fork 17
[feat]: Type arguments #82
Copy link
Copy link
Open
Labels
issue: enhancementsource: client-typesSource is typesSource is typesstatus: need researchThe feature or enhancement needs more research before being acceptedThe feature or enhancement needs more research before being accepted
Metadata
Metadata
Assignees
Labels
issue: enhancementsource: client-typesSource is typesSource is typesstatus: need researchThe feature or enhancement needs more research before being acceptedThe feature or enhancement needs more research before being accepted
A clear and concise description of what the feature is
Issue #45 mentions autogenerated types based on the API schema. While that's a nice feature I also find that these solutions adds some complexity to the code.
strapi-sdk-jstakes a simpler approach by supporting passing type arguments to API methods.This works well for me. I often have simple types that i don't mind defining myself. Additionally i can retain full control over the type definitions and reuse them in other application code if I find this useful.
Why should this feature be included?
For my projects this implementation is not suitable until it is strongly typed. I prefer typed arguments as a solution, but i don't think that should be incompatible with what's been outlined in #45.
To be clear,
strapi-sdk-jssuits all my needs at the moment, but these third-party SDKs are prone to lagging behind on API compatibility, so I would really like to see a well-maintained first party package.Please provide an example for how this would work
See examples in
strapi-sdk-jsas well as snippet above.