YuriGor / deepdash

eachDeep, filterDeep, findDeep, someDeep, omitDeep, pickDeep, keysDeep etc.. Tree traversal library written in Underscore/Lodash fashion
https://deepdash.io/
MIT License
272 stars 12 forks source link

ESM: IIterateeContext typescript interface not exposed #136

Open LaurensRietveld opened 2 years ago

LaurensRietveld commented 2 years ago

When using es-modules, the type of IIterateeContext is not exposed.

Example snippet:

import eachDeep from "deepdash/eachDeep";
eachDeep({}, (val,key,context) => {
    context // typed as any
})

This is caused by the following line in the eachDeep.d.ts file in the es folder:

import { IIterateeContext } from "./IIterateeContext";

As ./IIterateeContext does not exist in the es folder, it resolves as any