import * as React from 'react'; import PropTypes from 'prop-types'; export { default as isDeepEqual } from 'fast-deep-equal'; /** @hidden */ export type FlowAnyObject = any; /** @hidden */ export type FlowAnyFunction = any; /** @hidden */ export type FlowAnyExistential = any; /** * Get the type of all the values of an object. * * Same as the legacy Flow `$Values` type. * * @hidden */ export type ObjectValues = T[keyof T]; /** @hidden */ export type TimeoutId = ReturnType; /** * Extract the type of `ref` from a react component * * @hidden */ export type ReactRefType = C extends React.Component ? C : C extends new (props: any) => React.Component ? C : C extends React.RefForwardingComponent ? T : (C extends React.JSXElementConstructor<{ ref?: infer R; }> ? R : C extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[C]['ref'] : unknown) extends React.Ref | string | undefined ? T : unknown; /** * Allows creating an object map type with a dynamic key type. * * TypeScript only allows `string` for `K` in `{[key: K]: V}` so we need a utility to bridge * the gap. * * This is an alias for TypeScript’s `Record` type, but the name “record” is confusing given our * Airtable domain model. * * @hidden */ export type ObjectMap = { [P in K]: V; }; /** * Creates an enum from provided string arguments. * * Useful for consumer-facing enums (eg `Button#variant`) where we want to make the external * developer experience convenient by providing a string value, but also want to internally * reference enum values using object notation. * * @hidden */ export declare function createEnum(...enumValues: Array): { [K in T]: K; }; /** * Creates a React propType for a provided enum. * * @hidden */ export declare function createPropTypeFromEnum(enumData: { [K in T]: T; }): PropTypes.Requireable; /** * Creates a responsive React propType for a provided enum. * * This allows the prop to be either a valid enum property, or a map of viewport sizes to valid enum * properties. * * @hidden */ export declare function createResponsivePropTypeFromEnum(enumData: { [K in T]: T; }): PropTypes.Validator; /** * Creates a Type for an enum created using `createEnum`. * * @hidden */ export type EnumType = keyof T; /** * Safely cast a value to the type passed in as a type parameter. * * This was added in the TypeScript migration to provide a safe translation for Flow’s type cast * operator `(x: T)`. * * @hidden */ export declare function cast(x: T): T; /** * @hidden */ export declare function cloneDeep(obj: T): T; /** * @hidden */ export declare function keys(obj: Obj): Array; /** * @hidden */ export declare function values(obj: Obj): Array>; /** * @hidden */ export declare function entries(obj: Obj): Array<[keyof Obj, ObjectValues]>; /** * @hidden */ export declare function fireAndForgetPromise(fn: () => Promise): void; /** * @hidden */ export declare function has(obj: T, key: keyof any): key is keyof T; /** * @hidden */ export declare function getEnumValueIfExists(enumObj: ObjectMap, valueToCheck: string): V | null; /** * @hidden */ export declare function assertEnumValue(enumObj: ObjectMap, valueToCheck: string): V; /** * @hidden */ export declare function isEnumValue(enumObj: { [key: string]: string; }, valueToCheck: string): boolean; /** * @hidden */ export declare function isObjectEmpty(obj: object): boolean; /** * @hidden */ export declare function isNullOrUndefinedOrEmpty(value: unknown): boolean; /** * @hidden */ export declare function compact(array: ReadonlyArray): Array; /** * @hidden */ export declare function clamp(n: number, lowerBound: number, upperBound: number): number; /** @hidden */ interface ReadonlyDeepArray extends Array> { } /** * @hidden */ export declare function flattenDeep(array: ReadonlyDeepArray): Array; /** * @hidden */ export declare function keyBy(array: ReadonlyArray, getKey: (arg1: Item) => Key): ObjectMap; /** * @hidden */ export declare function getId({ id }: { id: string; }): string; /** * @hidden */ export declare function uniqBy(array: ReadonlyArray, getKey: (arg1: Item) => Key): Array; /** @hidden */ export declare function getLocallyUniqueId(prefix?: string): string; /** * A more restrictive version of Lodash's `get`. Notable differences: * - Will only search an object's own properties * - Only allows indexing into plain objects - searching in `number`, `string`, `Array`, `null`, or non-plain objects will throw * * @hidden */ export declare function getValueAtOwnPath(value: unknown, path: ReadonlyArray): unknown; /** @hidden */ export declare function arrayDifference(a: ReadonlyArray, b: ReadonlyArray): Array; /** @hidden */ export declare function debounce>(fn: (...args: Args) => void, timeoutMs: number): (...args: Args) => void; /** @hidden */ export declare function isBlockDevelopmentRestrictionEnabled(): boolean; /** * Added for use in Gantt View, to enable i18n. * * @hidden * */ export declare function getLocaleAndDefaultLocale(): { locale?: string; defaultLocale?: string; }; //# sourceMappingURL=private_utils.d.ts.map