Closed amrit981 closed 3 years ago
This is not an issue/bug/problem with the GoJS library or its documentation, so you should not be using GitHub Issues.
The use of function name() { ... }
followed by go.Diagram.inherit(...)
is old class-defining syntax that works in all browsers. You can find examples of custom classes using the newer class
syntax in the extensionsJSM and extensionsTS subdirectories as well as in https://gojs.net/latest/intro/extensions.html#OverridingMethodsBySubclassingLayout
I am converting dynamic node code to react js. I need to create a custom link for that. I ah getting two errors
I this code "CustomLink" says this error
Error: No overload matches this call. The last overload gave the following error. Argument of type '() => any' is not assignable to parameter of type 'ConstructorType<() => any>'. Type '() => any' provides no match for the signature 'new (...args: any[]): any'.
Error: 'this' implicitly has type 'any' because it does not have a type annotation.ts
Because of these tow issues I can't move further. Someone suggested to create a separate class for Link. But I am not able to do it. Will any one has any example for that
CustomLink as a proper class in ES6, class CustomLink extends go.Link { } --- > Like this