Skip to content

Instantly share code, notes, and snippets.

@CrabDude
Last active August 29, 2015 14:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CrabDude/f53f8996fb8816bb6372 to your computer and use it in GitHub Desktop.
Save CrabDude/f53f8996fb8816bb6372 to your computer and use it in GitHub Desktop.
Node.js with FB Flow
// @flow weak
/* jshint ignore:start */
declare module 'http' {
declare function createServer(callback: (req: httpIncomingMessage, res: httpServerResponse) => void): httpServer
}
// declare class http {
// createServer(callback: (req: httpIncomingMessage, res: httpServerResponse) => void): httpServer
// }
declare class httpServer {
}
declare class httpIncomingMessage {
}
declare class httpServerResponse {
}
/* jshint ignore:end */
require('http')
/* OUTPUT:
$ flow
~/Dropbox/playground/flowtype/hello.js:24:1,15: http
Required module not found
...
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment