Open spion opened 8 years ago
Yes please, though I suspect just type level generics won't be enough. Also for people like me that use ES2015 classes, but not typescript (i.e. the parts already supported natively by node so no need for transpiling).
class UserTable extends Table {
static get id { return new Column("int", {primaryKey: true}) }
static get name { return new Column("int", {default: ""}) }
}
... // Same as above
Example:
The important part being that columns are known as properties to the compiler / typechecker and can subsequently be used when building expressions: