Open
Description
This repository is a port of microsoft/TypeScript from TypeScript to Go. Since the port began, the following pull request was applied to microsoft/TypeScript. An equivalent change now needs to be applied here.
PR to port
- PR link: Assume that type node annotations resolving to error types can be reused TypeScript#60195
- Squash commit diff: https://github.com/microsoft/TypeScript/commit/c003609d59db75974796cec737c98f6c8e603bd6.patch
Instructions
- Use
playwright
to view the PR listed above - Apply the edits made in that PR to this codebase, translating them from TypeScript to Go.
- The change may or may not be applicable. It may have already been ported. Do not make any significant changes outside the scope of the diff. If the change cannot be applied without significant out-of-scope changes, explain why and stop working.
- Tip: search for functions and identifiers from the diff to find the right location to apply edits. Some files in microsoft/TypeScript have been split into multiple.
- Tip: some changes have already been ported, like changes to diagnostic message text. Tests do not need to be ported as they are imported from the submodule.
- Check that the code builds by running
npx hereby build
in the terminal. - Run tests. It is expected that tests will fail due to baseline changes.
- Run
npx hereby test
in a terminal. They should fail with messages about baseline changes.- Tip: to run a single baseline test from the submodule, run
go test ./internal/testrunner -run '^TestSubmodule/NAME_OF_TEST_FILE'
- Tip: to run a single baseline test from the submodule, run
- Run
npx hereby baseline-accept
to adopt the baseline changes. - Run
git diff 'testdata/**/*.diff'
. If your change is correct, these diff files will be reduced or completely deleted.
- Run
- Iterate until you are satisfied with your change. Commit everything, including the baseline changes in
testdata
, and open a PR.