NorthwoodsSoftware/GoJS

Types not exported

Closed this issue · 3 comments

As of the latest update (2.3.15) my IDE informed me at the line import * as go from "gojs"; that it

Could not find a declaration file for module gojs.
D:/MTU/MA2/04_Work/C2D_MA2/node_modules/gojs/release/go.mjs
implicitly has an any type.
There are types at
D:/MTU/MA2/04_Work/C2D_MA2/node_modules/gojs/release/go.d.ts
, but this result could not be resolved when respecting package.json exports. The gojs library may need to update its package.json or typings.

A quick google search pointed me to
https://stackoverflow.com/questions/76211877/the-xxxx-library-may-need-to-update-its-package-json-or-typings-ts
and after I edited my node_modules/gojs/package.json and added "types": "./release/go.d.ts", to its "exports": {...} my IDE no longer complained.

Please give 2.3.16 a try and let us know if it fixes what you're encountering.

sorry I didn't get back earlier - it's fixed, my IDE (Webstorm 2023.3.3) isn't complaining anymore, thank you !