72c5c5cb22
* Shim input_control_vis * Convert input_control_vis src files to typescript * Add Required, Optional, Required and Class types to kbn-utility-types * Collect all ui/* imports into legacy imports file * Pass down plugin deps from top level * Add timeout and terminate_after options to SearchSourceFields |
||
---|---|---|
.. | ||
test-d | ||
index.ts | ||
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 { UnwrapPromise } from '@kbn/utility-types';
type A = Promise<string>;
type B = UnwrapPromise<A>; // string
Reference
Ensure<T, X>
— Makes sureT
is of typeX
.ObservableLike<T>
— Minimal interface for an object resembling anObservable
.RecursiveReadonly<T>
— LikeReadonly<T>
, but freezes object recursively.ShallowPromise<T>
— Same asPromise
type, but it flat maps the wrapped type.UnwrapObservable<T>
— Returns wrapped type of an observable.UnwrapPromise<T>
— Returns wrapped type of a promise.