Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Treat a property foo: () => void like foo = () => {}: as a method declaration. #1849

Closed

Conversation

andy-hanson
Copy link
Contributor

Fixes #1156

PR checklist

What changes did you make?

Consider a property with a function type the same way as a property initialized to an arrow function.

Is there anything you'd like reviewers to focus on?

This is a breaking change, since people with this rule enabled will have to move all function-typed properties.
Maybe this should be put under an option. We can't really detect whether a property is meant to be used as an assignable field or as something to be mixed in to the prototype. However, it does seem more consistent with #969.

@adidahiya
Copy link
Contributor

this is stale and there's not a lot of movement on the reported issue. closing for now; I think we can focus on other things

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

Successfully merging this pull request may close these issues.

member-ordering: function declaration mistreated as variable
2 participants