mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Restructure files and add missing declarations * Add JQuery declarations * Restructure tests * Add carousel tests * Add more tests and missing JQuery declarations * Add waves declaration and a test * Add static init methods and tests * allow jquery and cash object to be passed to init * Remove redundant reference * Clean up * Clean up * Clean up and add tests * Clean up and add tests
34 lines
866 B
TypeScript
34 lines
866 B
TypeScript
/// <reference path="./common.d.ts" />
|
|
|
|
declare namespace M {
|
|
class Parallax extends Component<ParallaxOptions> {
|
|
/**
|
|
* Get Instance
|
|
*/
|
|
static getInstance(elem: Element): Parallax;
|
|
|
|
/**
|
|
* Init Parallax
|
|
*/
|
|
static init(els: Element, options?: Partial<ParallaxOptions>): Parallax;
|
|
|
|
/**
|
|
* Init Parallaxs
|
|
*/
|
|
static init(els: MElements, options?: Partial<ParallaxOptions>): Parallax[];
|
|
}
|
|
|
|
interface ParallaxOptions {
|
|
/**
|
|
* The minimum width of the screen, in pixels, where the parallax functionality starts working
|
|
* @default 0
|
|
*/
|
|
responsiveThreshold: number;
|
|
}
|
|
}
|
|
|
|
interface JQuery {
|
|
parallax(options?: Partial<M.ParallaxOptions>): JQuery;
|
|
parallax(method: keyof Pick<M.Parallax, "destroy">): JQuery;
|
|
}
|