Skip to content

Instantly share code, notes, and snippets.

@jeswin
Last active February 29, 2016 13:32
Show Gist options
  • Save jeswin/36f83707fb6a94b3adba to your computer and use it in GitHub Desktop.
Save jeswin/36f83707fb6a94b3adba to your computer and use it in GitHub Desktop.

For context, see https://gist.github.com/jeswin/22ccd02270589c360870

/* @flow */
var http = require("http");

interface MockServer2 {
  listen(path: string) : MockServer2
}

type createServerType =  (listener?: Function) => MockServer2;

function test(cc: createServerType) {
  var p  = cc();
}

test(http.createServer);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment