@brandup/ui-helpers
Version:
65 lines (54 loc) • 2.07 kB
TypeScript
declare function hasProperty(obj: any, property: string): boolean;
declare function getProperty(obj: any, property: string): any;
declare const object_getProperty: typeof getProperty;
declare const object_hasProperty: typeof hasProperty;
declare namespace object {
export {
object_getProperty as getProperty,
object_hasProperty as hasProperty,
};
}
declare function isFunction(value: any): boolean;
declare function isString(value: any): value is string | String;
declare const type_isFunction: typeof isFunction;
declare const type_isString: typeof isString;
declare namespace type {
export {
type_isFunction as isFunction,
type_isString as isString,
};
}
declare const minWait: (func: (...args: any[]) => void, minTime?: number) => (...args: any[]) => void;
declare function minWaitAsync<TResult>(func: () => Promise<TResult>, minTime?: number, abort?: AbortSignal): Promise<TResult>;
declare function delay(time: number, abort?: AbortSignal): Promise<void>;
declare function timeout<T>(promise: Promise<T>, timeout: number): Promise<T>;
declare const TIMEOUT_ERROR = "Timeout";
declare const func_TIMEOUT_ERROR: typeof TIMEOUT_ERROR;
declare const func_delay: typeof delay;
declare const func_minWait: typeof minWait;
declare const func_minWaitAsync: typeof minWaitAsync;
declare const func_timeout: typeof timeout;
declare namespace func {
export {
func_TIMEOUT_ERROR as TIMEOUT_ERROR,
func_delay as delay,
func_minWait as minWait,
func_minWaitAsync as minWaitAsync,
func_timeout as timeout,
};
}
declare function getWordEnd(count: number, word: string, one?: string, two?: string, five?: string): string;
declare const word_getWordEnd: typeof getWordEnd;
declare namespace word {
export {
word_getWordEnd as getWordEnd,
};
}
declare const createGuid: () => string;
declare const guid_createGuid: typeof createGuid;
declare namespace guid {
export {
guid_createGuid as createGuid,
};
}
export { func as FuncHelper, guid as Guid, object as ObjectHelper, type as TypeHelper, word as WordHelper };