@egjs/flicking
Version:
Everyday 30 million people experience. It's reliable, flexible and extendable carousel.
25 lines (24 loc) • 1.68 kB
TypeScript
import { ElementLike, OriginalStyle, BoundingBox } from "./types";
export declare function merge(target: object, ...srcs: object[]): object;
export declare function parseElement(element: ElementLike | ElementLike[]): HTMLElement[];
export declare function isString(value: any): value is string;
export declare function classList(element: HTMLElement): string[];
export declare function addClass(element: HTMLElement, className: string): void;
export declare function hasClass(element: HTMLElement, className: string): boolean;
export declare function applyCSS(element: HTMLElement, cssObj: object): void;
export declare function clamp(val: number, min: number, max: number): number;
export declare function isBetween(val: number, min: number, max: number): boolean;
export interface ArrayLike<T> {
length: number;
[index: number]: T;
}
export declare function toArray<T>(iterable: ArrayLike<T>): T[];
export declare function isArray(arr: any): boolean;
export declare function parseArithmeticExpression(cssValue: number | string, base: number, defaultVal?: number): number;
export declare function getProgress(pos: number, range: number[]): number;
export declare function findIndex<T>(iterable: T[], callback: (el: T) => boolean): number;
export declare function counter(max: number): number[];
export declare function circulate(value: number, min: number, max: number, indexed: boolean): number;
export declare function restoreStyle(element: HTMLElement, originalStyle: OriginalStyle): void;
export declare function withFlickingMethods(prototype: any, flickingName: string): void;
export declare function getBbox(element: HTMLElement, useOffset: boolean): BoundingBox;