Support Flow this parameter annotations (#12234)
This commit is contained in:
3
packages/babel-plugin-transform-parameters/test/fixtures/parameters/flow-this-param/input.js
vendored
Normal file
3
packages/babel-plugin-transform-parameters/test/fixtures/parameters/flow-this-param/input.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
function foo (this : number, x : number, y : string, ...z : any) {
|
||||
x + y + z[0];
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
function foo(this: number, x: number, y: string) {
|
||||
x + y + (arguments.length <= 2 ? undefined : arguments[2]);
|
||||
}
|
||||
Reference in New Issue
Block a user