reimplement async function type parameters backfix - fixes #2028
This commit is contained in:
@@ -5971,6 +5971,86 @@ var fbTestFixture = {
|
||||
}
|
||||
}]
|
||||
},
|
||||
"var foo = async (foo: bar, bar: foo) => {}": {
|
||||
type: "VariableDeclaration",
|
||||
kind: "var",
|
||||
start: 0,
|
||||
end: 42,
|
||||
declarations: [{
|
||||
type: "VariableDeclarator",
|
||||
start: 4,
|
||||
end: 42,
|
||||
id: {
|
||||
type: "Identifier",
|
||||
start: 4,
|
||||
end: 7,
|
||||
name: "foo"
|
||||
},
|
||||
init: {
|
||||
type: "ArrowFunctionExpression",
|
||||
start: 10,
|
||||
end: 42,
|
||||
id: null,
|
||||
generator: false,
|
||||
expression: false,
|
||||
async: true,
|
||||
params: [
|
||||
{
|
||||
type: "Identifier",
|
||||
start: 17,
|
||||
end: 20,
|
||||
name: "foo",
|
||||
typeAnnotation: {
|
||||
type: "TypeAnnotation",
|
||||
start: 20,
|
||||
end: 25,
|
||||
typeAnnotation: {
|
||||
type: "GenericTypeAnnotation",
|
||||
start: 22,
|
||||
end: 25,
|
||||
typeParameters: null,
|
||||
id: {
|
||||
type: "Identifier",
|
||||
start: 22,
|
||||
end: 25,
|
||||
name: "bar"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: "Identifier",
|
||||
start: 27,
|
||||
end: 30,
|
||||
name: "bar",
|
||||
typeAnnotation: {
|
||||
type: "TypeAnnotation",
|
||||
start: 30,
|
||||
end: 35,
|
||||
typeAnnotation: {
|
||||
type: "GenericTypeAnnotation",
|
||||
start: 32,
|
||||
end: 35,
|
||||
typeParameters: null,
|
||||
id: {
|
||||
type: "Identifier",
|
||||
start: 32,
|
||||
end: 35,
|
||||
name: "foo"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
body: {
|
||||
type: "BlockStatement",
|
||||
start: 40,
|
||||
end: 42,
|
||||
body: []
|
||||
}
|
||||
}
|
||||
}]
|
||||
},
|
||||
"var foo = async (): number => bar;": {
|
||||
type: "VariableDeclaration",
|
||||
kind: "var",
|
||||
@@ -11978,6 +12058,7 @@ var fbTestFixture = {
|
||||
|
||||
if (typeof exports !== "undefined") {
|
||||
var test = require("./driver.js").test;
|
||||
var testFail = require("./driver.js").testFail;
|
||||
}
|
||||
|
||||
for (var ns in fbTestFixture) {
|
||||
|
||||
Reference in New Issue
Block a user