Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fixes #40, function and method overloading
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbarabash committed May 18, 2019
1 parent 66a5ae9 commit e5dbb5b
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/fixtures/convert/declare/declare-function/flow.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// @flow
// Adds two numbers
declare function foo(a: number, b: number): number;
declare function foo(number, number): number;
2 changes: 1 addition & 1 deletion test/fixtures/convert/declare/declare-function/ts.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

// Adds two numbers
declare function foo(a: number, b: number): number;
declare function foo(arg0: number, arg1: number): number;
3 changes: 3 additions & 0 deletions test/fixtures/convert/declare/function-overloading/flow.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// @flow
declare function getWidget(n: number): Widget;
declare function getWidget(s: string): Widget[];
3 changes: 3 additions & 0 deletions test/fixtures/convert/declare/function-overloading/ts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

declare function getWidget(n: number): Widget;
declare function getWidget(s: string): Widget[];
6 changes: 6 additions & 0 deletions test/fixtures/convert/declare/method-overloading/flow.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// @flow
declare class Path<T> extends Node<U> {
// converts Path to a string
toString(): string;
toString(tabWidth: number): string;
}
6 changes: 6 additions & 0 deletions test/fixtures/convert/declare/method-overloading/ts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

declare class Path<T> extends Node<U> {
// converts Path to a string
toString(): string;
toString(tabWidth: number): string;
}

0 comments on commit e5dbb5b

Please sign in to comment.