Installation
npm install --save @types/masonry-layout
Summary
This package contains type definitions for Masonry (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;
}
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;
}
}
Additional Details
- Last updated: Fri, 09 Jul 2021 02:32:34 GMT
- Dependencies: @types/jquery
- Global values: none
Credits
These definitions were written by Mark Wilson, and Travis Brown.