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.