fix(types): Vendor minimal type for localforage
in Offline
integration
#3508
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
localforage
package (upon which ourOffline
integration depends) uses commonJS-style exports. This means that in order for our SDK to build successfully, and in order for any project using both us and Typescript to build successfully, either we have to userequire
in our integration or useesModuleInterop
in ourtsconfig
(and force our users to do the same).Since this has been an issue multiple times over, seemingly no matter which way we (or others) try to fix it*, this PR bypasses the types supplied by
localforage
and uses a custom type.So, hopefully for the last time:
Fixes #2853
Fixes #2868
Fixes #3091
Fixes #3401
*See #2856, #2864, #2861, #3101, #3294, dualinventive#1, and #3403. Not to mention this PR.