-
Notifications
You must be signed in to change notification settings - Fork 468
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
[SPIKE] SDK: create a @dotcms/types
package
#31225
Comments
We should get a list of all (or a much as possible) of the types we need, also differentiate between actual public facing types and internal like props and, because this will be a public library so is important to expose what is actually public. |
FindingsUsing DefinitelyTyped (@types/dotcms)Initially, we considered using DefinitelyTyped to add something like DefinitelyTyped is primarily intended for well-established libraries that weren’t originally written in TypeScript. Since our library is still in development and doesn’t have a stable version yet, it makes more sense to expose the interfaces in a separate package, like @dotcms/types. This approach is easier to manage and aligns with how we handle our SDKs. About the
|
Now all this got me thinking... The types are specifically for the APIs. The APIs interact through the client library. If everything is going to be there, the API's interactions, etc. inside the client library, why do we need an external library? Can't we just export that from like |
It’s a good alternative! We discussed it with the Frontend team and decided to go with this option, mainly because This approach requires creating a new entry point in the The SDKs (react, angular, vue) will then import these interfaces directly from |
Important
Time Frame: 1 day
Parent Issue
#30943
User Story
As a developer, I want to use the dotCMS SDK with
TypeScript
so that I can build applications with strongly typed frameworks likeAngular
orNext.js
+ReactJS
Acceptance Criteria
Tasks
Proposed Objective
Technical User Experience
Proposed Priority
Priority 2 - Important
Assumptions & Initiation Needs
core/examples/astro/src/types/index.ts
Lines 1 to 231 in c84c554
The text was updated successfully, but these errors were encountered: