-
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
Get rid of global types #81739
Get rid of global types #81739
Conversation
Pinging @elastic/kibana-platform (Team:Platform) |
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.
Security/Spaces/ESO plugins changes LGTM.
@@ -4,6 +4,7 @@ | |||
* you may not use this file except in compliance with the Elastic License. | |||
*/ | |||
import * as Rx from 'rxjs'; | |||
import type { Writable } from '@kbn/utility-types'; |
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.
note: TIL import type
, nice!
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.
Alerting team related code LGTM
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.
Change to Index Management test mock LGTM.
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.
Thank you!
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.
App arch code change LGTM
💚 Build SucceededMetrics [docs]distributable file count
History
To update your PR or re-run it, just comment with: |
* move global typings to packages/kbn-utility-types * update all imports * add tests * mute error * update docs * ok * rename kbn-utility-types/test --> kbn-utility-types/jest
…kibana into alerts/convert-to-tm-intervals * 'alerts/convert-to-tm-intervals' of github.com:gmmorris/kibana: (88 commits) fixed jest APM Experiments settings (elastic#81554) [Resolver] Enable resolver test plugin tests (elastic#81339) Add TS project references for inspector (elastic#81792) Add uri decode to es_ui_shared and fix navigation issues with special characters (elastic#80835) [Fleet] Rename ingestManager translations fleet (elastic#81837) [Logs UI] Transmit and render array field values in log entries (elastic#81385) Audit Logging: use the original url (elastic#81282) [User experience] Fix JS error rate (elastic#81512) [UX] Add median/percentile info in titles (elastic#79824) Support export for SO with circular refs (elastic#81582) Get rid of global types (elastic#81739) [APM] Fix precommit script (elastic#81594) skips overview tests (elastic#81877) [Security Solution][Case] Fix connector's labeling (elastic#81824) Added simple test, which only covers successful case when edit happened right after task was complete previous execution [Maps] Fix EMS test (elastic#81856) [Security Solutions][Detections] - Fix bug, last response not showing for disabled rules (elastic#81783) skip flaky suite (elastic#81853) Fixed type checks and unit tests ...
Summary
Global typings create an implicit dependency on environment. This PR refactors the global types:
PublicMethodsOf
,MethodKeysOf
,Writable
aren't global anymore and should be imported from@kbn/utility-types
.DeeplyMockedKeys
,MockedKeys
aren't global anymore (it overlaps withmocha
types) and should be imported from@kbn/utility-types/jest
.Note that I didn't remove global type augmentation in
typings/
folder.Plugin API changes
We reduced number of global types:
PublicMethodsOf
,MethodKeysOf
,Writable
should be imported from@kbn/utility-types
.DeeplyMockedKeys
,MockedKeys
should be imported from@kbn/utility-types/jest
.