mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Security Solution] kbn package for generic hook utils (#101976)
* Adds boilerplate for new hook-utils package * Move existing, identified utils into our hook-utils package Updates references, and fixes a few missing config that were preventing packages from building. * Extracts a common type and adds a little more JSdoc for clarity * Adds new useObservable hook Similar to useAsync (a nearly identical interface), this is meant to wrap a thunk returning an observable, allowing conditional invocation and progressive updates as the observable continues to emit. * Remove orphaned test This function (and its tests) were moved to the hook-utils package; this was simply missed. * Remove optional chaining from kbn package The build system does not currently support these typescript features. While a valid fix would also have been to build separate browser and node targets a la #99390, the use here was very minimal and so changing to a supported syntax was the most pragmatic fix. * Update old reference in test file Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
a0effa1ebd
commit
ac07ebba87
37 changed files with 424 additions and 97 deletions
|
@ -87,6 +87,7 @@ yarn kbn watch-bazel
|
|||
- @kbn/monaco
|
||||
- @kbn/rule-data-utils
|
||||
- @kbn/securitysolution-es-utils
|
||||
- @kbn/securitysolution-hook-utils
|
||||
- @kbn/securitysolution-io-ts-alerting-types
|
||||
- @kbn/securitysolution-io-ts-list-types
|
||||
- @kbn/securitysolution-io-ts-types
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue