* chore(NA): update gitignore to include first changes from moving into a single package.json * chore(NA): update gitignore * chore(NA): move all the dependencies into the single package.json and apply changes to bootstrap * chore(NA): fix types problems after the single package json * chore(NA): include code to find the dependencies used across the code * chore(NA): introduce pure lockfile for install dependencies on build * chore(NA): update clean task to not delete anything from xpack node_modules * chore(NA): update gitignore to remove development temporary rules * chore(NA): update notice file * chore(NA): update jest snapshots * chore(NA): fix whitelisted licenses to include a new specify form of an already included one * chore(NA): remove check lockfile symlinks from child projects * chore(NA): fix eslint and add missing declared deps on single pkg json * chore(NA): correctly update notice * chore(NA): fix failing jest test for storyshots.test.tsx * chore(NA): fix cypress multi reporter path * chore(NA): fix Project tests check * chore(NA): fix problem with logic to detect used dependes on oss build * chore(NA): include correct x-pack plugins dep discovery * chore(NA): discover entries under dynamic requires on vis_type_timelion * chore(NA): remove canvas * test(NA): fix jest unit tests * chore(NA): remove double react declaration from storyshot test file * chore(NA): try removing isOSS check * chore(NA): support for plugin development * chore(NA): update logic to fix unit tests and typechecking * chore(NA): support to run npm scripts in child kbn projects across all envs * chore(NA): support github checks reporter on x-pack and remove cpy types as the package correctly provides them * chore(NA): update cpy version * chore(NA): include last kbn pm changes * chore(NA): update style on build_production_projects.ts * chore(NA): remove any cast fom telemetry opt in stats * chore(NA): remove del and re-use rm -rf again Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # package.json # packages/kbn-pm/dist/index.js # x-pack/package.json # yarn.lock |
||
---|---|---|
.. | ||
jest | ||
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
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.