I am evaluating GoJS v 1.6.23 for an AngularJS project. We use TypeScript to write our code and then we transpile it to JavaScript. I know that I can download the Typings type definitions as a file, but I would rather download it from the typings repository. Otherwise, I’d have to check in the file into source control, which I’d rather not do. Is there any way the GoJS.d.ts can be added to the typings repository?
I would like to be able to do this:
typings install dt~gojs --global --save
That’s odd, because I seem to remember that the TypeScript folks were recommending that each library ship their own *.d.ts files along with each release, rather than putting up something somewhere that might become stale.
This is what we’ve been doing since 2013, if I remember correctly.
I haven’t used Typings, so I cannot say I’m familiar with it. But I haven’t had any trouble getting the TypeScript compiler to see the go.d.ts definition file alongside the go.js library file.
You’ll note that our package.json file includes a “typings” declaration: