Skip to content

Commit 681c213

Browse files
committed
Added support for prefix to type definitions
1 parent a27ac70 commit 681c213

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "small-router",
3-
"version": "1.1.2",
3+
"version": "1.1.4",
44
"description": "Small router module that creates http server and runs callbacks that have have been added for a route via the api",
55
"main": "index.js",
66
"scripts": {

small-router.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
import http, { Server } from 'http'
1+
import http from 'http'
2+
import { Server } from 'net'
23
import { ParsedUrlQuery } from 'querystring';
34
import { Fields, Files } from 'formidable'
45

56
export type addRouteCB = (req: http.IncomingMessage, res: http.ServerResponse, rawUrl: string, queryString: ParsedUrlQuery) => void
67
export type parseDataCB = (err: null | Error, fields: Fields, files: Files) => void
78

89
export class Router {
9-
constructor(): void;
10+
prefix: string;
11+
constructor();
1012
addRoute(route: string, cb: addRouteCB): boolean;
1113
addAssetPath(asset: string, path: string, overWrite?: boolean): boolean;
1214
route(req: http.IncomingMessage, res: http.ServerResponse): void;

0 commit comments

Comments
 (0)