Skip to content

Commit

Permalink
fix!: Required of props should always be required (#180)
Browse files Browse the repository at this point in the history
I previously over-applied the `Partial` in that extra props required by rules would be made optional at the `protect()` function. This changes makes it so the requiredness of props aren't changed.
  • Loading branch information
blaine-arcjet authored Feb 6, 2024
1 parent 2576341 commit 1f92885
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arcjet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ export type ExtraProps<Rules> = Rules extends []
* @property ...extra - Extra data that might be useful for Arcjet. For example, requested tokens are specified as the `requested` property.
*/
export type ArcjetRequest<Props extends PlainObject> = Simplify<
Partial<ArcjetRequestDetails & Props>
Partial<ArcjetRequestDetails> & Props
>;

function isLocalRule<Props extends PlainObject>(
Expand Down

0 comments on commit 1f92885

Please sign in to comment.