UNPKG

@engie-group/fluid-design-system

Version:

The Fluid Design System is ENGIE’s open-source library to create, build and deliver ENGIE digital services in a more efficient way.

39 lines (38 loc) 1.49 kB
/** * -------------------------------------------------------------------------- * Fork from Bootstrap (v4-without-jquery): util.js * -------------------------------------------------------------------------- */ /** * -------------------------------------------------------------------------- * Public Util Api * -------------------------------------------------------------------------- */ declare const Util: { TRANSITION_END: string; getUID(prefix: string): string; getSelectorFromElement(element: Element): string | null; getTransitionDurationFromElement(element?: Element): number; reflow(element: HTMLElement): number; triggerTransitionEnd(element: Element): void; isElement(obj: any): boolean; emulateTransitionEnd(element: Element, duration: number): void; typeCheckConfig(componentName: any, config: any, configTypes: any): void; makeArray(nodeList: HTMLCollection | NodeListOf<Element>): Element[]; findShadowRoot(element: Element): ShadowRoot | null; throttle(func: any, wait: any, leading: any, trailing: any, context: any): ReturnFunction; /** * Coerces value to a boolean * @param value - value to be coerced * * @exemple * - `coerceBool('something')` returns `true` * - `coerceBool(undefined)` returns `false` * - `coerceBool(null)` returns `false` */ coerceBool(value: any): boolean; }; export interface ReturnFunction { (): unknown | void; } export default Util;