Background
Type hinting via TypeScript has been used in Vector. It doesn't require a build step and has effectively detected errors in code before it was shipped.
We have had various issues relating to instrumentation missing fields that I think TypeScripting would help with.
I (@Jdlrobson) raised a patch https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikimediaEvents/+/670899 but it didn't get the enthusiastic response I was expecting.
Acceptance Criteria
- By default, all instruments are not type checked with TypeScript
- An instrument owner can opt-in to type checking their instrument with TypeScript
- Instruments are type checked during CI
Required
- Documentation
Notes
- Here are some tsconfig.json files from extensions deployed on WMF servers: