File: typescript-5.0-compatibility.patch

package info (click to toggle)
node-fast-json-patch 3.1.1%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 832 kB
  • sloc: javascript: 748; makefile: 11; sh: 7
file content (21 lines) | stat: -rw-r--r-- 760 bytes parent folder | download
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
+}