Share via


TypeScript Definitions for Bing Maps V8 Released on GitHub

Last month we announced the general availability of the Bing Maps V8 web control. Today, we are happy to announce that we have released of TypeScript Definitions for Bing Maps V8. These provide intellisense and richer error catching functionality to your development environment. If you haven’t used TypeScript before we highly recommend you give it a try as it fills a lot of gaps that you wished JavaScript supported and makes development easier. In fact, we wrote the Bing Maps V8 web control using TypeScript.

Bing Maps V8 is rapidly growing with new features and functionalities. These definitions only contain the features which are in the main release branch. As such we felt it made sense to make these TypeScript definitions open source on GitHub so that anyone can download and modify these as they see fit. If you are using the experimental branch and want to start developing against a new feature before it’s in the main release branch, you can easily add in the new features that you need to the definitions. Additionally, to make it easier to add these TypeScript definitions to your application we also made them available as a Nuget package.

V8Intellisense

What is TypeScript?

When developing large web apps, JavaScript can easily become difficult to manage and maintain. If you create a function that is only meant to accept a string, but pass a number into it, the error won’t be visible until you run your code… if you are lucky.

TypeScript is a superset of JavaScript and provides static typing, classes and interfaces. It transcompiles into JavaScript which your application uses. One of the biggest benefits is when you use it in an IDE such as Visual Studio as it is able to identify a lot more errors in your code before you run your app. It also provides intellisense and autocomplete. When creating a function, you specify the type of each argument that can be passed into it. If you create a function that only takes in a string but write a line of code that passes in a number, Visual Studio will highlight it as an error. If you miss this and try to run your app, the debugger will catch this as well.

In short, TypeScript is JavaScript that scales.