@barba/core
Version:
Create badass, fluid and smooth transition between your website's pages
39 lines (38 loc) • 1.19 kB
TypeScript
/**
* @module typings/core
*/
import { IgnoreOption, ISchemaAttribute, ITransitionPage, IView, PreventCheck, RequestCustomError } from '.';
import { Core } from '../core';
import { LogLevels } from '../modules/Logger';
export interface IBarbaOptions {
/** Array of transitions. */
transitions?: ITransitionPage[];
/** Array of views. */
views?: IView[];
/** Custom prevent check. */
prevent?: PreventCheck | null;
/** Request timeout. */
timeout?: number;
/** Custom request error. */
requestError?: RequestCustomError | undefined;
/** Disable cache or ignore some routes. */
cacheIgnore?: IgnoreOption;
/** Disable prefetch or ignore routes. */
prefetchIgnore?: IgnoreOption;
/** Custom [data-attribute]. */
schema?: ISchemaAttribute;
/** Enable debug mode. */
debug?: boolean;
/** Log level. */
logLevel?: keyof typeof LogLevels;
}
export interface IBarbaPlugin<T> {
/** Plugin version */
version: string;
/** Plugin name */
name: string;
/** Install method */
install(barba: Core, options?: T): void;
/** Init method */
init(): void;
}