braid-http 1.3.110 → 1.3.111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +12 -0
- package/package.json +3 -2
package/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IncomingMessage, ServerResponse } from 'http';
|
|
2
|
+
|
|
3
|
+
type RequestHandler = (req: IncomingMessage, res: ServerResponse) => void;
|
|
4
|
+
|
|
5
|
+
export declare function http_server(handler: RequestHandler): RequestHandler;
|
|
6
|
+
export declare function http_server(req: IncomingMessage, res: ServerResponse, next?: () => void): void;
|
|
7
|
+
|
|
8
|
+
export declare function free_cors(res: ServerResponse): void;
|
|
9
|
+
|
|
10
|
+
export declare function fetch(url: string, params?: Record<string, any>): Promise<Response>;
|
|
11
|
+
|
|
12
|
+
export declare function http_client(httpModule: any): any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "braid-http",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.111",
|
|
4
4
|
"description": "An implementation of Braid-HTTP for Node.js and Browsers",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node test/test.js",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"braid-http-client.js",
|
|
14
14
|
"braid-http-server.js",
|
|
15
15
|
"index.js",
|
|
16
|
-
"index.mjs"
|
|
16
|
+
"index.mjs",
|
|
17
|
+
"index.d.ts"
|
|
17
18
|
],
|
|
18
19
|
"main": "./index.js",
|
|
19
20
|
"types": "./index.d.ts",
|