Skip to content

Commit cd69b40

Browse files
committed
Fix types for QueryBuilder tableNameFor(), tableRefFor(), aliasFor()
1 parent a7784de commit cd69b40

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

typings/objection/index.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,10 +693,12 @@ declare namespace Objection {
693693
}
694694

695695
interface TableRefForMethod {
696-
(modelClass: ModelClass<Model> | typeof Model): string;
696+
(modelClassOrTableName: string | AnyModelConstructor): string | null;
697+
// The setter variant is not public.
697698
}
698699

699700
interface AliasForMethod<QB extends AnyQueryBuilder> {
701+
(modelClassOrTableName: string | AnyModelConstructor): string | null;
700702
(modelClassOrTableName: string | AnyModelConstructor, alias: string): QB;
701703
}
702704

0 commit comments

Comments
 (0)