aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-12-30 11:40:13 +1100
committerTerry Truong <terry06890@gmail.com>2022-12-30 11:40:13 +1100
commit086b0c30afdf2c0fbff48e1005b2f9220b028094 (patch)
tree06d2ee01c1c8e0a625c717626e953647aa44185b /src
parent5608b720efc8eaa6d3007b30ca52114e6c6ef02b (diff)
Temp fix for tsc not recognising Array.findLast()
Diffstat (limited to 'src')
-rw-r--r--src/global.d.ts11
1 files changed, 11 insertions, 0 deletions
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
+ }
+}