GoJS Typings

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

Thanks,
Latin Warrior

There is a go.d.ts TypeScript definition file in the same directory as the go.js and go-debug.js library files:

I do realize that. However, that forces me to add the file to source control, like I mentioned.

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:

  "typings":  "release/go.d.ts",

Never mind. I did this and it worked:

typings install dt~go --save

It needed to be a module reference and not a global reference. So taking out the --global flag got it working.

Hope that makes sense.

Thanks for your prompt replies!