Skip to content

Arrow functions support

Choose a tag to compare

@ilyalesik ilyalesik released this 31 Jan 15:28
· 58 commits to master since this release

Implement transform arrow function (with variable declaration) to declare variable (with function type annotation).

For example,

// @flow

export const foo = (one: any, two: number): string => {
    return "" + one + two;
}

will be transformed to

// @flow
declare export var foo: (one: any, two: number) => string;