microsoft/Bing-Maps-V8-TypeScript-Definitions

@types/bingmaps

jefbarn opened this issue · 11 comments

Can you work with the typescript team to get this released on @types.
It's much easier to manage using npm that way without having to pull the definitions into a local project.
See
https://blogs.msdn.microsoft.com/typescript/2016/06/15/the-future-of-declaration-files/

I'll look into it, but it doesn't look like those are managed by the TypeScript team at Microsoft. We have very specific rules we have to follow to make things open source, so not sure if this is an option or not. This is why we didn't make these appart of DefinatelyTyped. What if we just made these available through npm directly?

Yeah, I've worked at Big Corporations before and know how much of a hassle it can be.
Of course, the best answer would be to release the Bing Maps javascript api on NPM and include the typescript definitions along with the library, but oh how I dream.
Another option would be to add a typings.json to this repository then we can download with the typings tool using the "github:Microsoft/Bing-Maps-V8-TypeScript-Definitions" format.

Ok, I'll put aside some time next week to try and get this setup on npm. I'll also reach out to the owners of @types project to see how best to link this there without moving this project.

I would really like to see this! I've just switched to the new version of the Angular CLI (webpack) and it's no longer using typings.json, only "@types".

I've had a talk with the author of that blog post. Going through this project he ended up recommending using DefinatelyTyped instead of @types for this project.

These definitions are not available through npm. Simply type:
npm install -g bingmaps

@rbrundritt I guess you mean now instead of not? :) Good stuff.

https://www.npmjs.com/package/bingmaps

Correct. I meant "now" not "not". It was a long day yesterday :)

@rbrundritt I guess you mean now instead of not? :) Good stuff.

https://www.npmjs.com/package/bingmaps

That package installs the bingmaps folder into node_modules, instead of @types/bingmaps. So the TypeScript compiler ignores the typings unless they are explicitly referenced.

I left the Bing Maps team a year ago an no longer working on these. Doesn't look like any updates have been made to the NPM package by the Bing Maps team since I left.

I'm on the Azure Maps team now. We also publish TypeScript definitions here: https://www.npmjs.com/package/azure-maps-control Soon we will also include the source code in the NPM package for easier embedding. Might be worth looking into if you are just starting your development.

@rbrundritt ,
Thanks, but we are entrenched in Bing. This is only coming up now as we are working on a conversion of all JS to TS and we are now using webpack to bundle. I had no idea about Azure maps. But in either case the Typings definitely need to go into @types instead of being installed like a regular npm package. The TS compiler has special handling for @types which makes life really easy.
Maybe if you have any contacts on your old team you could give them a wink and a nudge? ;-)