NorthwoodsSoftware / GoJS

JavaScript diagramming library for interactive flowcharts, org charts, design tools, planning tools, visual languages.
http://gojs.net
Other
7.8k stars 2.86k forks source link

Types not exported #205

Closed flohmueller closed 7 months ago

flohmueller commented 7 months ago

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.

simonsarris commented 7 months ago

Sorry about that. We're aware of the issue and will make a new release today.

On Fri, Mar 15, 2024, 4:48 AM flohmueller @.***> wrote:

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.

— Reply to this email directly, view it on GitHub https://github.com/NorthwoodsSoftware/GoJS/issues/205, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACTH26TMODNDLHO6DQNPR3YYKYVXAVCNFSM6AAAAABEXS2V22VHI2DSMVQWIX3LMV43ASLTON2WKOZSGE4DQMBQGY3DMNI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

simonsarris commented 7 months ago

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

flohmueller commented 7 months ago

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