Skip to content

Commit

Permalink
bulk create
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Oct 22, 2023
1 parent e48547c commit 3afa363
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/helpers/rtkQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ export type TagArray<

// Create

export type CreateResult<M extends Model<any>> = ReadFields<M>;
export type CreateResult<M extends Model<any>, Bulk extends boolean = false> =
Bulk extends false ? ReadFields<M> : ReadFields<M> | Array<ReadFields<M>>;

export type CreateArg<M extends Model<any>> = WriteFields<M>;
export type CreateArg<M extends Model<any>, Bulk extends boolean = false> =
Bulk extends false ? WriteFields<M> : WriteFields<M> | Array<WriteFields<M>>;

// Read

Expand Down

0 comments on commit 3afa363

Please sign in to comment.