[Feature]: Moving zodern:types to core
- Dominant language
- JavaScript
- Stars
- 44.8k
- Forks
- 5.2k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
# Bringing types to core
_this is a livid issue. The image and its content may change if needed._
On our way to making Meteor.js integrated with the current state of JavaScript. I'm here displaying and being open to suggestions on how we could integrate typescript packages in general.
Taking into account the great works of @zodern in the `zodern:types` package, we could get some ideas from it:
Bellow, I display how this could be done. I would love feedback in general about the implementation plan.
Before we start, I will give a bit of context on how zodern:types work + how meteor tools/packaging work.
## Context
_Notes_: We have a [full thread on Slack](https://meteor-community.slack.com/archives/CS46CNDN0/p1673006401030039) for this. Come join the discussion [here(slack invite)](https://join.slack.com/t/meteor-community/shared_invite/zt-1oyoudqo6-c7RiM7XEYX_RaOWWjrkteQ)

_General package workflow with `zodern:types` and future with types integrated with the core_
For a simple PoC for trying this out is a script/command to get from ./meteor/versions → get from the root and bring index.d.ts files to ./meteor/types( do the mapping the same way zodern:types does today using a single map file)
For a more stable and ready-to-use solution, we should do a few steps + the ones from the PoC:
- when it writes anything to ./meteor/local should run the hook/ update the types of files ( probably should be done here in [tools/project-context.js](https://github.com/meteor/meteor/blob/eb5ea5964e3fb274c74915fb2bfc9cad3a3b0c0a/tools/project-context.js#L128-L136) )
- add this new functionality to a command such as [`meteor add`](https://github.com/meteor/meteor/blob/1a8e3179668259e46630c9da09f7449417a729e9/tools/cli/commands-packages.js#L2118-L2132) and test if it does work.
## Tasks
As shown in the context, we do have a few tasks that may be a little bit hard to understand, but we do have a few maintainers that can help us with that( me, @zodern, @radekmie).
I want to open to the community to contribute to this one as it is a bigger task and it can be iterated over and over.
_I'm imagining that people start contributing in 3.0 >_
- [ ] Review types from the core (Fibers changed many things) .
- [ ] Make the PoC, as I pointed out, that could be a command like `meteor bring-types` or just `meteor types` and check if it works as we expect( exactly like `zodern:types`)
- [ ] Join this PoC command with the constructive commands from the cli( use the [tools/project-context.js](https://github.com/meteor/meteor/blob/eb5ea5964e3fb274c74915fb2bfc9cad3a3b0c0a/tools/project-context.js#L128-L136) )
## tags
- Troposphere
- Atmosphere
- Architecture
- AtmosphereJS
Contributor guide
Assessment
This issue has not been assessed yet.