From db691f37d67c177e17c7fb7165fe2ed55e1c26de Mon Sep 17 00:00:00 2001 From: Anton Kovalyov Date: Mon, 2 Oct 2017 15:12:08 -0700 Subject: [PATCH] flow-typed update --- flow-typed/npm/babel-cli_vx.x.x.js | 8 +-- flow-typed/npm/babel-core_vx.x.x.js | 8 +-- ...gin-transform-es2015-modules-amd_vx.x.x.js | 8 +-- ...lugin-transform-flow-strip-types_vx.x.x.js | 8 +-- flow-typed/npm/babel-preset-es2015_vx.x.x.js | 8 +-- flow-typed/npm/babel-preset-stage-0_vx.x.x.js | 8 +-- flow-typed/npm/babel_vx.x.x.js | 8 +-- flow-typed/npm/body-parser_v1.x.x.js | 0 flow-typed/npm/connect_vx.x.x.js | 8 +-- flow-typed/npm/express_v4.x.x.js | 61 ++++++++++++------- flow-typed/npm/flow-bin_v0.x.x.js | 0 flow-typed/npm/handlebars_vx.x.x.js | 8 +-- flow-typed/npm/less_vx.x.x.js | 8 +-- flow-typed/npm/nodeunit_vx.x.x.js | 29 ++++----- flow-typed/npm/request_vx.x.x.js | 8 +-- flow-typed/npm/requirejs_vx.x.x.js | 8 +-- flow-typed/npm/shelljs_vx.x.x.js | 8 +-- flow-typed/npm/uglify-js_vx.x.x.js | 8 +-- 18 files changed, 105 insertions(+), 97 deletions(-) create mode 100644 flow-typed/npm/body-parser_v1.x.x.js create mode 100644 flow-typed/npm/flow-bin_v0.x.x.js diff --git a/flow-typed/npm/babel-cli_vx.x.x.js b/flow-typed/npm/babel-cli_vx.x.x.js index e69931e..f7d3e98 100644 --- a/flow-typed/npm/babel-cli_vx.x.x.js +++ b/flow-typed/npm/babel-cli_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: dfe0099d0a8b972d07246fc18128f8ff -// flow-typed version: <>/babel-cli_v6.3.x +// flow-typed signature: ee9f3fe21ed802eb45c7ac68a8433679 +// flow-typed version: <>/babel-cli_v6.3.x/flow_v0.37.4 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/babel-core_vx.x.x.js b/flow-typed/npm/babel-core_vx.x.x.js index 8d83134..610dc9f 100644 --- a/flow-typed/npm/babel-core_vx.x.x.js +++ b/flow-typed/npm/babel-core_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: e02aaf4fbce54e684ce6a93a46fe9f52 -// flow-typed version: <>/babel-core_v6.3.x +// flow-typed signature: e89f957802eabf069b040b120d17edee +// flow-typed version: <>/babel-core_v6.3.x/flow_v0.37.4 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/babel-plugin-transform-es2015-modules-amd_vx.x.x.js b/flow-typed/npm/babel-plugin-transform-es2015-modules-amd_vx.x.x.js index 1a42ef1..95be14a 100644 --- a/flow-typed/npm/babel-plugin-transform-es2015-modules-amd_vx.x.x.js +++ b/flow-typed/npm/babel-plugin-transform-es2015-modules-amd_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 94790f3accf8e47677c55cc7d7aabb7f -// flow-typed version: <>/babel-plugin-transform-es2015-modules-amd_v6.3.x +// flow-typed signature: 7a980a4d8ec87d8be65be3ce9a987319 +// flow-typed version: <>/babel-plugin-transform-es2015-modules-amd_v6.3.x/flow_v0.37.4 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/babel-plugin-transform-flow-strip-types_vx.x.x.js b/flow-typed/npm/babel-plugin-transform-flow-strip-types_vx.x.x.js index cbcca44..3332520 100644 --- a/flow-typed/npm/babel-plugin-transform-flow-strip-types_vx.x.x.js +++ b/flow-typed/npm/babel-plugin-transform-flow-strip-types_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 5b6101314f0f97d8ef979e94c2192a59 -// flow-typed version: <>/babel-plugin-transform-flow-strip-types_v6.3.x +// flow-typed signature: 5c196062d64f14a3da7e32ddec496ed2 +// flow-typed version: <>/babel-plugin-transform-flow-strip-types_v6.3.x/flow_v0.37.4 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/babel-preset-es2015_vx.x.x.js b/flow-typed/npm/babel-preset-es2015_vx.x.x.js index c1db965..8e3bc15 100644 --- a/flow-typed/npm/babel-preset-es2015_vx.x.x.js +++ b/flow-typed/npm/babel-preset-es2015_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 22e48a9bd63d8108db2b603d617bfa12 -// flow-typed version: <>/babel-preset-es2015_v6.3.x +// flow-typed signature: 9cee4ea5593fe1a042a360d3d5fc5ad1 +// flow-typed version: <>/babel-preset-es2015_v6.3.x/flow_v0.37.4 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/babel-preset-stage-0_vx.x.x.js b/flow-typed/npm/babel-preset-stage-0_vx.x.x.js index 2935324..6bfd2b4 100644 --- a/flow-typed/npm/babel-preset-stage-0_vx.x.x.js +++ b/flow-typed/npm/babel-preset-stage-0_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 5bf8521ffcee7f1a9306ef8459309e63 -// flow-typed version: <>/babel-preset-stage-0_v6.3.x +// flow-typed signature: 9a2617c76122da2097429b91bac6216a +// flow-typed version: <>/babel-preset-stage-0_v6.3.x/flow_v0.37.4 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/babel_vx.x.x.js b/flow-typed/npm/babel_vx.x.x.js index 3032c7e..29be7a1 100644 --- a/flow-typed/npm/babel_vx.x.x.js +++ b/flow-typed/npm/babel_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 59dac76f3d515f5dfbc84adb6cd5741a -// flow-typed version: <>/babel_v6.0.x +// flow-typed signature: 61e90ee26c0b56a560cf25a034b8a844 +// flow-typed version: <>/babel_v6.0.x/flow_v0.37.4 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/body-parser_v1.x.x.js b/flow-typed/npm/body-parser_v1.x.x.js new file mode 100644 index 0000000..e69de29 diff --git a/flow-typed/npm/connect_vx.x.x.js b/flow-typed/npm/connect_vx.x.x.js index 3fed1af..1cc130d 100644 --- a/flow-typed/npm/connect_vx.x.x.js +++ b/flow-typed/npm/connect_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 83dbea1a617397b588f09a0bd9ff0455 -// flow-typed version: <>/connect_v^3.3.5 +// flow-typed signature: d1514155f636d9288c9cf68d57d0f8e3 +// flow-typed version: <>/connect_v^3.3.5/flow_v0.37.4 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/express_v4.x.x.js b/flow-typed/npm/express_v4.x.x.js index b9c89c2..99f38de 100644 --- a/flow-typed/npm/express_v4.x.x.js +++ b/flow-typed/npm/express_v4.x.x.js @@ -1,7 +1,8 @@ -// flow-typed signature: c3abd38bbfc1fc2ef09318ae0b630774 -// flow-typed version: 622c2ee76d/express_v4.x.x/flow_>=v0.28.x +// flow-typed signature: 730b5b5f47f89c6e5871c0d9e9cd72d9 +// flow-typed version: 8d3bb346ba/express_v4.x.x/flow_>=v0.32.x import type { Server } from 'http'; +import type { Socket } from 'net'; declare type express$RouterOptions = { caseSensitive?: boolean, @@ -14,20 +15,25 @@ declare class express$RequestResponseBase { get(field: string): string | void; } +declare type express$RequestParams = { + [param: string]: string +} + declare class express$Request extends http$IncomingMessage mixins express$RequestResponseBase { baseUrl: string; - body: mixed; + body: any; cookies: {[cookie: string]: string}; + connection: Socket; fresh: boolean; - hostname: boolean; + hostname: string; ip: string; ips: Array; method: string; originalUrl: string; - params: {[param: string]: string}; + params: express$RequestParams; path: string; protocol: 'https' | 'http'; - query: {[name: string]: string}; + query: {[name: string]: string | Array}; route: string; secure: boolean; signedCookies: {[signedCookie: string]: string}; @@ -35,6 +41,7 @@ declare class express$Request extends http$IncomingMessage mixins express$Reques subdomains: Array; xhr: boolean; accepts(types: string): string | false; + accepts(types: Array): string | false; acceptsCharsets(...charsets: Array): string | false; acceptsEncodings(...encoding: Array): string | false; acceptsLanguages(...lang: Array): string | false; @@ -64,7 +71,7 @@ declare type express$SendFileOptions = { dotfiles?: 'allow' | 'deny' | 'ignore' }; -declare class express$Response extends http$ClientRequest mixins express$RequestResponseBase { +declare class express$Response extends http$ServerResponse mixins express$RequestResponseBase { headersSent: boolean; locals: {[name: string]: mixed}; append(field: string, value?: string): this; @@ -83,16 +90,20 @@ declare class express$Response extends http$ClientRequest mixins express$Request send(body?: mixed): this; sendFile(path: string, options?: express$SendFileOptions, callback?: (err?: ?Error) => mixed): this; sendStatus(statusCode: number): this; - set(field: string, value?: string): this; + header(field: string, value?: string): this; + header(headers: {[name: string]: string}): this; + set(field: string, value?: string|string[]): this; + set(headers: {[name: string]: string}): this; status(statusCode: number): this; type(type: string): this; vary(field: string): this; + req: express$Request; } -declare type express$NextFunction = (err?: ?Error) => mixed; +declare type express$NextFunction = (err?: ?Error | 'route') => mixed; declare type express$Middleware = - ((req: express$Request, res: express$Response, next: express$NextFunction) => mixed) | - ((error: ?Error, req: express$Request, res: express$Response, next: express$NextFunction) => mixed); + ((req: $Subtype, res: express$Response, next: express$NextFunction) => mixed) | + ((error: ?Error, req: $Subtype, res: express$Response, next: express$NextFunction) => mixed); declare interface express$RouteMethodType { (middleware: express$Middleware): T; (...middleware: Array): T; @@ -133,11 +144,15 @@ declare class express$Route { declare class express$Router extends express$Route { constructor(options?: express$RouterOptions): void; route(path: string): express$Route; - static (): express$Router; + static (options?: express$RouterOptions): express$Router; use(middleware: express$Middleware): this; use(...middleware: Array): this; use(path: string|RegExp|string[], ...middleware: Array): this; use(path: string, router: express$Router): this; + handle(req: http$IncomingMessage, res: http$ServerResponse, next: express$NextFunction): void; + + // Can't use regular callable signature syntax due to https://github.com/facebook/flow/issues/3084 + $call: (req: http$IncomingMessage, res: http$ServerResponse, next?: ?express$NextFunction) => void; } declare class express$Application extends express$Router mixins events$EventEmitter { @@ -151,7 +166,7 @@ declare class express$Application extends express$Router mixins events$EventEmit listen(handle: Object, callback?: (err?: ?Error) => mixed): Server; disable(name: string): void; disabled(name: string): boolean; - enable(name: string): void; + enable(name: string): express$Application; enabled(name: string): boolean; engine(name: string, callback: Function): void; /** @@ -160,22 +175,22 @@ declare class express$Application extends express$Router mixins events$EventEmit // get(name: string): mixed; set(name: string, value: mixed): mixed; render(name: string, optionsOrFunction: {[name: string]: mixed}, callback: express$RenderCallback): void; + handle(req: http$IncomingMessage, res: http$ServerResponse, next?: ?express$NextFunction): void; } declare module 'express' { - declare function serveStatic(root: string, options?: Object): express$Middleware; - - declare type RouterOptions = express$RouterOptions; - declare type CookieOptions = express$CookieOptions; - declare type Middleware = express$Middleware; - declare type NextFunction = express$NextFunction; - declare type $Response = express$Response; - declare type $Request = express$Request; - declare type $Application = express$Application; + declare export type RouterOptions = express$RouterOptions; + declare export type CookieOptions = express$CookieOptions; + declare export type Middleware = express$Middleware; + declare export type NextFunction = express$NextFunction; + declare export type RequestParams = express$RequestParams; + declare export type $Response = express$Response; + declare export type $Request = express$Request; + declare export type $Application = express$Application; declare module.exports: { (): express$Application, // If you try to call like a function, it will use this signature - static: serveStatic, // `static` property on the function + static: (root: string, options?: Object) => express$Middleware, // `static` property on the function Router: typeof express$Router, // `Router` property on the function }; } diff --git a/flow-typed/npm/flow-bin_v0.x.x.js b/flow-typed/npm/flow-bin_v0.x.x.js new file mode 100644 index 0000000..e69de29 diff --git a/flow-typed/npm/handlebars_vx.x.x.js b/flow-typed/npm/handlebars_vx.x.x.js index 63230f5..b13b483 100644 --- a/flow-typed/npm/handlebars_vx.x.x.js +++ b/flow-typed/npm/handlebars_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 073c7ccd155071b719347599f94b25bc -// flow-typed version: <>/handlebars_v^4.0.5 +// flow-typed signature: 84283fa2a931ba811d1f89f42e6fc2ca +// flow-typed version: <>/handlebars_v^4.0.5/flow_v0.37.4 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/less_vx.x.x.js b/flow-typed/npm/less_vx.x.x.js index 9ba1838..b34370e 100644 --- a/flow-typed/npm/less_vx.x.x.js +++ b/flow-typed/npm/less_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 84662bc4e64c654095b528329068be44 -// flow-typed version: <>/less_v1.7.x +// flow-typed signature: c8bad5e84f8c92d583ee987704eb4630 +// flow-typed version: <>/less_v1.7.x/flow_v0.37.4 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/nodeunit_vx.x.x.js b/flow-typed/npm/nodeunit_vx.x.x.js index fbab011..6c47cd0 100644 --- a/flow-typed/npm/nodeunit_vx.x.x.js +++ b/flow-typed/npm/nodeunit_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: a83b503836101aea426203a0136b4222 -// flow-typed version: <>/nodeunit_v0.9.x +// flow-typed signature: 417e5453d28d2c851ef2f2df3c6bfb44 +// flow-typed version: <>/nodeunit_v0.9.x/flow_v0.37.4 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ @@ -74,14 +74,6 @@ declare module 'nodeunit/deps/json2' { declare module.exports: any; } -declare module 'nodeunit/dist/browser/nodeunit' { - declare module.exports: any; -} - -declare module 'nodeunit/dist/browser/nodeunit.min' { - declare module.exports: any; -} - declare module 'nodeunit/examples/browser/nodeunit' { declare module.exports: any; } @@ -182,6 +174,10 @@ declare module 'nodeunit/share/license' { declare module.exports: any; } +declare module 'nodeunit/test/fixtures/dir/example_test_sub' { + declare module.exports: any; +} + declare module 'nodeunit/test/fixtures/dir/mock_module3' { declare module.exports: any; } @@ -298,12 +294,6 @@ declare module 'nodeunit/deps/ejs/test/ejs.test.js' { declare module 'nodeunit/deps/json2.js' { declare module.exports: $Exports<'nodeunit/deps/json2'>; } -declare module 'nodeunit/dist/browser/nodeunit.js' { - declare module.exports: $Exports<'nodeunit/dist/browser/nodeunit'>; -} -declare module 'nodeunit/dist/browser/nodeunit.min.js' { - declare module.exports: $Exports<'nodeunit/dist/browser/nodeunit.min'>; -} declare module 'nodeunit/examples/browser/nodeunit.js' { declare module.exports: $Exports<'nodeunit/examples/browser/nodeunit'>; } @@ -385,6 +375,9 @@ declare module 'nodeunit/lib/utils.js' { declare module 'nodeunit/share/license.js' { declare module.exports: $Exports<'nodeunit/share/license'>; } +declare module 'nodeunit/test/fixtures/dir/example_test_sub.js' { + declare module.exports: $Exports<'nodeunit/test/fixtures/dir/example_test_sub'>; +} declare module 'nodeunit/test/fixtures/dir/mock_module3.js' { declare module.exports: $Exports<'nodeunit/test/fixtures/dir/mock_module3'>; } diff --git a/flow-typed/npm/request_vx.x.x.js b/flow-typed/npm/request_vx.x.x.js index b27de50..e079f3b 100644 --- a/flow-typed/npm/request_vx.x.x.js +++ b/flow-typed/npm/request_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: f8f48681abc901d977374d77f18a1bd9 -// flow-typed version: <>/request_v2.47.x +// flow-typed signature: a59a5deecdeee9a353b420aeb76638e4 +// flow-typed version: <>/request_v2.47.x/flow_v0.37.4 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/requirejs_vx.x.x.js b/flow-typed/npm/requirejs_vx.x.x.js index 361774d..3dd0999 100644 --- a/flow-typed/npm/requirejs_vx.x.x.js +++ b/flow-typed/npm/requirejs_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 32df1839602b288492bb42c626f60596 -// flow-typed version: <>/requirejs_v^2.1.22 +// flow-typed signature: f2eccad2115478aa5c08385f024dfe50 +// flow-typed version: <>/requirejs_v^2.1.22/flow_v0.37.4 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/shelljs_vx.x.x.js b/flow-typed/npm/shelljs_vx.x.x.js index 6538af8..563da12 100644 --- a/flow-typed/npm/shelljs_vx.x.x.js +++ b/flow-typed/npm/shelljs_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: c0aa53f83e81028d480c9debc4048c7e -// flow-typed version: <>/shelljs_v0.5.x +// flow-typed signature: f55652efbbaac1126e8ff998071132c3 +// flow-typed version: <>/shelljs_v0.5.x/flow_v0.37.4 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ diff --git a/flow-typed/npm/uglify-js_vx.x.x.js b/flow-typed/npm/uglify-js_vx.x.x.js index f557472..4e45008 100644 --- a/flow-typed/npm/uglify-js_vx.x.x.js +++ b/flow-typed/npm/uglify-js_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: 4accf49e9fb67cbc1a63d9d395fb44f9 -// flow-typed version: <>/uglify-js_v^2.6.1 +// flow-typed signature: 5bf867d77ff345148611914d9e20eb1b +// flow-typed version: <>/uglify-js_v^2.6.1/flow_v0.37.4 /** * This is an autogenerated libdef stub for: @@ -8,8 +8,8 @@ * * Fill this stub out by replacing all the `any` types. * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: * https://github.com/flowtype/flow-typed */