1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
Description: typescript 5.0 compatibility
Author: Ananthu C V <weepingclown@debian.org>
Last-Update: 2024-12-16
--- a/src/core.ts
+++ b/src/core.ts
@@ -287,3 +287,3 @@
if (t >= len) {
- if (validateOperation && operation.op === "add" && key > obj.length) {
+ if (validateOperation && operation.op === "add" && key as number > obj.length) {
throw new JsonPatchError("The specified index MUST NOT be greater than the number of elements in the array", "OPERATION_VALUE_OUT_OF_BOUNDS", index, operation, document);
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -13,3 +13,2 @@
"allowSyntheticDefaultImports": true,
- "noImplicitUseStrict": true
},
@@ -18,2 +17,2 @@
]
-}
\ No newline at end of file
+}
|