koajs / bodyparser

Koa body parsing middleware
MIT License
1.31k stars 117 forks source link

chore: export BodyParserOptions #156

Closed chentsulin closed 6 months ago

chentsulin commented 12 months ago

The original @types/koa-bodyparser has this Options export: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/koa-bodyparser/index.d.ts#L32-L87

Add it back to support this usage.

Checklist

3imed-jaberi commented 6 months ago

I don't think that we need to export the types here because we can extract it like this;

type ExtractedOption = NonNullable<Parameters<typeof bodyParserWrapper>[0]>

and you can check the following image, it's work perfectly! image