import type React from 'react'; import type { Nullish } from '../types/UtilityTypes'; /** wrapper func for setState that returns a promise */ export declare function setStateAsync(that: React.Component, newState: T | ((prevState: T) => T)): Promise; /** wrapper for timeout that returns a promise */ export declare function timeout(ms: Number): Promise; /** Wraps a promise that will reject if not not resolved in milliseconds */ export declare function promiseWithTimeout(ms: Number, promise: Promise): Promise; export declare function isClassComponent(component: unknown): boolean; export declare function lastElement(array: Array): T | undefined; export declare function arrayInsert(array: Array, index: number, newItem: T): T[]; export declare function addOptional(a: T, b: U | null): T & Partial; export declare function shallowMergeObjects(a: Nullish, b: Nullish): T | null; export declare function getNativeNodeHandle(nativeRef: React.Component): number;