UNPKG

@prefecthq/prefect-ui-library

Version:

This library is the Vue and Typescript component library for [Prefect 2](https://github.com/PrefectHQ/prefect) and [Prefect Cloud 2](https://www.prefect.io/cloud/). _The components and utilities in this project are not meant to be used independently_.

24 lines (23 loc) 2.38 kB
export declare function flip<K extends string, V extends string>(obj: Record<K, V>): Record<V, K>; export declare function omit<T extends Record<string, unknown>, K extends (keyof T)[]>(source: T, keys: K): Omit<T, K[number]>; export declare function clone<T>(source: T): T; export declare function hasProperty<T extends Record<string | symbol, unknown>>(needle: T, property: unknown): property is keyof T; export type MapKeysCallback<PreviousKey extends PropertyKey, Value, NewKey extends PropertyKey> = (key: PreviousKey, value: Value) => NewKey; export declare function mapKeys<K extends PropertyKey, V, Key extends PropertyKey>(object: Record<K, V>, callback: MapKeysCallback<K, V, Key>): Record<Key, V>; export type MapValuesCallback<Key extends PropertyKey, PreviousValue, NewValue> = (key: Key, value: PreviousValue) => NewValue; export declare function mapValues<Key extends PropertyKey, PreviousValue, NewValue>(object: Record<Key, PreviousValue>, callback: MapValuesCallback<Key, PreviousValue, NewValue>): Record<Key, NewValue>; export type MapEntriesCallback<PreviousKey extends PropertyKey, PreviousValue, NewKey extends PropertyKey, NewValue> = (key: PreviousKey, value: PreviousValue) => [NewKey, NewValue]; export declare function mapEntries<PreviousKey extends PropertyKey, PreviousValue, NewKey extends PropertyKey, NewValue>(object: Partial<Record<PreviousKey, PreviousValue>>, callback: MapEntriesCallback<PreviousKey, PreviousValue, NewKey, NewValue>): Partial<Record<NewKey, NewValue>>; export declare function isEmptyObject(value: unknown): value is Record<string, never>; export declare function isTypeRequired<T extends Record<PropertyKey, unknown>>(value: Partial<T>): value is Required<T>; export declare function hasString<T extends Record<PropertyKey, unknown>>(obj: T, str: string): boolean; export declare function isRecord(item: unknown): item is Record<PropertyKey, unknown>; /** * @deprecated Please use lodash.merge instead. */ export declare function merge<T extends Record<PropertyKey, unknown>>(target: T, ...sources: T[]): T; type EmptyObjectsRemoved<T extends Record<PropertyKey, unknown>> = { [P in keyof T]: T[P] extends Record<PropertyKey, unknown> ? EmptyObjectsRemoved<T[P]> | undefined : T[P]; }; export declare function removeEmptyObjects<T extends Record<PropertyKey, unknown>>(input: T): EmptyObjectsRemoved<T>; export {};