Level / level

Universal abstract-level database for Node.js and browsers.
MIT License
1.55k stars 106 forks source link

types: add abstract-level type dependence #230

Closed eng-cc closed 8 months ago

eng-cc commented 1 year ago

add abstract-level type dependence

vweevers commented 1 year ago

abstract-level is already present, as a transitive dependency.

eng-cc commented 1 year ago

abstract-level is already present, as a transitive dependency.

Transitive dependencies can sometimes be problematic.

In patterns that avoid using transitive dependencies, it needs to be explicitly defined.

such as pnpm

vweevers commented 1 year ago

I see.

Perhaps we can instead re-export AbstractLevel from the classic-level and/or browser-level packages? What is the more common pattern in the TS ecosystem?

eng-cc commented 1 year ago

I see.

Perhaps we can instead re-export AbstractLevel from the classic-level and/or browser-level packages? What is the more common pattern in the TS ecosystem?

Re-export AbstractLevel from the classic-level or browser-level packages is also a nice solution.

But I think that re-export will lead to too many links of type export, which is not conducive to decoupling.

vweevers commented 8 months ago

Fixed in https://github.com/Level/level/pull/241 (added to dependencies instead of devDependencies).