Skip to content

Commit

Permalink
chore: update ts
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobrosenberg committed May 26, 2024
1 parent c9a3d55 commit bce61ad
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions typings/lib/runtime/Route/Route.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ export class Route {
fragments: RouteFragment[];
/** @type {RoutifyLoadReturn} */
load: RoutifyLoadReturn;
/** @type {Route} */
prevRoute: Route;
/** @type {Route} */
nextRoute: Route;
sourceUrl: URL;
router: import("../index.js").RouterClass;
mode: UrlState;
Expand Down
7 changes: 6 additions & 1 deletion typings/lib/runtime/Router/Router.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,12 @@ export class Router implements Readable<Router> {
* @returns {Promise<true|false>}
*/
_setUrl(url: string, mode: UrlState, isInternal?: boolean, state?: any | undefined): Promise<true | false>;
setActiveRoute(route: any): void;
/**
*
* @param {Route} route
* @param {Route} stackedRoute the route that was stacked in history with the same id
*/
setActiveRoute(route: Route, stackedRoute: Route): void;
/**
* The last route that was active, regardless of whether it precedes the current route in history
* @type {Route}
Expand Down
2 changes: 1 addition & 1 deletion typings/lib/runtime/plugins/scroller/ScrollContext.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class ScrollContext {
/** @type {HTMLElement} */
scrollTarget: HTMLElement;
init(): Promise<void>;
shouldScrollToElem: any;
shouldScrollToElem: true | HTMLElement;
boundary: HTMLElement;
getNearestBoundary(): Promise<HTMLElement>;
handleScrollInstructions(): Promise<any>;
Expand Down
5 changes: 4 additions & 1 deletion typings/lib/runtime/utils/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ export function populateUrl(path: string, params: {
[x: string]: (string | string[]);
}, overloadStringifier: (obj: {
[x: string]: string;
}) => string): string;
}) => string): {
path: string;
query: string;
};
export function urlFromAddress(): string;
export function autoIncrementer(storeObj?: {}, name?: string): any;
export function distinctBy<T>(prop: string): (arg0: T, arg1: number, arg2: T[]) => boolean;
Expand Down

0 comments on commit bce61ad

Please sign in to comment.