-
Notifications
You must be signed in to change notification settings - Fork 471
Extend Gentype shims #7842
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
Extend Gentype shims #7842
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR extends gentype support for stdlib types by adding comprehensive mappings for JavaScript built-in types without requiring TypeScript shims. It creates a new test project to verify that stdlib types can be properly mapped to their TypeScript equivalents through gentype.
- Adds new gentype mappings for typed arrays, iterators, Intl objects, and other JS builtins
- Creates a comprehensive test suite with no-shims configuration to validate the mappings
- Integrates the new test project into the main build and clean processes
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.
File | Description |
---|---|
tests/gentype_tests/stdlib-no-shims/ |
New test project with TypeScript config, ReScript source, and build files |
compiler/gentype/TranslateTypeExprFromTypes.ml |
Adds gentype mappings for 40+ stdlib types to their TS equivalents |
Makefile |
Integrates new test project into build and clean targets |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sweet
This adds a new test project for gentype where no shims are set up, and adds a bunch of new mappings for the stdlib that previously wasn't there.
Intention is to have a central place to add tests for all the things from the stdlib/builtins we expect gentype to map without needing shims.
Part of #7835.