Last active
August 29, 2015 14:10
-
-
Save CrabDude/f53f8996fb8816bb6372 to your computer and use it in GitHub Desktop.
Node.js with FB Flow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @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