koajs / bodyparser

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

chore: export BodyParserOptions #156

Closed chentsulin closed 7 months ago

chentsulin commented 1 year 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 7 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