Upgrade GoJS from v1.4.23 to 1.5.18


I try to upgrade the GoJS library from v1.4.23 to 1.5.18. I downloaded and updated the files:

  • go.js
  • go-debug.js
  • goJS.d.ts

So I followed the procedure that I used to do in the past but I get several strange errors in goJS.d.ts and in my code as well. Am I doing something wrong? Am I missing something?

Thanks in advance for your support!

What are the errors? Which version of TypeScript are you using? I think that version of goJS.d.ts depends on a newer version of TypeScript. The definitions file in version 1.6 of GoJS (currently in beta) will depend on an even newer version of TypeScript.

Hi walter,

Thanks for your answer.

Current TypeScript version =1.3.0 and this worked fine with GoJS 1.4.23.

Now I get errors in goJS.d.ts like " ‘;’ expected" in several places or “identifier expected”.
I also get many errors in my code when I have for example “go.Spot” or “go.ToolManager” it says that “property does not exist on value of type ‘typeof go’.”.

Is the source of the problem the TypeScript version? Which one should I use for GoJS 1.5.18? Or is there any other workaround?

Thanks again!

Yes, the problem is that if you want to use the new TypeScript definition file, you need to upgrade to TypeScript version 1.5. (I don’t remember off hand the exact version; that’s my current recollection.)

But the easy solution for now is to continue using the old goJS.d.ts file. Then you can upgrade TypeScript compilers at your convenience.

Yes, the point is that I don’t want to update the library just for fun; I want to take advantage of some cool new features of v1.5.18. For example, the randomNumberGenerator property of the ForceDirectedLayout. I had requested this in the past and I’m glad that this is available now.

So I guess I have to upgrade the TypeScript as well in order to use these new features.

Ok I’ll try this and I’ll be back to you if something is still wrong.