From c6411555378cb8a998a25e537f8d6499b2052c6c Mon Sep 17 00:00:00 2001 From: Georgia Date: Mon, 26 Dec 2022 23:42:41 +0000 Subject: [PATCH] add find last method, this is a bug with typescript version 4.8 and is will be fixed in typescript version 5, short term fix is to add to globals https://github.com/microsoft/TypeScript/issues/48829 --- types/global.d.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 types/global.d.ts diff --git a/types/global.d.ts b/types/global.d.ts new file mode 100644 index 0000000..1dfd799 --- /dev/null +++ b/types/global.d.ts @@ -0,0 +1,10 @@ +export {}; + +declare global { + interface Array { + findLast( + predicate: (value: T, index: number, obj: T[]) => unknown, + thisArg?: any + ): number; + } +}