busboy-body-parser icon indicating copy to clipboard operation
busboy-body-parser copied to clipboard

Add support to typescript

Open ReyPena opened this issue 6 years ago • 1 comments

this will help for projects build on node. It requires a module declaration on a .d.ts file. something like: declare module 'busboy-body-parser'

ReyPena avatar Oct 19 '18 23:10 ReyPena

@ReyPena you can overcome the support by simply creating a new interface and adding the files as attribute there as Typescript have type declaration merging it will just give you a new type with files on.

interface RequestWithFiles extends Request {
    files: any
}

Hope this helps

houssem-yahiaoui avatar Feb 02 '19 22:02 houssem-yahiaoui