1.2.3 • Published 6 months ago

@types/express-formidable v1.2.3

Weekly downloads
1,842
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/express-formidable

Summary

This package contains type definitions for express-formidable (https://github.com/noraesae/express-formidable).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-formidable.

index.d.ts

// Type definitions for express-formidable 1.2
// Project: https://github.com/noraesae/express-formidable
// Definitions by: Torkild Dyvik Olsen <https://github.com/tdolsen>, Evan Shortiss <https://github.com/evanshortiss>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

import * as express from "express";
import { Fields, Files, EventNames } from "formidable";

// Extend the express request object with attached formidable files and fields
declare global {
  namespace Express {
    interface Request {
      fields?: Fields ;
      files?: Files ;
    }
  }
}

interface ExpressFormidableOptions {
    encoding?: string ;
    uploadDir?: string ;
    keepExtensions?: boolean ;
    type?: "multipart" | "urlencoded" ;
    maxFileSize?: number ;
    maxFieldsSize?: number ;
    maxFields?: number ;
    hash?: boolean | "sha1" | "md5" ;
    multiples?: boolean ;
}

interface ExpressFormidableEvents {
  event: EventNames;
  action: (req: express.Request, res: express.Response, next: express.NextFunction, ...formidableParameters: any[]) => void;
}

declare function ExpressFormidable(options?: ExpressFormidableOptions, events?: ExpressFormidableEvents[]): express.RequestHandler;

declare namespace ExpressFormidable {}

export = ExpressFormidable;

Additional Details

Credits

These definitions were written by Torkild Dyvik Olsen, and Evan Shortiss.

1.2.3

6 months ago

1.2.2

7 months ago

1.2.1

7 months ago

1.2.0

3 years ago

1.0.5

3 years ago

1.0.4

5 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

7 years ago