Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flowtype/require-types-at-top is thrown when mixing type/ declaration #373

Open
gajus opened this issue Nov 14, 2018 · 1 comment
Open
Labels

Comments

@gajus
Copy link
Owner

gajus commented Nov 14, 2018

declare function DataPoolConnectMethodType (): Promise<DatabasePoolConnectionType>;
declare function DataPoolConnectMethodType ((connection: DatabaseIsolatedPoolConnectionType) => Promise<void>): Promise<void>;

type FooType = string;

Expected:

No warnings.

Actual:

Getting "flowtype/require-types-at-top" error.

@gajus gajus added the bug label Nov 14, 2018
@gajus
Copy link
Owner Author

gajus commented Nov 14, 2018

There is no way to overload a function without using declare (facebook/flow#60).

We should therefore make declare and type compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant