@barba/core
Version:
Create badass, fluid and smooth transition between your website's pages
34 lines (33 loc) • 799 B
TypeScript
/**
* @barba/core/utils/helpers
* <br><br>
* ## Helpers
*
* - Update next page data
*
* @module core/utils/helpers
* @preferred
*/
/***/
import { pathToRegexp as ptr } from 'path-to-regexp';
import { IResponse, ITransitionData } from '../defs';
/**
* Update `data.next`, the title and the history
*/
export declare const update: (page: Promise<IResponse | void>, data: ITransitionData) => Promise<void>;
/**
* Next tick
*/
export declare const nextTick: () => Promise<unknown>;
/**
* Turn a route string such as `/user/:name` into a regular expression.
*
* Used for:
*
* - routes to ignore
* - route transition resolution
*
* @see https://www.npmjs.com/package/path-to-regexp
*/
declare const pathToRegexp: typeof ptr;
export { pathToRegexp };