aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package.json2
-rw-r--r--src/global.d.ts11
2 files changed, 12 insertions, 1 deletions
diff --git a/package.json b/package.json
index a109c09..6c867f2 100644
--- a/package.json
+++ b/package.json
@@ -29,7 +29,7 @@
"postcss": "^8.4.17",
"smartcrop-cli": "^2.0.3",
"tailwindcss": "^3.1.8",
- "typescript": "^4.6.4",
+ "typescript": "^4.9.4",
"vite": "^3.1.0",
"vitest": "^0.25.8",
"vue-tsc": "^0.40.4"
diff --git a/src/global.d.ts b/src/global.d.ts
new file mode 100644
index 0000000..a90ef61
--- /dev/null
+++ b/src/global.d.ts
@@ -0,0 +1,11 @@
+export {}
+
+// Temporary solution for typescript not including Array.findLast()
+declare global {
+ interface Array<T> {
+ findLast(
+ predicate: (value: T, index: number, obj: T[]) => unknown,
+ thisArg?: any
+ ): T | undefined
+ }
+}