-
Notifications
You must be signed in to change notification settings - Fork 224
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
Core Typings #348
Core Typings #348
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Regarding the prop-types, what other options do we have?
Would it make sense to slowly move towards TS and discard prop-types as dependency?
I guess once we add more typings we could add the option to show errors when a property is missing.
I don't think there are other options, switching to ts seems like the next step indeed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a first step towards a full typescript migration or is the plan to stick to vanilla JS for a while? Either way, these types are a good improvement towards a better developer experience so I approve :)
oh wow, that looks great. |
Okay i see |
catalog responses return MetaItemPreview[] which does not have videos. Thats the case for both Board and Discover |
@tymmesyde we could try, we will either need to provide the same types in TS that we need or we can automatically generate from Rust (core and I guess, core-web) and export only the ones that we need in TS. |
Add typings for Core service and models
Not sure if there is a conventional way for where to put / declare them
We could enable
checkJs
intsconfig.json
to display error warnings and not just auto-completion but it brings lots of errors about undefined components props since we are using prop-type with js