From 318787546ea3afeb0477752b72dffb0f85d6b017 Mon Sep 17 00:00:00 2001 From: "M. Firhan Azmi Nor" Date: Wed, 31 Jul 2024 11:25:17 +0000 Subject: [PATCH] chore: add typescript --- index.d.ts | 7 +++++++ package.json | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..96d58d0 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,7 @@ +export declare function tunnel(req: any, res: any, next: any): void; +export declare function _static(dir: any): (req: any, res: any, next: any) => void; +export { _static as static }; +export declare function multipart(options: any): { + single: (name: any) => (req: any, res: any, next: any) => void; + array: (name: any) => (req: any, res: any, next: any) => void; +}; diff --git a/package.json b/package.json index fcf7d24..e71ab67 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "0.0.12", "description": "The Middleware portion of the Layer8 pipeline", "main": "index.js", + "types": "index.d.ts", "scripts": { "test": "echo \"Testing goes here...\" && exit 0" }, @@ -30,6 +31,7 @@ "files": [ "index.js", "./dist/middleware.json", - "./dist/wasm_exec.js" + "./dist/wasm_exec.js", + "index.d.ts" ] }