Skip to content

Avoid unnecessary type assertions in module resolution code#31238

Closed
ajafff wants to merge 1 commit intomicrosoft:masterfrom
ajafff:module-resolution-type-assertion
Closed

Avoid unnecessary type assertions in module resolution code#31238
ajafff wants to merge 1 commit intomicrosoft:masterfrom
ajafff:module-resolution-type-assertion

Conversation

@ajafff
Copy link
Copy Markdown
Contributor

@ajafff ajafff commented May 3, 2019

Ref: #18217

Note that this changes the public API of CompilerHost#resolveModuleNames. The Host is expected to return ResolvedModuleFull, but there is some compatibility code for "older" hosts. That code is still there, but if you compile your "older host" with a new version of TypeScript, you will get a type error if you only return ResolvedModule.
I could revert that particular change if you are not comfortable with it.

@sheetalkamat
Copy link
Copy Markdown
Member

I don't think we want to break API at this point..

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Housekeeping Housekeeping PRs

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants