Skip to content

Commit

Permalink
TableBuilder methods typically return the SchemaBuilder, so updating …
Browse files Browse the repository at this point in the history
…methods to reflect that. (#5486)
  • Loading branch information
DavidTanner committed Mar 29, 2023
1 parent 4d5ae61 commit 2ad7719
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions types/index.d.ts
Expand Up @@ -2351,11 +2351,11 @@ export declare namespace Knex {
dropViewIfExists(viewName: string): SchemaBuilder;
dropMaterializedView(viewName: string): SchemaBuilder;
dropMaterializedViewIfExists(viewName: string): SchemaBuilder;
renameView(oldViewName: string, newViewName: string): Promise<void>;
renameView(oldViewName: string, newViewName: string): SchemaBuilder;
view(
viewName: string,
callback: (viewBuilder: AlterViewBuilder) => any
): Promise<void>;
): SchemaBuilder;
alterView(
viewName: string,
callback: (tableBuilder: AlterViewBuilder) => any
Expand Down Expand Up @@ -2385,7 +2385,7 @@ export declare namespace Knex {
table(
tableName: string,
callback: (tableBuilder: AlterTableBuilder) => any
): Promise<void>;
): SchemaBuilder;
dropTableIfExists(tableName: string): SchemaBuilder;

// Schema
Expand Down Expand Up @@ -2522,7 +2522,7 @@ export declare namespace Knex {
setNullable(column: string): TableBuilder;
dropNullable(column: string): TableBuilder;
unique(
columnNames: readonly (string | Raw)[],
columnNames: string | readonly (string | Raw)[],
options?: Readonly<{
indexName?: string;
storageEngineIndexType?: string;
Expand All @@ -2533,7 +2533,7 @@ export declare namespace Knex {
): TableBuilder;
/** @deprecated */
unique(
columnNames: readonly (string | Raw)[],
columnNames: string | readonly (string | Raw)[],
indexName?: string
): TableBuilder;
foreign(column: string, foreignKeyName?: string): ForeignConstraintBuilder;
Expand Down

0 comments on commit 2ad7719

Please sign in to comment.