Implicit type inclusion changes#9095
Merged
RyanCavanaugh merged 8 commits intoJun 13, 2016
Merged
Conversation
| type: "list", | ||
| element: { | ||
| name: "typeRoots", | ||
| type: "string" |
Member
Author
|
🔔 |
| // use typesRoot and fallback to directory that contains tsconfig or current directory if typesRoot is not set | ||
| const rootDir = options.typesRoot || (options.configFilePath ? getDirectoryPath(options.configFilePath) : (host.getCurrentDirectory && host.getCurrentDirectory())); | ||
|
|
||
| const typeRoots = options.typeRoots || defaultTypeRoots; |
Contributor
There was a problem hiding this comment.
we should make defaultTypeRoots absolute as well.
Contributor
|
We should add a test to |
| (oldOptions.configFilePath !== options.configFilePath) || | ||
| (oldOptions.baseUrl !== options.baseUrl) || | ||
| (oldOptions.typesRoot !== options.typesRoot) || | ||
| (oldOptions.typeRoots !== options.typeRoots) || |
Contributor
There was a problem hiding this comment.
arrayIsEqualTo(oldOptions.typeRoots, options.typeRoots)
|
|
||
| function getEffectiveTypeRoots(options: CompilerOptions, host: ModuleResolutionHost) { | ||
| return options.typeRoots || | ||
| defaultTypeRoots.map(d => combinePaths(options.configFilePath ? getDirectoryPath(options.configFilePath) : host.getCurrentDirectory(), d)); |
Contributor
|
one comment. other than that 👍 |
Contributor
|
getInferredTypesRoot seems to be big enough, we should add some unit tests for it, just to make sure we captured all the interesting scenarios. this does not have to gate this change though. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements automatic type inclusion per our discussion today