#3971·vega

Convert packages to Typescript

Author: hydrosquallCreated Sep 8, 2024Updated Jan 31, 2026

Motivation

  • Vega was written in JS before the wide adoption of Typescript (1.0 in 2014). As a result, separate d.ts are manually created and sync'd with the type of files. Occasionally the types get out of sync with the types ( #3954 )

Proposal

We could converted some of vega sub-packages to TS. This way we won't have to sync .d.ts files with JS source code / can delete the d.ts files entirely . Many of the newer vega projects are written in typescript (including Vega-Lite).

Contraints

  • We need to make sure doing this doesn't degrade the developer experience. For example
  • It might be unrealistic to migrate the entire vega repository at once. We could try this a small package at a time.