@types/formidable
Advanced tools
Comparing version 3.4.1 to 3.4.2
@@ -19,4 +19,4 @@ /** | ||
*/ | ||
parse(request: IncomingMessage): Promise<[Fields, Files]>; | ||
parse(request: IncomingMessage, callback?: (err: any, fields: Fields, files: Files) => void): void; | ||
parse<FieldKey extends string, FileKey extends string>(request: IncomingMessage): Promise<[Fields<FieldKey>, Files<FileKey>]>; | ||
parse<FieldKey extends string, FileKey extends string>(request: IncomingMessage, callback?: (err: any, fields: Fields<FieldKey>, files: Files<FileKey>) => void): void; | ||
@@ -23,0 +23,0 @@ once(eventName: 'end', listener: () => void): this; |
@@ -5,2 +5,3 @@ // Type definitions for formidable 3.4 | ||
// Martin Badin <https://github.com/martin-badin> | ||
// devLana <https://github.com/devLana> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -208,8 +209,8 @@ | ||
interface Fields { | ||
[field: string]: string[]; | ||
} | ||
interface Files { | ||
[file: string]: File[]; | ||
} | ||
type Fields<T extends string = string> = { | ||
readonly [Prop in T]?: string[]; | ||
}; | ||
type Files<U extends string = string> = { | ||
readonly [Prop in U]?: File[]; | ||
}; | ||
@@ -216,0 +217,0 @@ interface Part extends Stream { |
{ | ||
"name": "@types/formidable", | ||
"version": "3.4.1", | ||
"version": "3.4.2", | ||
"description": "TypeScript definitions for formidable", | ||
@@ -17,2 +17,7 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/formidable", | ||
"githubUsername": "martin-badin" | ||
}, | ||
{ | ||
"name": "devLana", | ||
"url": "https://github.com/devLana", | ||
"githubUsername": "devLana" | ||
} | ||
@@ -31,4 +36,4 @@ ], | ||
}, | ||
"typesPublisherContentHash": "d728b78e670a4ab500a01657982107bfbadd2afbe5903a8be60d9b6d5489feca", | ||
"typesPublisherContentHash": "9360371b476e2f417c95c64d7036ff7e969637437f68fcf317dbc15d086922db", | ||
"typeScriptVersion": "4.3" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Fri, 11 Aug 2023 03:32:48 GMT | ||
* Last updated: Tue, 29 Aug 2023 12:33:20 GMT | ||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/node:events](https://npmjs.com/package/@types/node:events) | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by [Wim Looman](https://github.com/Nemo157), and [Martin Badin](https://github.com/martin-badin). | ||
These definitions were written by [Wim Looman](https://github.com/Nemo157), [Martin Badin](https://github.com/martin-badin), and [devLana](https://github.com/devLana). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19320
433