Skip to content
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

Adopt TypeScript #864

Open
5 tasks
ilan-gold opened this issue Feb 28, 2025 · 1 comment
Open
5 tasks

Adopt TypeScript #864

ilan-gold opened this issue Feb 28, 2025 · 1 comment

Comments

@ilan-gold
Copy link
Collaborator

ilan-gold commented Feb 28, 2025

User story
deck.gl adopted full TypeScript some time ago making it easier for us to do the same. At the moment, only the loaders are typed (in part for this reason - deck.gl did not support TypeScript for some time).

The benefits here are manifold, but mainly, it would make developing downstream applications much easier (targeting the recent issues in Avivator, for one).

Preferred solution
Adopt TypeScript subpackage-by-subpackage:

  • extensions
  • layers
  • viewers
  • views
  • main (just index.js)

loaders and constants both already use TypeScript.

Possible alternatives

JSDoc-as-TypeScript (see higlass/higlass#1162 for example) would be an alternative route but given that this package (a) has independent subpackages and (b) is relatively small (minus loaders which are typed already), I think TypeScript is the way to go.

@manzt
Copy link
Member

manzt commented Feb 28, 2025

Agree with choice of TS here. In HiGlass we decided on JSDoc because it's uncertain if we'll ever fully type the codebase and I wasn't sure how many others working on the code base used TS. I didn't want to leave it in a state where we partially type things but then stop type checking or something but then have added TypeScript as a dependency long term. There if we want to drop TS, we just remove it as a dependency (leaving behind the (un)checked TS comments).

Since we've already introduced TS to the code base, I don't have the same concerns>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants