loganfsmyth / babel-plugin-transform-decorators-legacy

A plugin for Babel 6 that (mostly) replicates the old decorator behavior from Babel 5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Class self scope error

uMaxmaxmaximus opened this issue · comments

class User {

    static func = User

}

console.log(User.func) // undefined

Its error

Example, a use ORM and i cant declarate database structure types

class User extends Model {

    static schema = {
        name: String,
        age: String,
        friends: [User], // User is undefined
    }

    // this code will be located in constructor
    name = User.createRandomName() // i cant call this

}

This is the same issue as #17 so closing as a dup, but happy to try to have more of a discussion.