Open hungtcs opened 4 years ago
@tbouffard
@hungtcs I was going to create such an issue about mxClient that I cannot use on my project. Apparently, based on exchanges you had on GitHub issues, this seems ok when copying the types in our projects or using git submodule in the src/types folder
I currently don't know if we require a new 'factory' package to solve the issues. In bpmn-visualization, we have removed the previous factory package we used because this was a pain to deal with both types and exported mxGraph objects. So I will be happy not having to use such solution if alternatives exist.
The current definitions are full of /// <reference path="..." />
clauses which is discouraged: see https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#red-flags
Can this be the cause of the issue? do we have to change the way we define the declaration files?
@hungtcs hi, I know you are working on a new solution to fix this issue in the @typed-mxgraph organization, I will go back to you soon on that topic.
In the meantime, could you release/publish a new version of mxgraph-type-definitions
to make fixes and improvements we have implemented since version 1.0.3
available to the community?
Thx in advance
Hi @tbouffard , I already publish a new version(1.0.4) to npm.
@tbouffard I created a new version in @typed-mxgraph to suitable for the official package, the current way is cumbersome to use, the goal of @typed-mxgraph/typed-mxgraph is reduce user configuration. But so far, I haven't done enough testing to using on production environment
Hi @tbouffard , I already publish a new version(1.0.4) to npm.
@hungtcs thanks, you rock (as always)!
@tbouffard I created a new version in @typed-mxgraph to suitable for the official package, the current way is cumbersome to use, the goal of @typed-mxgraph/typed-mxgraph is reduce user configuration. But so far, I haven't done enough testing to using on production environment
I have recently seen this new package. I plan to have a look at it on this week.
Thanks @tbouffard.
1.
typeRoots
only detect subfoldersfor instance:
mxClient
is declared innode_modules/mxgraph-type-definitions/mxClient.d.ts
, but typescript can not detect this, packages in@types/*
not have this problem.Possible solution:
mxgraph-type-definitions
package under a npm organization.2. Should we create a factory package to match
mxgraph-type-definitions
Simple implementation: