jakearchibald / idb-keyval

A super-simple-small promise-based keyval store implemented with IndexedDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Type instantiation is excessively deep and possibly infinite.

peterpeterparker opened this issue · comments

Issue

After cloning the repo, I get following error while running npm run dev:

rollup v2.56.3
bundles test/index.ts → dist/test/index.js...
test/index.ts:234:20 - error TS2589: Type instantiation is excessively deep and possibly infinite.

234 typeAssert<IsExact<typeof result, IDBValidKey[]>>(true);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

test/index.ts:315:20 - error TS2589: Type instantiation is excessively deep and possibly infinite.

315 typeAssert<IsExact<typeof result, [IDBValidKey, any][]>>(true);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 2 errors.

/Users/.../projects/lab/idb-keyval/rollup.config.js:91
file: 'dist/esm/index.js',
^
Error: TypeScript build failed
at ChildProcess. (/Users/.../projects/lab/idb-keyval/rollup.config.js:91:17)
at ChildProcess.emit (node:events:394:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)

Environment

Node v16.5.0
Npm 7.19.1
OSX

Replicate

git clone https://github.com/jakearchibald/idb-keyval/
cd idb-keyval
npm ci
npm run dev

Ah, I encountered this with another library. I probably need to downgrade typescript, but also file a bug about the underlying issue.

Fixed in 1e0eb5c (by downgrading typescript). Seems to be a TypeScript bug microsoft/TypeScript#45672