-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Data Views] Remove remaining "any" usage #136343
Merged
tsullivan
merged 32 commits into
elastic:main
from
tsullivan:dataviews/remove-any-usage-ii
Jul 19, 2022
Merged
Changes from 20 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
deead9c
fix some any
tsullivan 8ff1b10
remove some any
tsullivan f1eed72
fix some any in saved_objects_client_wrapper
tsullivan ad9b69d
fix some any in common/types
tsullivan 700bdea
remove some any from flattenHit and getFields*
tsullivan b3a071a
fix more any
tsullivan 7604fe2
remove "any" in code comments
tsullivan 266f750
fix types
tsullivan bf3d887
test commit
tsullivan b0b7817
Merge remote-tracking branch 'elastic/main' into dataviews/remove-any…
tsullivan 366c2f8
fix ts
tsullivan 40a62ed
fix types
tsullivan 5ee6bd6
remove more any
tsullivan 7bcd468
Merge remote-tracking branch 'elastic/main' into dataviews/remove-any…
tsullivan daf68f9
simplify / comment
tsullivan 7712b06
more simplification
tsullivan b7d44a6
fix test
tsullivan d3dbc00
export public APIs
tsullivan 5db73e7
add fixme comment
tsullivan ef9e85d
cleanup
tsullivan 043a4e5
Merge remote-tracking branch 'elastic' into dataviews/remove-any-usag…
tsullivan fbad73a
improve documentation and types for RollupIndexCapability
tsullivan 524027e
simplify shortenDottedString
tsullivan b7a43ec
fix jest test
tsullivan 90b995c
use AggregationRestrictions
tsullivan 275e7a3
fix downstream types
tsullivan 35c4dcf
simplify
tsullivan 250d034
add comments for public api items
tsullivan 9db3690
add ts-expect-error in lens integration toJSON
tsullivan 2a2d14a
Merge remote-tracking branch 'elastic/main' into dataviews/remove-any…
tsullivan d3c66b3
Merge branch 'main' into dataviews/remove-any-usage-ii
flash1293 d525db7
Merge remote-tracking branch 'elastic/main' into dataviews/remove-any…
tsullivan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,11 +30,9 @@ const DOT_PREFIX_RE = /(.).+?\./g; | |
/** | ||
* Convert a dot.notated.string into a short | ||
* version (d.n.string) | ||
* | ||
* @return {any} | ||
*/ | ||
export function shortenDottedString(input: any) { | ||
return typeof input !== 'string' ? input : input.replace(DOT_PREFIX_RE, '$1.'); | ||
export function shortenDottedString(input: unknown): string { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When is this called on something aside from a string? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it was only in unit tests |
||
return typeof input !== 'string' ? (input as string) : input.replace(DOT_PREFIX_RE, '$1.'); | ||
} | ||
|
||
// Note - this code is duplicated from @kbn/es-query | ||
|
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😆