noop in setTypeAcquisiton for undefined#41291
Conversation
sheetalkamat
left a comment
There was a problem hiding this comment.
The change looks correct but i am surprised we dont have test. can you add one please so we dont regress this in future. Thanks
minestarks
left a comment
There was a problem hiding this comment.
Looks good. +1 to adding test if possible
|
@DanielRosenwasser heads up - we want this for 4.1 RC, looks like it's almost ready to go. Thanks! |
|
@sheetalkamat I've been looking at the tests for a while and I can't figure out what we should actually have as a regression test. Should there be a unit test for the compilerOptions/watchOptions/typeAcquisition setters to make sure they noop on undefined? |
|
To clarify - inferred projects infer project.setTypeAcquisition(undefined);
assert.isTrue(project.getTypeAcquisition().enable, true) |
|
|
#40952 mistakenly sets
typeAcquisitionto{}if it isn't explicitly set by the editor, disabling type acquisition in inferred projects. This reverts the changes made toremoveLocalTypingsFromTypeAcquisitionin that PR and noops insetTypeAcquisitionwhennewTypeAcquisitionisundefined.Issue was caught in VS nightly integration tests.