Skip to content

Commit

Permalink
add test for Flow type. see #364
Browse files Browse the repository at this point in the history
  • Loading branch information
millermedeiros committed Jan 29, 2016
1 parent c77d994 commit 6cdba5c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/compare/default/flow-in.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* important! this file is only to ensure we parse files with Flow annotation
* properly. The formatting of typeAnnotation should be handled by an external
* plugin since not all users will require this feature and implementation is
* pretty complex.
* @flow
*/
function foo(a: string, b: number): void {
return a + String(b);
}

var x: boolean = someBool;

class Bar {
y: string;
someMethod(a: number): string {
return a * 2;
}
}
19 changes: 19 additions & 0 deletions test/compare/default/flow-out.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* important! this file is only to ensure we parse files with Flow annotation
* properly. The formatting of typeAnnotation should be handled by an external
* plugin since not all users will require this feature and implementation is
* pretty complex.
* @flow
*/
function foo(a: string, b: number): void {
return a + String(b);
}

var x: boolean = someBool;

class Bar {
y: string;
someMethod(a: number): string {
return a * 2;
}
}

0 comments on commit 6cdba5c

Please sign in to comment.