It can currently be tricky to contribute to Vitessce due to the many edge cases in which variables can be null, for example if a subset of all possible data types are available in a dataset. TypeScript can help contributors and maintainers to be more confident about new code and modifications to existing code.
Preferred solution
Incrementally convert sub-package code from JS to TS. Probably best to go in this order:
utility sub-packages in packages/utils/... (first)
config sub-package
file types sub-packages
... other sub-packages
view types sub-packages (last)
We can now use the JSDoc type annotation approach for future efforts because the @import syntax will be supported as of v5.5. Incremental type annotation can be achieved with // @ts-check comments added to the top of JS files.
User story
It can currently be tricky to contribute to Vitessce due to the many edge cases in which variables can be
null
, for example if a subset of all possible data types are available in a dataset. TypeScript can help contributors and maintainers to be more confident about new code and modifications to existing code.Preferred solution
Incrementally convert sub-package code from JS to TS. Probably best to go in this order:
We can now use the JSDoc type annotation approach for future efforts because the
@import
syntax will be supported as of v5.5. Incremental type annotation can be achieved with// @ts-check
comments added to the top of JS files.Possible alternatives