-
Notifications
You must be signed in to change notification settings - Fork 23
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
begin TS conversion #71
Conversation
/** | ||
* set of property values for vtkClass | ||
*/ | ||
state?: object; |
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.
I used a codemod to convert prop types to TS types, they will need some improvements.
I support this endeavour, and may have some time to contribute. |
/** | ||
* Properties to set to the mapper | ||
*/ | ||
mapper?: object; |
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.
Do these objects map directly to classes like vtkMapper
, vtkVolume
, vtkProperty
, etc...? Could the object type eventually be converted to the types on those classes?
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.
I'm not sure, they were defined just as Object on prop-types 😔
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.
These are objects that represent the settable properties for the mapper/property/etc. We can feasibly use the initial values types for the object constructors here. For instance, here is the vtkMapper initial values interface.
After some evaluation, this will additionally require a significant chunk of typing for certain classes in vtk.js (i.e. manipulators). This is a good thing, but will incur further overhead when making this migration. |
This is the first step in order to address #67
Let's convert the codebase to TypeScript, this way it will be much easier to migrate it from class components to hooks later, fixing #67.
I'm not sure I will have enough bandwidth to allocate to this effort so we may want to have you Kitware folks work on it if possible, we can sync offline.