Skip to content

Commit d964bad

Browse files
Merge pull request francismeynard#5 from Envek/chore/typescript-typings
Add TypeScript typings
2 parents e2c4a85 + 12175ff commit d964bad

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

index.d.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
declare module "lambda-multipart-parser" {
2+
import {
3+
APIGatewayProxyEvent,
4+
} from "aws-lambda"
5+
6+
interface MultipartFile {
7+
filename: string
8+
content: Buffer
9+
contentType: string
10+
encoding: string
11+
fieldname: string
12+
}
13+
14+
type MultipartRequest = { files: MultipartFile[] } & Record<string, string>
15+
16+
export function parse (event: APIGatewayProxyEvent): Promise<MultipartRequest>
17+
}

0 commit comments

Comments
 (0)