Skip to content

Missing typings for QueryBuilder.tableRef #2364

@IlyaSemenov

Description

@IlyaSemenov

QueryBuilder has a convenient method tableRef which returns the alias for the model the query builder operates against:

tableRef() {
return this.tableRefFor(this.modelClass().getTableName());
}

However it's not exposed in typings and not mentioned in the documentation. Can we add it?


On a side note, its implementation clearly contradicts the typings for tableRefFor:

interface TableRefForMethod {
(modelClass: typeof Model): string;
}

the method is supposed to accept a model class, but the actual implementation passes a string.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions