Converted about 25 *.test.ts files to --strictNullChecks (mostly automatically)#65581
Merged
mjbvz merged 6 commits intomicrosoft:masterfrom Dec 24, 2018
JoshuaKGoldberg:strict-null-checks-auto-1
Merged
Converted about 25 *.test.ts files to --strictNullChecks (mostly automatically)#65581mjbvz merged 6 commits intomicrosoft:masterfrom JoshuaKGoldberg:strict-null-checks-auto-1
mjbvz merged 6 commits intomicrosoft:masterfrom
JoshuaKGoldberg:strict-null-checks-auto-1
Conversation
added 5 commits
December 21, 2018 00:14
# Conflicts: # src/tsconfig.strictNullChecks.json # src/vs/base/parts/quickopen/test/common/quickOpenScorer.test.ts # src/vs/base/test/browser/ui/grid/gridview.test.ts # src/vs/base/test/browser/ui/splitview/splitview.test.ts # src/vs/base/test/browser/ui/tree/asyncDataTree.test.ts # src/vs/base/test/common/async.test.ts # src/vs/base/test/common/diff/diff.test.ts # src/vs/base/test/common/strings.test.ts # src/vs/base/test/node/config.test.ts # src/vs/code/test/node/windowsFinder.test.ts # src/vs/editor/contrib/codeAction/test/codeAction.test.ts # src/vs/editor/contrib/codeAction/test/codeActionModel.test.ts # src/vs/editor/contrib/comment/test/lineCommentCommand.test.ts # src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts
Contributor
Author
|
|
Collaborator
|
Very nice work. Thanks! |
mjbvz
pushed a commit
that referenced
this pull request
Dec 28, 2018
* Converted another ~70 test files to strictNullChecks These are the remaining test files that didn't require any changes to non-test file types. I'll send those in separately. Most changes were automatic and small (`!`s). The only non-trival change is that `extHostSearch.ts` needs an interface for its test data. Again used [TypeStat](https://github.com/JoshuaKGoldberg/TypeStat) when possible per #65581. I'm happy to split this up into smaller PRs if you'd prefer! * Added missing `!`s to `commands.test.ts`
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.
Continues #65233.
I can split this up into smaller PRs if you'd like 😄 figured I'd try to avoid spamming the PR system first...
These diffs were generated with the following strategy:
src/**/*.test.tswith thefixes.strictNullChecksoption!assertions everywhere and a small percentage of the| null/| undefinedtypesnpm run strict-null-check-watchand fixed up errors manually(void 0)!->undefined!)I also went manually did a bunch of these changes on a separate branch to confirm they seem reasonable. Most changes are just adding
!assertions. A few places, such ascomparers.tsandterminalEnvironment.test.ts, I manually redid types in step 3 instead.'./vs/base/test/browser/ui/tree/asyncDataTree.test.ts",'./vs/editor/contrib/linesOperations/test/linesOperations.test.ts",'./vs/editor/contrib/linesOperations/test/moveLinesCommand.test.ts",'./vs/editor/contrib/multicursor/test/multicursor.test.ts",'./vs/editor/contrib/suggest/test/completionModel.test.ts",'./vs/editor/contrib/wordOperations/test/wordOperations.test.ts",'./vs/editor/contrib/wordPartOperations/test/wordPartOperations.test.ts",'./vs/platform/configuration/test/common/configurationModels.test.ts",'./vs/platform/extensions/test/node/extensionValidator.test.ts",'./vs/platform/instantiation/test/common/instantiationService.test.ts",'./vs/platform/keybinding/test/common/keybindingLabels.test.ts",'./vs/platform/keybinding/test/common/keybindingResolver.test.ts",'./vs/platform/markers/test/common/markerService.test.ts",'./vs/platform/telemetry/test/electron-browser/appInsightsAppender.test.ts",'./vs/platform/telemetry/test/electron-browser/telemetryService.test.ts",'./vs/workbench/parts/markers/test/electron-browser/markersModel.test.ts",'./vs/workbench/parts/snippets/test/electron-browser/snippetFile.test.ts",'./vs/workbench/parts/snippets/test/electron-browser/snippetsService.test.ts",'./vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts",'./vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts",'./vs/workbench/parts/terminal/test/node/terminalEnvironment.test.ts",'./vs/workbench/services/commands/test/common/commandService.test.ts",'./vs/workbench/services/configuration/test/common/configurationModels.test.ts",'./vs/workbench/services/decorations/test/browser/decorationsService.test.ts",'./vs/workbench/services/extensions/test/node/rpcProtocol.test.ts",'./vs/workbench/services/keybinding/test/keybindingIO.test.ts",'./vs/workbench/services/keybinding/test/macLinuxFallbackKeyboardMapper.test.ts",