New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

merged 1 commit into from Dec 20, 2018


None yet
2 participants
Copy link

gangachris commented Dec 20, 2018


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

Not sure how to fix this. yarn strict-null-check

function toArray(historyNavigator: HistoryNavigator<string>): string[] {
let result: string[] = [];
if (historyNavigator.current()) {
do {
} while (;
return result;


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 ?

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


This comment has been minimized.

Copy link
Contributor Author

gangachris 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 Dec 20, 2018

@sandy081 sandy081 merged commit ce2987b into Microsoft:master Dec 20, 2018

2 checks passed

VS Code #20181220.34 succeeded
license/cla All CLA requirements met.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment