Support Flow this parameter annotations (#12234)

This commit is contained in:
Daniel Sainati
2021-02-21 11:44:27 -05:00
committed by GitHub
parent 407e8b5c7b
commit 16e9f1c8e5
149 changed files with 3010 additions and 83 deletions

View File

@@ -0,0 +1,3 @@
function foo (this : number, x : number, y : string, ...z : any) {
x + y + z[0];
}

View File

@@ -0,0 +1,3 @@
function foo(this: number, x: number, y: string) {
x + y + (arguments.length <= 2 ? undefined : arguments[2]);
}