* move test_helpers to the core * create base tsconfig * all tsconfigs use the base one * use test_helpers exposed from the src/core * move getFieldFormatsRegistry to data plugin * add test_utils project * compile types after checkout * add a stub for platform tsconfig.json * fix broken import * fix broken path to the base config * set tsBuildInfoFile for project without outDir * do not commit tsbuildinfo file * do not check output d.ts files * fix type error * use separate config to build types * rollback changes to include paths * mute import zone error * rename files to avoid references to tsd * do not use tsd for type tests * include all ts files in project * run buildRefs before type check to ensure the latest version * store tsbuildinfo locally * update paths to base config * comment out core/tsconfig.json * remove ui path * fix wrong tsbuildinfo path |
||
---|---|---|
.. | ||
test-d | ||
index.ts | ||
package.json | ||
README.md | ||
tsconfig.json | ||
yarn.lock |
@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
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.UnwrapPromise<T>
— Returns wrapped type of a promise.UnwrapPromiseOrReturn<T>
— Returns wrapped type of a promise or the type itself, if it isn't a promise.Values<T>
— Returns object or array value types.