Skip to content

Commit

Permalink
Narrow the allowed types for the .then() function's type param
Browse files Browse the repository at this point in the history
  • Loading branch information
MrLeebo committed Jul 5, 2023
1 parent 4575527 commit f71ff18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PrismaSchemaBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ export class ConcretePrismaSchemaBuilder {
* Returns the current subject, allowing for more advanced ways of
* manipulating the schema.
* */
then<R extends schema.Block | schema.Property>(
then<R extends NonNullable<Subject>>(
callback: (subject: R) => unknown
): this {
callback(this._subject as R);
Expand Down

0 comments on commit f71ff18

Please sign in to comment.