Skip to content

Enable strict null check for ./vs/base/test/common/history.test.ts#65453

Merged
sandy081 merged 1 commit intomicrosoft:masterfrom
gngchrs:strict-null-check
Dec 20, 2018
Merged

Enable strict null check for ./vs/base/test/common/history.test.ts#65453
sandy081 merged 1 commit intomicrosoft:masterfrom
gngchrs:strict-null-check

Conversation

@gngchrs
Copy link

@gngchrs gngchrs commented Dec 20, 2018

#65233

  • "./vs/base/test/common/history.test.ts"

Not sure how to fix this. yarn strict-null-check
https://github.com/Microsoft/vscode/blob/f903e6d226f953e158deb397de871fd34dce1979/src/vs/base/test/common/history.test.ts#L116-L126

result.push(historyNavigator.current());

result is defined as a type string[]
historyNavigator.current() is defined as type <T> | null, in this case string | null.

I'm thinking of changing the types for HistoryNavigator.<method> back to just return T and not T | null

Thoughts ?

@gngchrs gngchrs changed the title enable strict null check Enable strict null check for ./vs/base/test/common/history.test.ts Dec 20, 2018
@gngchrs
Copy link
Author

gngchrs commented Dec 20, 2018

Decided to change
string[] to Array<string | null>

@sandy081 sandy081 added this to the December/January 2019 milestone Dec 20, 2018
@sandy081 sandy081 self-requested a review December 20, 2018 10:09
@sandy081 sandy081 merged commit ce2987b into microsoft:master Dec 20, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants