Skip to content

Commit

Permalink
fix(simple-rest): type error on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alicanerdurmaz committed May 24, 2024
1 parent 90a5a91 commit 405b247
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/gorgeous-bugs-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@refinedev/simple-rest": patch
---

fix: "mapOperator" test type error.
Some `CrudOperators` not supported in `operatorMappings` type but still extended from `CrudOperators`. To fix that we use `Partial` type for `operatorMappings` type.
2 changes: 1 addition & 1 deletion packages/simple-rest/test/utils/mapOperator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { mapOperator } from "../../src/utils";

describe("mapOperator", () => {
it("should return correct mapping for given operator", () => {
const operatorMappings: Record<CrudOperators, string> = {
const operatorMappings: Partial<Record<CrudOperators, string>> = {
ne: "_ne",
gte: "_gte",
lte: "_lte",
Expand Down

0 comments on commit 405b247

Please sign in to comment.