Jest does not like it if I import idb/with-async-ittr:
SyntaxError: Unexpected token 'export'
> 3 | import * as idb from 'idb/with-async-ittr'
| ^
I can make Jest happy by importing idb/with-async-ittr-cjs instead, but then Typescript complains:
Could not find a declaration file for module 'idb/with-async-ittr-cjs'.
This is the same issue as #113, but for the cjs variant.
I've been able to fix this by adding another .d.ts file in my own fork of idb. I'm sure there's a better way to do all of this, but in the meantime I'll submit a PR adding that declaration file. 🤷♂️
Jest does not like it if I import
idb/with-async-ittr
:I can make Jest happy by importing
idb/with-async-ittr-cjs
instead, but then Typescript complains:This is the same issue as #113, but for the
cjs
variant.I've been able to fix this by adding another
.d.ts
file in my own fork ofidb
. I'm sure there's a better way to do all of this, but in the meantime I'll submit a PR adding that declaration file. 🤷♂️