0.8.39 • Published 6 months ago

@types/pathjs v0.8.39

Weekly downloads
3,491
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/pathjs

Summary

This package contains type definitions for Pathjs (https://github.com/mtrpcic/pathjs).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pathjs.

index.d.ts

// Type definitions for Pathjs v0.8.4
// Project: https://github.com/mtrpcic/pathjs
// Definitions by: Lokesh Peta <https://github.com/lokeshpeta>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

export interface IDictionary<T> {
    [id: string]: T;
}

interface IPathHistory{
    initial: any;
    pushState(state: any, title: string, path: string):void;
    popState(event: any): void;    
    listen(fallback: any): void;
}

interface IPathRoute{
    to(fn: () => void): IPathRoute;
    enter(fns: Function|Function[]): IPathRoute;
    exit(fn: () => void): IPathRoute;
    partition(): string[];
    run():void;
}

interface IPathRoutes{
    current?: string | undefined,
    root?: string | undefined,
    rescue?: Function | undefined,
    previous?: string | undefined,
    defined: IDictionary<IPathRoute>
}

interface IPathCore{
    route: IPathRouteConstructor;
}

interface IPathRouteConstructor {
    new (path: string): IPathRoute;
}

interface IPath {
    map(path: string): IPathRoute;
    
    root(path: string): void;
    
    rescue(fn: Function): void;
    
    history: IPathHistory;
    
    match(path: string, parameterize: boolean): IPathRoute | null;
    
    dispatch(passed_route: string): void;
    
    listen(): void;
    
    core: IPathCore;
    
    routes: IPathRoutes
}

declare var Path: IPath;

Additional Details

  • Last updated: Thu, 08 Jul 2021 20:19:28 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Lokesh Peta.

0.8.38

7 months ago

0.8.37

8 months ago

0.8.39

6 months ago

0.8.36

3 years ago

0.8.35

4 years ago

0.8.34

5 years ago

0.8.33

7 years ago

0.8.32

8 years ago

0.8.31

8 years ago

0.8.30

8 years ago

0.8.29

8 years ago

0.8.28

8 years ago

0.8.27-alpha

8 years ago

0.8.26-alpha

8 years ago

0.8.25-alpha

8 years ago

0.8.24-alpha

8 years ago

0.8.23-alpha

8 years ago

0.8.22-alpha

8 years ago

0.8.21-alpha

8 years ago

0.8.16-alpha

8 years ago

0.8.15-alpha

8 years ago