Add findlast shim for outdated browsers (#1463)

* Add findlast shim for crappy browsers

* Fix types
This commit is contained in:
Paul Frazee 2023-09-15 14:40:15 -07:00 committed by GitHub
parent 0672451ddc
commit 754663e5c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 153 additions and 1 deletions

View file

@ -1,7 +1,11 @@
import 'fast-text-encoding'
import Graphemer from 'graphemer'
// @ts-ignore no decl -prf
import findLast from 'array.prototype.findlast'
export {}
findLast.shim()
/**
https://github.com/MaxArt2501/base64-js
The MIT License (MIT)

View file

@ -1,5 +1,9 @@
// @ts-ignore no decl -prf
import * as findLast from 'array.prototype.findlast'
/// <reference lib="dom" />
findLast.shim()
// @ts-ignore whatever typescript wants to complain about here, I dont care about -prf
window.setImmediate = (cb: () => void) => setTimeout(cb, 0)