Installation
npm install --save @types/masonry-layout
Summary
This package contains type definitions for masonry-layout (https://github.com/desandro/masonry).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/masonry-layout.
export = Masonry;
declare class Masonry {
constructor(options?: Masonry.Options);
constructor(selector: string | Element, options?: Masonry.Options);
masonry?(): void;
masonry?(eventName: string, listener: any): void;
layout?(): void;
layoutItems?(items: any[], isStill?: boolean): void;
stamp?(elements: any[]): void;
unstamp?(elements: any[]): void;
appended?(elements: any[]): void;
prepended?(elements: any[]): void;
addItems?(elements: any[]): void;
remove?(elements: any[]): void;
on?(eventName: string, listener: any): void;
off?(eventName: string, listener: any): void;
once?(eventName: string, listener: any): void;
reloadItems?(): void;
destroy?(): void;
getItemElements?(): any[];
data?(element: Element): Masonry;
option?(options: Masonry.Options): void;
}
declare namespace Masonry {
interface HiddenOrVisibleStyleOption {
transform?: string | undefined;
opacity?: number | undefined;
}
interface Options {
itemSelector?: string | undefined;
columnWidth?: any;
percentPosition?: boolean | undefined;
gutter?: any;
stamp?: string | undefined;
fitWidth?: boolean | undefined;
originLeft?: boolean | undefined;
originTop?: boolean | undefined;
horizontalOrder?: boolean | undefined;
hiddenStyle?: HiddenOrVisibleStyleOption | undefined;
visibleStyle?: HiddenOrVisibleStyleOption | undefined;
containerStyle?: {} | undefined;
transitionDuration?: any;
stagger?: string | number | undefined;
resize?: boolean | undefined;
initLayout?: boolean | undefined;
}
}
declare global {
interface JQuery {
masonry(options?: Masonry.Options): JQuery;
masonry(selector: string | Element, options?: Masonry.Options | JQuery): JQuery;
}
}
Additional Details
- Last updated: Mon, 13 May 2024 17:35:53 GMT
- Dependencies: @types/jquery
Credits
These definitions were written by Mark Wilson, and Travis Brown.