Callidon / bloom-filters

JS implementation of probabilistic data structures: Bloom Filter (and its derived), HyperLogLog, Count-Min Sketch, Top-K and MinHash
https://callidon.github.io/bloom-filters/
MIT License
373 stars 43 forks source link

Could not find a declaration file for module 'seedrandom'. #75

Closed t3chguy closed 2 days ago

t3chguy commented 1 week ago

New version of https://github.com/Callidon/bloom-filters/issues/72

The package makes references to seedrandom types in the compiled artifact without it being a dependency (its only a devDep).

image


$ tsc --noEmit --jsx react && tsc --noEmit --jsx react -p playwright
node_modules/bloom-filters/dist/base-filter.d.ts:1:34 - error TS7016: Could not find a declaration file for module 'seedrandom'. '/Users/t3chguy/WebstormProjects/element-web/node_modules/seedrandom/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/seedrandom` if it exists or add a new declaration (.d.ts) file containing `declare module 'seedrandom';`

1 import seedrandom, { PRNG } from 'seedrandom';
folkvir commented 2 days ago

@t3chguy The fix has been released in the v3.0.3. If you still have any trouble don't hesitate to comment again and we will reopen the issue.

t3chguy commented 2 days ago

Thanks @folkvir - can confirm v3.0.3 fixes the issue