From 00b127d9e6df5d8d5d76a6f2fd70a594edbf54a3 Mon Sep 17 00:00:00 2001 From: Slee Woo <74734701+sleewoo@users.noreply.github.com> Date: Tue, 24 Feb 2026 06:49:08 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74513=20Add=20?= =?UTF-8?q?named=20plugin=20exports=20to=20formidable=20types=20by=20@slee?= =?UTF-8?q?woo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/formidable/formidable-tests.ts | 14 ++++++++++++++ types/formidable/index.d.ts | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/types/formidable/formidable-tests.ts b/types/formidable/formidable-tests.ts index a3576628109386..2d377b1483d4f8 100644 --- a/types/formidable/formidable-tests.ts +++ b/types/formidable/formidable-tests.ts @@ -12,6 +12,11 @@ import { PersistentFile, plugins, VolatileFile, + PluginFunction, + octetstream, + querystring, + multipart, + json, } from "formidable"; import * as http from "http"; @@ -219,3 +224,12 @@ new IncomingForm(); // $ExpectType IncomingForm formidable(); + +// $ExpectType PluginFunction +octetstream; +// $ExpectType PluginFunction +querystring; +// $ExpectType PluginFunction +multipart; +// $ExpectType PluginFunction +json; diff --git a/types/formidable/index.d.ts b/types/formidable/index.d.ts index bdc3bd7aa40b8c..4a3be81f923c03 100644 --- a/types/formidable/index.d.ts +++ b/types/formidable/index.d.ts @@ -326,6 +326,11 @@ declare const formidable: { IncomingForm: typeof Formidable; // parsers and mapped parsers parsers: typeof parsers; + // add named plugin exports + octetstream: formidable.PluginFunction; + querystring: formidable.PluginFunction; + multipart: formidable.PluginFunction; + json: formidable.PluginFunction; } & formidable.MappedParsers; export = formidable; From a9b44b2a1c7fd92b9ee86b0a5980505c03fff1c0 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Tue, 24 Feb 2026 04:49:47 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A4=96=20dprint=20fmt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/formidable/formidable-tests.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/types/formidable/formidable-tests.ts b/types/formidable/formidable-tests.ts index 2d377b1483d4f8..76fa49e1206caa 100644 --- a/types/formidable/formidable-tests.ts +++ b/types/formidable/formidable-tests.ts @@ -6,17 +6,17 @@ import { Formidable, formidable as formidableAlias, IncomingForm, + json, + multipart, MultipartParser, + octetstream, Options, Part, PersistentFile, - plugins, - VolatileFile, PluginFunction, - octetstream, + plugins, querystring, - multipart, - json, + VolatileFile, } from "formidable"; import * as http from "http";