@types/pathjs
TypeScript definitions for Pathjs v0.8.4
Last updated 10 years ago by types .
MIT · Original npm · Tarball · package.json
$ cnpm install @types/pathjs 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 0.8.36                                ...           latest (5 years ago)
  • 0.8.34                                ...           ts2.0 (7 years ago)
  • 0.8.34                                ...           ts2.1 (7 years ago)
  • 0.8.34                                ...           ts2.2 (7 years ago)
  • 0.8.34                                ...           ts2.3 (7 years ago)
  • 0.8.34                                ...           ts2.4 (7 years ago)
  • 0.8.34                                ...           ts2.5 (7 years ago)
  • 0.8.34                                ...           ts2.6 (7 years ago)
  • 0.8.34                                ...           ts2.7 (7 years ago)
  • 0.8.34                                ...           ts2.8 (7 years ago)
  • 0.8.34                                ...           ts2.9 (7 years ago)
  • 0.8.35                                ...           ts3.0 (6 years ago)
  • 0.8.35                                ...           ts3.1 (6 years ago)
  • 0.8.35                                ...           ts3.2 (6 years ago)
  • 0.8.35                                ...           ts3.3 (6 years ago)
  • 0.8.35                                ...           ts3.4 (6 years ago)
  • 0.8.35                                ...           ts3.5 (6 years ago)
  • 0.8.36                                ...           ts3.6 (5 years ago)
  • 0.8.36                                ...           ts3.7 (5 years ago)
  • 0.8.36                                ...           ts3.8 (5 years ago)
  • 0.8.36                                ...           ts3.9 (5 years ago)
  • 0.8.36                                ...           ts4.0 (5 years ago)
  • 0.8.36                                ...           ts4.1 (5 years ago)
  • 0.8.36                                ...           ts4.2 (5 years ago)
  • 0.8.36                                ...           ts4.3 (5 years ago)
  • 0.8.36                                ...           ts4.4 (5 years ago)
  • 0.8.36                                ...           ts4.5 (5 years ago)
  • 0.8.36                                ...           ts4.6 (5 years ago)
  • 0.8.36                                ...           ts4.7 (5 years ago)
  • 0.8.36                                ...           ts4.8 (5 years ago)
  • 0.8.36                                ...           ts4.9 (5 years ago)
  • 0.8.36                                ...           ts5.0 (5 years ago)
  • 0.8.36                                ...           ts5.1 (5 years ago)

18 Versions

  • 0.8.36                                ...           5 years ago
  • 0.8.35                                ...           6 years ago
  • 0.8.34                                ...           7 years ago
  • 0.8.33                                ...           9 years ago
  • 0.8.32                                ...           10 years ago
  • 0.8.31                                ...           10 years ago
  • 0.8.30                                ...           10 years ago
  • 0.8.29                                ...           10 years ago
  • 0.8.28                                ...           10 years ago
  • 0.8.27-alpha                                ...           10 years ago
  • 0.8.26-alpha                                ...           10 years ago
  • 0.8.25-alpha                                ...           10 years ago
  • 0.8.24-alpha                                ...           10 years ago
  • 0.8.23-alpha                                ...           10 years ago
  • 0.8.22-alpha                                ...           10 years ago
  • 0.8.21-alpha                                ...           10 years ago
  • 0.8.16-alpha                                ...           10 years ago
  • 0.8.15-alpha                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org | Home |