Skip to content

Conversation

@jakebailey
Copy link
Member

@jakebailey jakebailey commented May 12, 2022

Two changes that let me load all of TS into a single project for doing the module transformation without checker errors:

  • Export FSEntry in the test harness code; this type is indirectly returned from the public function snap, and declaration: true (which we need for composite) is incompatible. Exporting it makes TS happy.
  • Move tsserver's internal WatchTypeRegistry extras into compiler; this kind of augmentation prevents loading of everything as one project, and it turns out that this code was incorrect because it forgot to assign NodeModulesForModuleSpecifierCache to the object. Maybe this just needs to be an enum or something, rather than writing everything twice, but it's unfortunately already exported.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels May 12, 2022
@jakebailey jakebailey changed the title Make watch code friendlier for project loading in module transformation Make watch/FS testing code friendlier for project loading in module transformation May 12, 2022
PackageJson: "package.json file",

// Additional tsserver specific watch information
/* @internal */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything in this file is already internal ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it is, oops. I could have sworn it wasn't on my branch (maybe an error in my transformer code).

Now I'm even more compelled to make this an enum.

@jakebailey jakebailey merged commit 92894d3 into microsoft:main May 12, 2022
@jakebailey jakebailey deleted the watch-enum-thing branch May 12, 2022 23:44
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants