Skip to content

Commit 55e9242

Browse files
committed
Merge branch 'feature_flowtype'
2 parents 45c7c7c + 1ea789d commit 55e9242

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

test/flow.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// @flow
2+
function foo(arg1 :string, arg2: number): string {
3+
return ''
4+
}
5+
6+
interface Foo {
7+
foo: string
8+
}
9+
10+
type Bar = {
11+
bar: number
12+
}
13+
14+
class FooBar {
15+
props: Bar
16+
17+
foo (arg1: string, arg2: any): void {
18+
}
19+
20+
bar (arg1: number, arg2: Foo): any {
21+
return
22+
}
23+
}

test/test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,18 @@ function union(): number | string {
1414
}
1515

1616
interface IFoo {
17+
foo?: string
18+
}
19+
20+
interface InterfaceBar extends IFoo {
1721
}
1822

1923
class Foo {
2024
}
2125

2226
class Bar extends Foo implements IFoo {
27+
private foo: number
28+
bar: string
2329
constructor(private arg1: string, public arg2: string) {
2430
super()
2531
}

0 commit comments

Comments
 (0)