# @types/pathjs

> TypeScript definitions for pathjs

Latest version **0.8.39** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/pathjs
pnpm add @types/pathjs
yarn add @types/pathjs
bun add @types/pathjs
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.8.39 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51426 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/pathjs
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pathjs
- npm.io page: https://npm.io/package/@types/pathjs

## Recent versions

- 0.8.39 (latest) — 2023-11-07
- 0.8.36 (ts3.6) — 2021-07-08
- 0.8.35 (ts3.0) — 2020-05-15
- 0.8.34 (ts2.0) — 2019-02-05
- 0.8.38 — 2023-10-18
- 0.8.37 — 2023-09-24
- 0.8.33 — 2017-08-21
- 0.8.32 — 2016-09-19
- 0.8.31 — 2016-08-25
- 0.8.30 — 2016-08-19
- 0.8.29 — 2016-08-02
- 0.8.28 — 2016-07-14
- 0.8.27-alpha — 2016-07-08
- 0.8.26-alpha — 2016-07-04
- 0.8.25-alpha — 2016-07-02
- … 6 more at https://npm.io/package/@types/pathjs/versions

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pathjs/index.d.ts)
````ts
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: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Lokesh Peta](https://github.com/lokeshpeta).

---
_Source: https://npm.io/package/@types/pathjs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
