DavidWells / DavidWells/analytics

Enhance & update type support

Open
#182 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
2.7k
Forks
267
PR merge metrics
No merged PRs in 30d

Description

Types were originally implemented with JSdoc before typescript proper supported this for type generation. This led to the kind of funky setup here.

The js first + JSdocs approach has been working well in a number of my other projects and it's time to update that over c'here 😃

Todo:

  • Use tsc --noEmit false --emitDeclarationOnly true for cleaner typegen
  • Update variadic functions like identity ref

Related:

Reference material:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with packages/analytics-core/scripts/types.js and the existing JSDoc-based type-generation flow, then review the variadic-function concern for identity in issue #172. Use the specified tsc declaration-only command as the reference approach; done means type generation no longer needs the current setup and variadic functions have updated types.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
developer-experience, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.