cleaning up expression service types#80643
Conversation
|
Pinging @elastic/kibana-app-arch (Team:AppArch) |
|
I think Wylie just merged his PR which exposes |
0754cd7 to
c81a42e
Compare
c81a42e to
90b1f5b
Compare
90b1f5b to
613f873
Compare
613f873 to
de93ecf
Compare
de93ecf to
05aca66
Compare
lukeelmers
left a comment
There was a problem hiding this comment.
Couple minor TS nits, but overall this cleanup makes things much clearer! 👍
| : createDefaultInspectorAdapters()) as InspectorAdapters, | ||
| inspectorAdapters: | ||
| execution.params.inspectorAdapters || | ||
| ((createDefaultInspectorAdapters() as any) as InspectorAdapters), |
There was a problem hiding this comment.
looks like DefaultInspectorAdapters extends Adapters, why is the as any) as InspectorAdapters necessary here?
| query: [...toArray((getSearchContext() as any).query), ...toArray((input || {}).query)], | ||
| filters: [...((getSearchContext() as any).filters || []), ...((input || {}).filters || [])], | ||
| timeRange: (getSearchContext() as any).timeRange || (input ? input.timeRange : undefined), |
There was a problem hiding this comment.
Feels like we shouldn't need to cast to any here -- presumably getSearchContext() is getting its type from ExecutionContextSearch, in which case query, filters, timeRange are all undefined so you should still be able to use them right?
(Or worst-case do getSearchContext().query!)
💚 Build SucceededMetrics [docs]page load bundle size
History
To update your PR or re-run it, just comment with: |
stratoula
left a comment
There was a problem hiding this comment.
Code review only of the kibana app team. LGTM!
…arm-phase-to-formlib * 'master' of github.com:elastic/kibana: [Trigger Actions UI] Properly unmount app (elastic#81436) skip flaky suite (elastic#81576) skip flaky suite (elastic#78373) [Security Solution] Fix styling of EditDataProvider content (elastic#81456) [Search] Error Alignment 2 (elastic#80965) [APM] Unskip test (elastic#81574) [ML] Fix partition value selection on the Single Metric Viewer (elastic#81585) cleaning up expression service types (elastic#80643) Fix suggestions dropdown for query input (elastic#80990) [Usage collection] Make `schema` mandatory (elastic#79999) [ILM] Update show/hide data tier logic on cloud (elastic#81455) added brace import to advanced settings (elastic#81458) chore(NA): add spec-to-console and plugin-helpers as devOnly dependencies
Summary
Cleans up some types on expressions and:
getInitialInput()fromcontext(which was not used by anyone)context.searchbehind context.getSearchContext() methodgetSearchSessionId()to context as well assearchSessionIdparameter to executor/loaderChecklist
Delete any items that are not applicable to this PR.
For maintainers