mirror of
https://github.com/elastic/kibana.git
synced 2025-04-21 16:29:04 -04:00
* chore(NA): remove @kbn/utility-types/jest subpackage (#133448)
* chore(NA): remove @kbn/utility-types/jest subpackage
* chore(NA): include migration rule for import path
* chore(NA): remove double import
* chore(NA): creating a new package
* chore(NA): remove jest mentions from @kbn/utility-types
* docs(NA): complete new readme file
* [CI] Auto-commit changed files from 'node scripts/generate packages_build_manifest'
* chore(NA): remove expect error comment
* chore(NA): merge and solve problems with merge on latest upstream
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit
|
||
---|---|---|
.. | ||
src | ||
BUILD.bazel | ||
package.json | ||
README.md | ||
tsconfig.json |
@kbn/utility-types
TypeScript utility types for usage in Kibana.
- This package re-exports a subset of the items in
utility-types
- You can also add more utility types here.
Usage
import { UnwrapObservable } from '@kbn/utility-types';
type A = Observable<string>;
type B = UnwrapObservable<A>; // string
Reference
Assign<T, U>
— FromU
assign properties toT
(just like object assign).Ensure<T, X>
— Makes sureT
is of typeX
.ObservableLike<T>
— Minimal interface for an object resembling anObservable
.PublicContract<T>
— Returns an object with public keys only.PublicKeys<T>
— Returns public keys of an object.RecursiveReadonly<T>
— LikeReadonly<T>
, but freezes object recursively.ShallowPromise<T>
— Same asPromise
type, but it flat maps the wrapped type.UnionToIntersection<T>
— Converts a union of types into an intersection.UnwrapObservable<T>
— Returns wrapped type of an observable.Values<T>
— Returns object or array value types.