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

missing fat arrows looks outside class definition #249

Closed
Sinetheta opened this issue Mar 31, 2014 · 4 comments
Closed

missing fat arrows looks outside class definition #249

Sinetheta opened this issue Mar 31, 2014 · 4 comments
Labels

Comments

@Sinetheta
Copy link
Contributor

Is this intended behaviour? It's problematic for me when using RequireJS.

define [], ->
    class MyClass

If MyClass uses @ then a fat arrow will be required, if it doesn't then it will be considered unnecessary. Since it wasn't required in either case, this makes for some annoying inconsistencies between files.

@AsaAyers
Copy link
Collaborator

I'm not following can you provide an example of both situations?
On Mar 31, 2014 7:25 PM, "Kevin Attfield" notifications@github.com wrote:

Is this intended behaviour? It's problematic for me when using RequireJS.

define [], ->
class MyClass

If MyClass uses @ then a fat arrow will be required, if it doesn't then
it will be considered unnecessary. Since it wasn't required in either case,
this makes for some annoying inconsistencies between files.

Reply to this email directly or view it on GitHubhttps://github.com//issues/249
.

@Sinetheta
Copy link
Contributor Author

define [], =>
    class MyClass
        @omg: ->
define [], ->
    class MyClass
        nope: ->

😉

Maybe this is an issue with how I'm using Coffeescript with Require? The wrapper has nothing to do with the class, so it would be nice if it didn't care about the @.

@AsaAyers AsaAyers added the bug label Mar 31, 2014
@AsaAyers
Copy link
Collaborator

I'm sure this is not intended behavior. It seems like class definitions (or the file) should be the boundary where this rule should stop.

@swang
Copy link
Collaborator

swang commented Aug 13, 2014

This looks like it can be closed. Test case above passes without fat arrow.

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

No branches or pull requests

3 participants