Replies: 5 comments 7 replies
-
If only these errors need to be fixed, you may just need to edit the |
Beta Was this translation helpful? Give feedback.
-
Hmm, editing the .d.ts file is a workaround to be sure, but it snot a good long term solution. Ok, Changing override isHorizontal(): boolean; is easy, as the override keyword was added in Typescript 4.3, and this just a checking thing, so I can replace that with isHorizontal(): boolean; in each of the 4 instances. But I'm not aware of a syntax I can use to replace the bolded line below?: declare namespace HighlighterSelectionFrameList { While horribly brute force, I replaced it with: highlighter: any; Now, the code and modules compile, but I am getting: ERROR in ./node_modules/@joint/plus/joint-plus.mjs 1:34801 Wading through the minified code of the above file, it seems the offending line is: return{"xlink:href":i="string"==typeof n?(e=e["icon-color"]??"black",n=n.replace(/${color}/g,e),"data:image/svg+xml,"+encodeURIComponent(n)):null,"data-icon-type":t}} Now, given its a typescript version problem, the ?? is the offender here. I can fix this, but there are 38 other instances of the same syntax (and god knows how many other syntactical things that will have to be dealt with), which brings me back to the problem of editing the minified files - since the changes will be moot when I have to install the real produce later (and any newer releases). My issue right now i that I want to see if JointJS simply WORKs with my code (I'm evaluating it after all). An older release that matches my typescript/angular version will enable me to do that, and if it checks out, THEN I can put the effort into discovering if I can use the latest code, albeit with a lot of stuffing about. Can someone provide me a suitable link please? The email used for the trial is a client one: [email protected] |
Beta Was this translation helpful? Give feedback.
-
Oh, the problems with the coalesce operation (??) are because Angular 8 used Webpack 4 (which aggressively does NOT understand that syntax)... arrgghh |
Beta Was this translation helpful? Give feedback.
-
I have a brain-dead solution working for a My extra-webpack.config.js file:
Its far from perfect, but it allows me to continue working (and deploy to my test server). The I have a week or so of work to finish some sample screens using JointJS+ for my client. I'll come back to this after thats done, and I have permission to get it all working for real... I'll post what I am able to find. If you have any ideas please let me know. Thanks for the assistance to date. |
Beta Was this translation helpful? Give feedback.
-
Do you still get the same error ( This is the list of global variables that are exposed by JointJS. mangle: { reserved: ['g', 'V', 'joint', 'Vectorizer'] } Note: it's a capital
Theoretically, class MyClass {}
const classRef: typeof MyClass = MyClass; to: class MyClass {}
const classRef: { new(...args: any[]): MyClass } = MyClass; However, we would need to remember not to use the As for the |
Beta Was this translation helpful? Give feedback.
-
Introduction
I want to use JointJS+ with an existing application, that is built with Angular 8. There are too many other critical dependencies to attempt to update the Angular release (believe me, I've tried) short of a ground-up rebuild of core code. Angular 8 has a Typescript dependency of v3.5.3.
When I compile the trial version with the angular tutorial code in my project, I get the following errors:
ERROR in ../node_modules/@joint/plus/joint-plus.d.ts:499:11 - error TS1005: ';' expected.
499 override isHorizontal(): boolean;
~~~~~~~~~~~~
../node_modules/@joint/plus/joint-plus.d.ts:510:11 - error TS1005: ';' expected.
510 override isHorizontal(): boolean;
~~~~~~~~~~~~
../node_modules/@joint/plus/joint-plus.d.ts:1518:11 - error TS1005: ';' expected.
1518 override isHorizontal(): boolean;
~~~~~~~~~~~~
../node_modules/@joint/plus/joint-plus.d.ts:1529:11 - error TS1005: ';' expected.
1529 override isHorizontal(): boolean;
~~~~~~~~~~~~
../node_modules/@joint/plus/joint-plus.d.ts:2301:42 - error TS1005: ';' expected.
2301 highlighter: typeof dia.HighlighterView;
~
../node_modules/@joint/plus/joint-plus.d.ts:2301:47 - error TS1005: '(' expected.
2301 highlighter: typeof dia.HighlighterView;
~
I assume the issues reported are newer Typescript syntax that isn't compatible with the older version. Is it possible to get a release of JointJS+ that supports the above versions? If so, which one? And where can I find that information / download links...etc?
Or is there a workaround that I can use somehow?
I really want to use this as it has functionality that my clients want - but not badly enough that they will pay to rebuild half of the existing application ;-)
Steps to reproduce
No response
Restrictions & Constraints
Angular 8, Typescript 3.5.3
Does your question relate to JointJS or JointJS+. Select both if applicable.
JointJS+
Beta Was this translation helpful? Give feedback.
All reactions