It seems that the error in angular2 -polyfills.js when getting the Javascript library (with the Typescript types associated with it) works in Angular 2 in the browser.
This is a strange problem: I seem to be able to build and run when there is only 1 line of code in the library, but when I enter the second line, it builds but does not start?!?.
AutobahnJS library . This is a single .js file and an accurate library designed to work both in the browser and in Node. It works fine both in the browser and in Node as a regular (not angular2) javascript library. I work in Node using Typescript and its associated Types (there is an example test example on the Definitively Typed github page)
I followed the core Angular 2 Quickstart for Typescript and did not work without problems.
HERE is the code and output that work. Note that the last line in testAutobahn () is commented out:
import {Component} from 'angular2/core';
import autobahn = require('autobahn');
@Component({
selector: 'my-app',
template: `
<h1>Project: {{_projectName}}</h1>
`
})
export class AppComponent {
constructor() {}
private _projectName : string = "EXAMPLE7";
testAutobahn() {
var options: autobahn.IConnectionOptions =
{ url: 'wss://demo.crossbar.io/ws', realm: 'realm1' };
}
}

HERE - code and output that DO NOT work. Note that the last line in testAutobahn () is left in:
import {Component} from 'angular2/core';
import autobahn = require('autobahn');
@Component({
selector: 'my-app',
template: `
<h1>Project: {{_projectName}}</h1>
`
})
export class AppComponent {
constructor() {}
private _projectName : string = "EXAMPLE7";
testAutobahn() {
var options: autobahn.IConnectionOptions =
{ url: 'wss://demo.crossbar.io/ws', realm: 'realm1' };
var connection = new autobahn.Connection(options);
}
}

The only difference is commenting / uncommenting this line. It looks like the error came from angular2 -polyfills.js and system.src.js
I used 'tsd' to install all types. They all look right, and my Atom editor has intellisense on Autobahn. * Type is just fine.
Possible problems?:
" . '$' 'cssSelectorHelper', " JQueryStatic".
-> I have resolved this error by simply commenting out the line /* declare var $: JQueryStatic; */ in the jquery.d.ts file (I'm not using JQuery anyway)
Typescript v1.7.5, Angular 2 Beta 0 package.json, tsconfig.json boot.ts Angular 2 Quickstart Typescript.
- Angular2, AutobahnJS ( ).
....