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

[Request]: Require Type Definitions First #285

Closed
bradennapier opened this issue Nov 2, 2017 · 1 comment
Closed

[Request]: Require Type Definitions First #285

bradennapier opened this issue Nov 2, 2017 · 1 comment

Comments

@bradennapier
Copy link

I can see it being a good rule to enforce all type definitions being at the top of the file.

good

/* @flow */

type MyType = number

const b: MyType = 2

function foo(): MyType {
     return b
}

bad

/* @flow */

function foo(): MyType {
     return b
}

type MyType = number 

const b: MyType = 2
@pnevyk
Copy link
Contributor

pnevyk commented Feb 18, 2018

Related to #168

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

No branches or pull requests

3 participants