JS: update queries and tests for improved type inference

This commit is contained in:
Esben Sparre Andreasen
2018-08-16 13:23:05 +02:00
parent 3692667af2
commit 6f5fb2a9fe
10 changed files with 231 additions and 7 deletions

View File

@@ -7,7 +7,7 @@ function getAttacher1 (app) {
var app = express();
getAttacher1(app);
confuse(getAttacher2); // disable the type inference
function getAttacher2 (app) {
return function(h) {
@@ -17,3 +17,4 @@ function getAttacher2 (app) {
var app = express();
getAttacher2(app)(function(req, res){});
confuse(getAttacher2); // disable the type inference

View File

@@ -58,3 +58,4 @@ function wrap(f){
}
}
app[route3.method](route3.url, wrap(route3.handler));
confuse(wrap); // confuse the type inference