Skip to content

Instantly share code, notes, and snippets.

@fponticelli
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fponticelli/505d35eec9b94d12fd05 to your computer and use it in GitHub Desktop.
Save fponticelli/505d35eec9b94d12fd05 to your computer and use it in GitHub Desktop.
extern issue
import express.Request;
import express.Response;
import express.Next;
import express.Middleware;
import express.Express;
import abe.Router;
class Main {
public static function main() {
var router = new abe.Router(null);
var m : express.Middleware = function(req : Request, res : Response, next : Next) {};
router.use(m);
var n = new Some();
n.use(m);
}
}
extern class Some {
function new() : Void;
@:overload(function(callback : Middleware) : Router {})
@:overload(function(callback : ErrorMiddleware) : Router {})
@:overload(function(app : Express) : Express {})
@:overload(function(path : String, app : Express) : Router {})
@:overload(function(router : Router) : Express {})
@:overload(function(path : String, router : Router) : Router {})
function use(path : String, callback : Middleware, callbacks : haxe.Rest<Middleware>) : Router;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment