datavis-tech / graph-data-structure

A graph data structure with topological sort and shortest path algorithms.
MIT License
249 stars 46 forks source link

Fix missing types declaration in `exports` field #63

Closed sargunv closed 1 year ago

sargunv commented 1 year ago

When compiling against this library in an ESM project, I get the error:

error TS7016: Could not find a declaration file for module 'graph-data-structure'.

Adding the types conditional export resolves the issue. I see there's the classic style top level types field, but the exports field takes precedence over that.

sargunv commented 1 year ago

More context: https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#packagejson-exports-imports-and-self-referencing

curran commented 1 year ago

Thanks! Released in https://github.com/datavis-tech/graph-data-structure/releases/tag/v3.2.0