Merged
Conversation
Contributor
|
Pinging @elastic/code (Team:Code) |
timroes
commented
Oct 9, 2019
|
|
||
| import { DiffKind } from '../common/git_diff'; | ||
| import { Repository, SourceHit } from '../model'; | ||
| import { Repository } from '../model'; |
Contributor
Author
There was a problem hiding this comment.
ℹ️ There was a bug in TS that you could import something and have a different export with the same name, which has been fixed in 3.7, why this wouldn't work anymore. In this specific case we can simply remove SourceHit since it was not used in that file at all (but actually just declared later in this file).
timroes
commented
Oct 9, 2019
| [String(changeSearchScope)]: (state: SearchState, action: Action<SearchScope>) => | ||
| produce<SearchState>(state, draft => { | ||
| if (Object.values(SearchScope).includes(action.payload)) { | ||
| if (action.payload && Object.values(SearchScope).includes(action.payload)) { |
Contributor
Author
There was a problem hiding this comment.
ℹ️ I have honestly no idea why this didn't already fail earlier. Since action.payload can also be undefined, you need to check that it's not undefined before calling includes (at least in 3.7 it's failing now).
Contributor
💚 Build Succeeded |
zfy0701
approved these changes
Oct 9, 2019
timroes
pushed a commit
to timroes/kibana
that referenced
this pull request
Oct 9, 2019
timroes
pushed a commit
that referenced
this pull request
Oct 10, 2019
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR is in preparation for upgrading TypeScript to 3.7 (see #47188).
See the comments inline for an explanation of what's changed. This PR should not change any functionality.