Giter Site home page Giter Site logo

Comments (6)

gr0uch avatar gr0uch commented on May 10, 2024

I can add support for this, but I want to ask why you opt to use anonymous classes? Wouldn't this be equivalent:

class Item { ... }
Invoice.Item = Item;

from doc-tree.

djMax avatar djMax commented on May 10, 2024

You can't do enums that way. The class syntax does not allow "fields," only methods right?

from doc-tree.

djMax avatar djMax commented on May 10, 2024

I found a workaround for now which is that if I assign the enum to a "real class" property, it gets picked up fine. So

class Invoice {
}
Invoice.Status = {
    NEW: 0
}

works.

from doc-tree.

gr0uch avatar gr0uch commented on May 10, 2024

I pushed 0.6.1, which changes some behavior regarding classes. It now picks up unnamed classes, but your unnamed class methods won't get a target. Also you won't get the dotted list bug anymore.

Assigning static properties to a class is external to the class syntax, you would have to do Class.property = 'foo' outside of the class body.

The reason why it didn't pick up on var obj = { ... } is because it doesn't get variable assignment yet, which sounds like it should be something simple to do, it'll be done later.

from doc-tree.

gr0uch avatar gr0uch commented on May 10, 2024

Now there is support for variable assignment in 0.7.0, so all of the problems in your original issue should be resolved.

from doc-tree.

djMax avatar djMax commented on May 10, 2024

You're a machine!

from doc-tree.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.