diff --git a/.gitignore b/.gitignore
index 0d848f8..37f98bc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
 dist/
 node_modules/
 npm-debug.log
+typings/
\ No newline at end of file
diff --git a/package.json b/package.json
index bd5da85..982fb96 100644
--- a/package.json
+++ b/package.json
@@ -4,6 +4,7 @@
     "angular-cookies": "^1.6.0",
     "angular-resource": "^1.6.0",
     "angular-ui-router": "1.0.0-beta.1",
+    "jquery": "^3.1.1",
     "lodash": "^4.17.2",
     "rxjs": "^5.0.1",
     "socket.io-client": "^1.7.2"
@@ -40,6 +41,7 @@
     "html-loader": "^0.4.3",
     "html-webpack-plugin": "^2.9.0",
     "jasmine": "^2.4.1",
+    "jasmine-jquery": "^2.1.1",
     "json-loader": "^0.5.4",
     "karma": "^1.3.0",
     "karma-angular-filesort": "^1.0.0",
diff --git a/src/app/core/header/header.html b/src/app/core/header/header.html
index 9f50c7b..8359ab3 100644
--- a/src/app/core/header/header.html
+++ b/src/app/core/header/header.html
@@ -5,11 +5,11 @@
     </a>
   </p>
   <p class="header-date notification">
-    <i ng-show="vm.newNotifications.length > 0" class="badge"></i>
-    <i class="fa fa-bell" ng-click="showNotification = !showNotification"></i>
-    <div class="notification-panel" ng-show="showNotification">
+    <i ng-if="vm.newNotifications.length > 0" class="badge"></i>
+    <i class="fa fa-bell" ng-click="vm.showNotification = !vm.showNotification"></i>
+    <div class="notification-panel" ng-show="vm.showNotification">
       <ul>
-        <li ng-repeat="n in vm.notifications" ng-click="vm.viewNotification(n)" ng-class="{viewed: n.viewed}">
+        <li ng-repeat="n in vm.notifications track by $index" ng-click="vm.viewNotification(n)" ng-class="{viewed: n.viewed}">
           <b>{{n.model}}</b><br>
           <i>{{n.msg.object.name}} status is {{n.msg.object.backend_status}}</i>
         </li>
diff --git a/src/app/core/header/header.spec.ts b/src/app/core/header/header.spec.ts
index 0191a87..1f2c1aa 100644
--- a/src/app/core/header/header.spec.ts
+++ b/src/app/core/header/header.spec.ts
@@ -1,29 +1,107 @@
 /// <reference path="../../../../typings/index.d.ts" />
 
+import * as $ from 'jquery';
+import 'jasmine-jquery';
 import * as angular from 'angular';
 import 'angular-mocks';
-import {xosHeader} from './header';
+import {xosHeader, INotification} from './header';
 import {StyleConfig} from '../../config/style.config';
 import {Subject} from 'rxjs';
 
+let element, scope: angular.IRootScopeService, compile: ng.ICompileService, isolatedScope;
+const events = new Subject();
+const sendEvent = (event: INotification): void => {
+  events.next(event);
+};
+const MockStore = function() {
+  this.query = () => {
+    return events.asObservable();
+  };
+};
+const sampleNotification = {
+  model: 'TestModel',
+  msg: {
+    changed_fields: ['backend_status'],
+    pk: 1,
+    object: {
+      name: 'TestName',
+      backend_status: 'Test Status'
+    }
+  }
+};
+
 describe('header component', () => {
   beforeEach(() => {
     angular
       .module('xosHeader', ['app/core/header/header.html'])
       .component('xosHeader', xosHeader)
-      .service('SynchronizerStore', function(){
-        const events = new Subject();
-        this.query = () => {
-          return events.asObservable();
-        };
-      });
+      .service('SynchronizerStore', MockStore);
     angular.mock.module('xosHeader');
   });
 
-  it('should render the appropriate title', angular.mock.inject(($rootScope: ng.IRootScopeService, $compile: ng.ICompileService) => {
-    const element = $compile('<xos-header></xos-header>')($rootScope);
+  beforeEach(angular.mock.inject(($rootScope: ng.IRootScopeService, $compile: ng.ICompileService) => {
+    scope = $rootScope;
+    compile = $compile;
+    element = $compile('<xos-header></xos-header>')($rootScope);
     $rootScope.$digest();
+    isolatedScope = element.isolateScope();
+
+    // clear notifications
+    isolatedScope.notifications = [];
+  }));
+
+  it('should render the appropriate title', () => {
     const header = element.find('a');
     expect(header.html().trim()).toEqual(StyleConfig.projectName);
-  }));
+
+    const badge = $('i.badge', element);
+    expect(badge.length).toBe(0);
+  });
+
+  it('should display a badge if there are unread notifications', () => {
+    sendEvent(sampleNotification);
+    scope.$digest();
+
+    const badge = $('i.badge', element);
+    expect(badge.length).toBe(1);
+  });
+
+  it('should not display a badge if there are notifications have been read', () => {
+    sendEvent(angular.extend({viewed: true}, sampleNotification));
+    scope.$digest();
+
+    const badge = $('i.badge', element);
+    expect(badge.length).toBe(0);
+  });
+
+  it('should display a list of notifications', () => {
+    isolatedScope.showNotification = true;
+    sendEvent(angular.extend({viewed: true}, sampleNotification));
+    sendEvent(angular.extend({viewed: false}, sampleNotification));
+    scope.$digest();
+
+    const badge = $('i.badge', element);
+    expect(badge.length).toBe(1);
+    const notificationPanel = $('.notification-panel', element);
+    expect(notificationPanel.length).toBe(1);
+
+    expect($('.notification-panel li', element).length).toBe(2);
+  });
+
+  it('should add the viewed class to an readed notification', () => {
+    isolatedScope.showNotification = true;
+    sendEvent(angular.extend({viewed: true}, sampleNotification));
+    scope.$digest();
+    expect($('.notification-panel li:first-child', element)).toHaveClass('viewed');
+    scope.$digest();
+  });
+
+  it('should not add the viewed class to an unread notification', () => {
+    isolatedScope.showNotification = true;
+    sendEvent(angular.extend({viewed: false}, sampleNotification));
+    scope.$digest();
+    expect($('.notification-panel li:first-child', element)).not.toHaveClass('viewed');
+    scope.$digest();
+  });
+
 });
diff --git a/src/app/core/header/header.ts b/src/app/core/header/header.ts
index c91ef5f..20fbc3c 100644
--- a/src/app/core/header/header.ts
+++ b/src/app/core/header/header.ts
@@ -3,7 +3,7 @@
 import {IWSEvent} from '../../datasources/websocket/global';
 import {IStoreService} from '../../datasources/stores/synchronizer.store';
 
-interface INotification extends IWSEvent {
+export interface INotification extends IWSEvent {
   viewed?: boolean;
 }
 
diff --git a/typings.json b/typings.json
index ac768af..ae78607 100644
--- a/typings.json
+++ b/typings.json
@@ -7,7 +7,8 @@
     "angular-ui-router": "registry:dt/angular-ui-router#1.1.5+20160707113237",
     "es6-shim": "registry:dt/es6-shim#0.31.2+20160602141504",
     "jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#dc9dabe74a5be62613b17a3605309783a12ff28a",
-    "jquery": "github:DefinitelyTyped/DefinitelyTyped/jquery/jquery.d.ts#dc9dabe74a5be62613b17a3605309783a12ff28a",
+    "jasmine-jquery": "registry:dt/jasmine-jquery#1.5.8+20161128184045",
+    "jquery": "registry:dt/jquery#1.10.0+20161119044246",
     "require": "registry:dt/require#2.1.20+20160316155526",
     "socket.io-client": "registry:dt/socket.io-client#1.4.4+20160317120654"
   }
diff --git a/typings/globals/angular-cookies/index.d.ts b/typings/globals/angular-cookies/index.d.ts
deleted file mode 100644
index 3865afa..0000000
--- a/typings/globals/angular-cookies/index.d.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-// Generated by typings
-// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/angularjs/angular-cookies.d.ts
-declare module "angular-cookies" {
-    var _: string;
-    export = _;
-}
-
-/**
- * ngCookies module (angular-cookies.js)
- */
-declare namespace angular.cookies {
-
-    /**
-    * Cookies options
-    * see https://docs.angularjs.org/api/ngCookies/provider/$cookiesProvider#defaults
-    */
-    interface ICookiesOptions {
-        /**
-        * The cookie will be available only for this path and its sub-paths.
-        * By default, this would be the URL that appears in your base tag.
-        */
-        path?: string;
-        /**
-        * The cookie will be available only for this domain and its sub-domains.
-        * For obvious security reasons the user agent will not accept the cookie if the
-        * current domain is not a sub domain or equals to the requested domain.
-        */
-        domain?: string;
-        /**
-        * String of the form "Wdy, DD Mon YYYY HH:MM:SS GMT" or a Date object
-        * indicating the exact date/time this cookie will expire.
-        */
-        expires?: string|Date;
-        /**
-        * The cookie will be available only in secured connection.
-        */
-        secure?: boolean;
-    }
-
-    /**
-     * CookieService
-     * see http://docs.angularjs.org/api/ngCookies.$cookies
-     */
-    interface ICookiesService {
-        [index: string]: any;
-    }
-
-    /**
-     * CookieStoreService
-     * see http://docs.angularjs.org/api/ngCookies.$cookieStore
-     */
-    interface ICookiesService {
-        get(key: string): string;
-        getObject(key: string): any;
-        getObject<T>(key: string): T;
-        getAll(): any;
-        put(key: string, value: string, options?: ICookiesOptions): void;
-        putObject(key: string, value: any, options?: ICookiesOptions): void;
-        remove(key: string, options?: ICookiesOptions): void;
-    }
-
-    /**
-     * CookieStoreService DEPRECATED
-     * see https://code.angularjs.org/1.2.26/docs/api/ngCookies/service/$cookieStore
-     */
-    interface ICookieStoreService {
-        /**
-         * Returns the value of given cookie key
-         * @param key Id to use for lookup
-         */
-        get(key: string): any;
-        /**
-         * Sets a value for given cookie key
-         * @param key Id for the value
-         * @param value Value to be stored
-         */
-        put(key: string, value: any): void;
-        /**
-         * Remove given cookie
-         * @param key Id of the key-value pair to delete
-         */
-        remove(key: string): void;
-    }
-
-}
diff --git a/typings/globals/angular-cookies/typings.json b/typings/globals/angular-cookies/typings.json
deleted file mode 100644
index 956cbcd..0000000
--- a/typings/globals/angular-cookies/typings.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "resolution": "main",
-  "tree": {
-    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/angularjs/angular-cookies.d.ts",
-    "raw": "registry:dt/angular-cookies#1.4.0+20160317120654",
-    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/angularjs/angular-cookies.d.ts"
-  }
-}
diff --git a/typings/globals/angular-mocks/index.d.ts b/typings/globals/angular-mocks/index.d.ts
deleted file mode 100644
index 0038bdc..0000000
--- a/typings/globals/angular-mocks/index.d.ts
+++ /dev/null
@@ -1,313 +0,0 @@
-// Generated by typings
-// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/dc9dabe74a5be62613b17a3605309783a12ff28a/angularjs/angular-mocks.d.ts
-declare module "angular-mocks/ngMock" {
-    var _: string;
-    export = _;
-}
-
-declare module "angular-mocks/ngMockE2E" {
-    var _: string;
-    export = _;
-}
-
-declare module "angular-mocks/ngAnimateMock" {
-    var _: string;
-    export = _;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// ngMock module (angular-mocks.js)
-///////////////////////////////////////////////////////////////////////////////
-declare module angular {
-
-    ///////////////////////////////////////////////////////////////////////////
-    // AngularStatic
-    // We reopen it to add the MockStatic definition
-    ///////////////////////////////////////////////////////////////////////////
-    interface IAngularStatic {
-        mock: IMockStatic;
-    }
-    
-    // see https://docs.angularjs.org/api/ngMock/function/angular.mock.inject
-    interface IInjectStatic {
-        (...fns: Function[]): any;
-        (...inlineAnnotatedConstructor: any[]): any; // this overload is undocumented, but works
-        strictDi(val?: boolean): void;
-    }
-
-    interface IMockStatic {
-        // see https://docs.angularjs.org/api/ngMock/function/angular.mock.dump
-        dump(obj: any): string;
-
-        inject: IInjectStatic
-
-        // see https://docs.angularjs.org/api/ngMock/function/angular.mock.module
-        module(...modules: any[]): any;
-
-        // see https://docs.angularjs.org/api/ngMock/type/angular.mock.TzDate
-        TzDate(offset: number, timestamp: number): Date;
-        TzDate(offset: number, timestamp: string): Date;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // ExceptionHandlerService
-    // see https://docs.angularjs.org/api/ngMock/service/$exceptionHandler
-    // see https://docs.angularjs.org/api/ngMock/provider/$exceptionHandlerProvider
-    ///////////////////////////////////////////////////////////////////////////
-    interface IExceptionHandlerProvider extends IServiceProvider {
-        mode(mode: string): void;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // TimeoutService
-    // see https://docs.angularjs.org/api/ngMock/service/$timeout
-    // Augments the original service
-    ///////////////////////////////////////////////////////////////////////////
-    interface ITimeoutService {
-        flush(delay?: number): void;
-        flushNext(expectedDelay?: number): void;
-        verifyNoPendingTasks(): void;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // IntervalService
-    // see https://docs.angularjs.org/api/ngMock/service/$interval
-    // Augments the original service
-    ///////////////////////////////////////////////////////////////////////////
-    interface IIntervalService {
-        flush(millis?: number): number;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // LogService
-    // see https://docs.angularjs.org/api/ngMock/service/$log
-    // Augments the original service
-    ///////////////////////////////////////////////////////////////////////////
-    interface ILogService {
-        assertEmpty(): void;
-        reset(): void;
-    }
-
-    interface ILogCall {
-        logs: string[];
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // HttpBackendService
-    // see https://docs.angularjs.org/api/ngMock/service/$httpBackend
-    ///////////////////////////////////////////////////////////////////////////
-    interface IHttpBackendService {
-        /**
-          * Flushes all pending requests using the trained responses.
-          * @param count Number of responses to flush (in the order they arrived). If undefined, all pending requests will be flushed. 
-          */
-        flush(count?: number): void;
-        
-        /**
-          * Resets all request expectations, but preserves all backend definitions.
-          */
-        resetExpectations(): void;
-        
-        /**
-          * Verifies that all of the requests defined via the expect api were made. If any of the requests were not made, verifyNoOutstandingExpectation throws an exception.
-          */
-        verifyNoOutstandingExpectation(): void;
-        
-        /**
-          * Verifies that there are no outstanding requests that need to be flushed.
-          */
-        verifyNoOutstandingRequest(): void;
-
-        /**
-          * Creates a new request expectation. 
-          * Throws a preformatted error if expectation(s) don't match supplied string, regular expression, object, or if function returns false.
-          * Returns an object with respond method that controls how a matched request is handled.
-          * @param method HTTP method.
-          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
-          * @param data HTTP request body string, json object, regular expression or function that receives the data and returns true if the data matches the current expectation.
-          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
-          */
-        expect(method: string, url: string | RegExp | ((url: string) => boolean), data?: string | RegExp | Object | ((data: string) => boolean), headers?: Object | ((object: Object) => boolean)) :mock.IRequestHandler;
-
-        /**
-          * Creates a new request expectation for DELETE requests.
-          * Throws a preformatted error if expectation(s) don't match supplied string, regular expression, object, or if function returns false.
-          * Returns an object with respond method that controls how a matched request is handled.
-          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url is as expected.
-          * @param headers HTTP headers object to be compared with the HTTP headers in the request.
-        */
-        expectDELETE(url: string | RegExp | ((url: string) => boolean), headers?: Object): mock.IRequestHandler;
-
-        /**
-          * Creates a new request expectation for GET requests.
-          * Throws a preformatted error if expectation(s) don't match supplied string, regular expression, object, or if function returns false.
-          * Returns an object with respond method that controls how a matched request is handled.
-          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
-          * @param headers HTTP headers object to be compared with the HTTP headers in the request.
-          */
-        expectGET(url: string | RegExp | ((url: string) => boolean), headers?: Object): mock.IRequestHandler;
-
-        /**
-          * Creates a new request expectation for HEAD requests.
-          * Throws a preformatted error if expectation(s) don't match supplied string, regular expression, object, or if function returns false.
-          * Returns an object with respond method that controls how a matched request is handled.
-          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
-          * @param headers HTTP headers object to be compared with the HTTP headers in the request.
-          */
-        expectHEAD(url: string | RegExp | ((url: string) => boolean), headers?: Object): mock.IRequestHandler;
-        
-        /**
-          * Creates a new request expectation for JSONP requests.
-          * Throws a preformatted error if expectation(s) don't match supplied string, regular expression, or if function returns false.
-          * Returns an object with respond method that controls how a matched request is handled.
-          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
-          */        
-        expectJSONP(url: string | RegExp | ((url: string) => boolean)): mock.IRequestHandler;
-
-        /**
-          * Creates a new request expectation for PATCH requests. 
-          * Throws a preformatted error if expectation(s) don't match supplied string, regular expression, object, or if function returns false.
-          * Returns an object with respond method that controls how a matched request is handled.
-          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
-          * @param data HTTP request body string, json object, regular expression or function that receives the data and returns true if the data matches the current expectation.
-          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
-          */
-        expectPATCH(url: string | RegExp | ((url: string) => boolean), data?: string | RegExp | Object | ((data: string) => boolean), headers?: Object): mock.IRequestHandler;
-
-        /**
-          * Creates a new request expectation for POST requests. 
-          * Throws a preformatted error if expectation(s) don't match supplied string, regular expression, object, or if function returns false.
-          * Returns an object with respond method that controls how a matched request is handled.
-          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
-          * @param data HTTP request body string, json object, regular expression or function that receives the data and returns true if the data matches the current expectation.
-          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
-          */
-        expectPOST(url: string | RegExp | ((url: string) => boolean), data?: string | RegExp | Object | ((data: string) => boolean), headers?: Object): mock.IRequestHandler;
-
-        /**
-          * Creates a new request expectation for PUT requests. 
-          * Throws a preformatted error if expectation(s) don't match supplied string, regular expression, object, or if function returns false.
-          * Returns an object with respond method that controls how a matched request is handled.
-          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
-          * @param data HTTP request body string, json object, regular expression or function that receives the data and returns true if the data matches the current expectation.
-          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
-          */
-        expectPUT(url: string | RegExp | ((url: string) => boolean), data?: string | RegExp | Object | ((data: string) => boolean), headers?: Object): mock.IRequestHandler;
-
-        /**
-          * Creates a new backend definition. 
-          * Returns an object with respond method that controls how a matched request is handled.
-          * @param method HTTP method.
-          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
-          * @param data HTTP request body string, json object, regular expression or function that receives the data and returns true if the data matches the current expectation.
-          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
-          */
-        when(method: string, url: string | RegExp | ((url: string) => boolean), data?: string | RegExp | Object | ((data: string) => boolean), headers?: Object | ((object: Object) => boolean)): mock.IRequestHandler;
-
-        /**
-          * Creates a new backend definition for DELETE requests. 
-          * Returns an object with respond method that controls how a matched request is handled.
-          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
-          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
-          */
-        whenDELETE(url: string | RegExp | ((url: string) => boolean), headers?: Object | ((object: Object) => boolean)): mock.IRequestHandler;
-
-        /**
-          * Creates a new backend definition for GET requests. 
-          * Returns an object with respond method that controls how a matched request is handled.
-          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
-          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
-          */
-        whenGET(url: string | RegExp | ((url: string) => boolean), headers?: Object | ((object: Object) => boolean)): mock.IRequestHandler;
-
-        /**
-          * Creates a new backend definition for HEAD requests. 
-          * Returns an object with respond method that controls how a matched request is handled.
-          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
-          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
-          */
-        whenHEAD(url: string | RegExp | ((url: string) => boolean), headers?: Object | ((object: Object) => boolean)): mock.IRequestHandler;
-
-        /**
-          * Creates a new backend definition for JSONP requests. 
-          * Returns an object with respond method that controls how a matched request is handled.
-          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
-          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
-          */
-        whenJSONP(url: string | RegExp | ((url: string) => boolean)): mock.IRequestHandler;
-
-        /**
-          * Creates a new backend definition for PATCH requests. 
-          * Returns an object with respond method that controls how a matched request is handled.
-          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
-          * @param data HTTP request body string, json object, regular expression or function that receives the data and returns true if the data matches the current expectation.
-          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
-          */
-        whenPATCH(url: string | RegExp | ((url: string) => boolean), data?: string | RegExp | Object | ((data: string) => boolean), headers?: Object | ((object: Object) => boolean)): mock.IRequestHandler;
-
-        /**
-          * Creates a new backend definition for POST requests. 
-          * Returns an object with respond method that controls how a matched request is handled.
-          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
-          * @param data HTTP request body string, json object, regular expression or function that receives the data and returns true if the data matches the current expectation.
-          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
-          */
-        whenPOST(url: string | RegExp | ((url: string) => boolean), data?: string | RegExp | Object | ((data: string) => boolean), headers?: Object | ((object: Object) => boolean)): mock.IRequestHandler;
-
-        /**
-          * Creates a new backend definition for PUT requests. 
-          * Returns an object with respond method that controls how a matched request is handled.
-          * @param url HTTP url string, regular expression or function that receives a url and returns true if the url matches the current expctation.
-          * @param data HTTP request body string, json object, regular expression or function that receives the data and returns true if the data matches the current expectation.
-          * @param headers HTTP headers object or function that receives the headers and returns true if the headers match the current expectation.
-          */
-        whenPUT(url: string | RegExp | ((url: string) => boolean), data?: string | RegExp | Object | ((data: string) => boolean), headers?: Object | ((object: Object) => boolean)): mock.IRequestHandler;
-    }
-
-    export module mock {
-        // returned interface by the the mocked HttpBackendService expect/when methods
-        interface IRequestHandler {
-          
-            /**
-              * Controls the response for a matched request using a function to construct the response. 
-              * Returns the RequestHandler object for possible overrides.
-              * @param func Function that receives the request HTTP method, url, data, and headers and returns an array containing response status (number), data, headers, and status text.
-              */
-            respond(func: ((method: string, url: string, data: string | Object, headers: Object) => [number, string | Object, Object, string])): IRequestHandler;
-
-            /**
-              * Controls the response for a matched request using supplied static data to construct the response. 
-              * Returns the RequestHandler object for possible overrides.
-              * @param status HTTP status code to add to the response.
-              * @param data Data to add to the response.
-              * @param headers Headers object to add to the response.
-              * @param responseText Response text to add to the response.
-              */
-            respond(status: number, data: string | Object, headers?: Object, responseText?: string): IRequestHandler;
-
-            /**
-              * Controls the response for a matched request using the HTTP status code 200 and supplied static data to construct the response. 
-              * Returns the RequestHandler object for possible overrides.
-              * @param data Data to add to the response.
-              * @param headers Headers object to add to the response.
-              * @param responseText Response text to add to the response.
-              */
-            respond(data: string | Object, headers?: Object, responseText?: string): IRequestHandler;
-
-            // Available when ngMockE2E is loaded
-            /**
-              * Any request matching a backend definition or expectation with passThrough handler will be passed through to the real backend (an XHR request will be made to the server.)
-              */
-            passThrough(): IRequestHandler;
-        }
-
-    }
-
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// functions attached to global object (window)
-///////////////////////////////////////////////////////////////////////////////
-//Use `angular.mock.module` instead of `module`, as `module` conflicts with commonjs.
-//declare var module: (...modules: any[]) => any;
-declare var inject: angular.IInjectStatic;
diff --git a/typings/globals/angular-mocks/typings.json b/typings/globals/angular-mocks/typings.json
deleted file mode 100644
index b6adead..0000000
--- a/typings/globals/angular-mocks/typings.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "resolution": "main",
-  "tree": {
-    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/dc9dabe74a5be62613b17a3605309783a12ff28a/angularjs/angular-mocks.d.ts",
-    "raw": "github:DefinitelyTyped/DefinitelyTyped/angularjs/angular-mocks.d.ts#dc9dabe74a5be62613b17a3605309783a12ff28a",
-    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/dc9dabe74a5be62613b17a3605309783a12ff28a/angularjs/angular-mocks.d.ts"
-  }
-}
diff --git a/typings/globals/angular-resource/index.d.ts b/typings/globals/angular-resource/index.d.ts
deleted file mode 100644
index 0496d92..0000000
--- a/typings/globals/angular-resource/index.d.ts
+++ /dev/null
@@ -1,204 +0,0 @@
-// Generated by typings
-// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/19854af46f2bcd37cf416341ce74ef03ab1717b9/angularjs/angular-resource.d.ts
-declare module 'angular-resource' {
-    var _: string;
-    export = _;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// ngResource module (angular-resource.js)
-///////////////////////////////////////////////////////////////////////////////
-declare namespace angular.resource {
-
-    /**
-     * Currently supported options for the $resource factory options argument.
-     */
-    interface IResourceOptions {
-        /**
-         * If true then the trailing slashes from any calculated URL will be stripped (defaults to true)
-         */
-        stripTrailingSlashes?: boolean;
-        /**
-         * If true, the request made by a "non-instance" call will be cancelled (if not already completed) by calling
-         * $cancelRequest() on the call's return value. This can be overwritten per action. (Defaults to false.)
-         */
-        cancellable?: boolean;
-    }
-
-
-    ///////////////////////////////////////////////////////////////////////////
-    // ResourceService
-    // see http://docs.angularjs.org/api/ngResource.$resource
-    // Most part of the following definitions were achieved by analyzing the
-    // actual implementation, since the documentation doesn't seem to cover
-    // that deeply.
-    ///////////////////////////////////////////////////////////////////////////
-    interface IResourceService {
-        (url: string, paramDefaults?: any,
-            /** example:  {update: { method: 'PUT' }, delete: deleteDescriptor }
-             where deleteDescriptor : IActionDescriptor */
-            actions?: IActionHash, options?: IResourceOptions): IResourceClass<IResource<any>>;
-        <T, U>(url: string, paramDefaults?: any,
-            /** example:  {update: { method: 'PUT' }, delete: deleteDescriptor }
-             where deleteDescriptor : IActionDescriptor */
-            actions?: IActionHash, options?: IResourceOptions): U;
-        <T>(url: string, paramDefaults?: any,
-            /** example:  {update: { method: 'PUT' }, delete: deleteDescriptor }
-             where deleteDescriptor : IActionDescriptor */
-            actions?: IActionHash, options?: IResourceOptions): IResourceClass<T>;
-    }
-
-    // Hash of action descriptors allows custom action names
-    interface IActionHash {
-        [action: string]: IActionDescriptor
-    }
-
-    // Just a reference to facilitate describing new actions
-    interface IActionDescriptor {
-        method: string;
-        params?: any;
-        url?: string;
-        isArray?: boolean;
-        transformRequest?: angular.IHttpRequestTransformer | angular.IHttpRequestTransformer[];
-        transformResponse?: angular.IHttpResponseTransformer | angular.IHttpResponseTransformer[];
-        headers?: any;
-        cache?: boolean | angular.ICacheObject;
-        /**
-         * Note: In contrast to $http.config, promises are not supported in $resource, because the same value
-         * would be used for multiple requests. If you are looking for a way to cancel requests, you should
-         * use the cancellable option.
-         */
-        timeout?: number
-        cancellable?: boolean;
-        withCredentials?: boolean;
-        responseType?: string;
-        interceptor?: IHttpInterceptor;
-    }
-
-    // Allow specify more resource methods
-    // No need to add duplicates for all four overloads.
-    interface IResourceMethod<T> {
-        (): T;
-        (params: Object): T;
-        (success: Function, error?: Function): T;
-        (params: Object, success: Function, error?: Function): T;
-        (params: Object, data: Object, success?: Function, error?: Function): T;
-    }
-
-    // Allow specify resource moethod which returns the array
-    // No need to add duplicates for all four overloads.
-    interface IResourceArrayMethod<T> {
-        (): IResourceArray<T>;
-        (params: Object): IResourceArray<T>;
-        (success: Function, error?: Function): IResourceArray<T>;
-        (params: Object, success: Function, error?: Function): IResourceArray<T>;
-        (params: Object, data: Object, success?: Function, error?: Function): IResourceArray<T>;
-    }
-
-    // Baseclass for every resource with default actions.
-    // If you define your new actions for the resource, you will need
-    // to extend this interface and typecast the ResourceClass to it.
-    //
-    // In case of passing the first argument as anything but a function,
-    // it's gonna be considered data if the action method is POST, PUT or
-    // PATCH (in other words, methods with body). Otherwise, it's going
-    // to be considered as parameters to the request.
-    // https://github.com/angular/angular.js/blob/v1.2.0/src/ngResource/resource.js#L461-L465
-    //
-    // Only those methods with an HTTP body do have 'data' as first parameter:
-    // https://github.com/angular/angular.js/blob/v1.2.0/src/ngResource/resource.js#L463
-    // More specifically, those methods are POST, PUT and PATCH:
-    // https://github.com/angular/angular.js/blob/v1.2.0/src/ngResource/resource.js#L432
-    //
-    // Also, static calls always return the IResource (or IResourceArray) retrieved
-    // https://github.com/angular/angular.js/blob/v1.2.0/src/ngResource/resource.js#L538-L549
-    interface IResourceClass<T> {
-        new(dataOrParams? : any) : T & IResource<T>;
-        get: IResourceMethod<T>;
-
-        query: IResourceArrayMethod<T>;
-
-        save: IResourceMethod<T>;
-
-        remove: IResourceMethod<T>;
-
-        delete: IResourceMethod<T>;
-    }
-
-    // Instance calls always return the the promise of the request which retrieved the object
-    // https://github.com/angular/angular.js/blob/v1.2.0/src/ngResource/resource.js#L538-L546
-    interface IResource<T> {
-        $get(): angular.IPromise<T>;
-        $get(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
-        $get(success: Function, error?: Function): angular.IPromise<T>;
-
-        $query(): angular.IPromise<IResourceArray<T>>;
-        $query(params?: Object, success?: Function, error?: Function): angular.IPromise<IResourceArray<T>>;
-        $query(success: Function, error?: Function): angular.IPromise<IResourceArray<T>>;
-
-        $save(): angular.IPromise<T>;
-        $save(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
-        $save(success: Function, error?: Function): angular.IPromise<T>;
-
-        $remove(): angular.IPromise<T>;
-        $remove(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
-        $remove(success: Function, error?: Function): angular.IPromise<T>;
-
-        $delete(): angular.IPromise<T>;
-        $delete(params?: Object, success?: Function, error?: Function): angular.IPromise<T>;
-        $delete(success: Function, error?: Function): angular.IPromise<T>;
-
-        $cancelRequest(): void;
-
-        /** the promise of the original server interaction that created this instance. **/
-        $promise : angular.IPromise<T>;
-        $resolved : boolean;
-        toJSON(): T;
-    }
-
-    /**
-     * Really just a regular Array object with $promise and $resolve attached to it
-     */
-    interface IResourceArray<T> extends Array<T & IResource<T>> {
-        $cancelRequest(): void;
-
-        /** the promise of the original server interaction that created this collection. **/
-        $promise : angular.IPromise<IResourceArray<T>>;
-        $resolved : boolean;
-    }
-
-    /** when creating a resource factory via IModule.factory */
-    interface IResourceServiceFactoryFunction<T> {
-        ($resource: angular.resource.IResourceService): IResourceClass<T>;
-        <U extends IResourceClass<T>>($resource: angular.resource.IResourceService): U;
-    }
-
-    // IResourceServiceProvider used to configure global settings
-    interface IResourceServiceProvider extends angular.IServiceProvider {
-
-        defaults: IResourceOptions;
-    }
-
-}
-
-/** extensions to base ng based on using angular-resource */
-declare namespace angular {
-
-    interface IModule {
-        /** creating a resource service factory */
-        factory(name: string, resourceServiceFactoryFunction: angular.resource.IResourceServiceFactoryFunction<any>): IModule;
-    }
-
-    namespace auto {
-    	interface IInjectorService {
-    		get(name: '$resource'): ng.resource.IResourceService;
-    	}
-    }
-}
-
-interface Array<T>
-{
-    /** the promise of the original server interaction that created this collection. **/
-    $promise : angular.IPromise<Array<T>>;
-    $resolved : boolean;
-}
diff --git a/typings/globals/angular-resource/typings.json b/typings/globals/angular-resource/typings.json
deleted file mode 100644
index bc04b28..0000000
--- a/typings/globals/angular-resource/typings.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "resolution": "main",
-  "tree": {
-    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/19854af46f2bcd37cf416341ce74ef03ab1717b9/angularjs/angular-resource.d.ts",
-    "raw": "registry:dt/angular-resource#1.5.0+20161114123626",
-    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/19854af46f2bcd37cf416341ce74ef03ab1717b9/angularjs/angular-resource.d.ts"
-  }
-}
diff --git a/typings/globals/angular-ui-router/index.d.ts b/typings/globals/angular-ui-router/index.d.ts
deleted file mode 100644
index 47af08e..0000000
--- a/typings/globals/angular-ui-router/index.d.ts
+++ /dev/null
@@ -1,367 +0,0 @@
-// Generated by typings
-// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/b38cd68fe2dacaea0bb4efd6a3c638ceeae4fb25/angular-ui-router/angular-ui-router.d.ts
-declare module 'angular-ui-router' {
-    // Since angular-ui-router adds providers for a bunch of
-    // injectable dependencies, it doesn't really return any
-    // actual data except the plain string 'ui.router'.
-    //
-    // As such, I don't think anybody will ever use the actual
-    // default value of the module.  So I've only included the
-    // the types. (@xogeny)
-    export type IState = angular.ui.IState;
-    export type IStateProvider = angular.ui.IStateProvider;
-    export type IUrlMatcher = angular.ui.IUrlMatcher;
-    export type IUrlRouterProvider = angular.ui.IUrlRouterProvider;
-    export type IStateOptions = angular.ui.IStateOptions;
-    export type IHrefOptions = angular.ui.IHrefOptions;
-    export type IStateService = angular.ui.IStateService;
-    export type IResolvedState = angular.ui.IResolvedState;
-    export type IStateParamsService = angular.ui.IStateParamsService;
-    export type IUrlRouterService = angular.ui.IUrlRouterService;
-    export type IUiViewScrollProvider = angular.ui.IUiViewScrollProvider;
-    export type IType = angular.ui.IType;
-}
-
-declare namespace angular.ui {
-
-    interface IState {
-        name?: string;
-        /**
-         * String HTML content, or function that returns an HTML string
-         */
-        template?: string | {(params: IStateParamsService): string};
-        /**
-         * String URL path to template file OR Function, returns URL path string
-         */
-        templateUrl?: string | {(params: IStateParamsService): string};
-        /**
-         * Function, returns HTML content string
-         */
-        templateProvider?: Function | Array<string|Function>;
-        /**
-         * String, component name
-         */
-        component?: string;
-        /**
-         * A controller paired to the state. Function, annotated array or name as String
-         */
-        controller?: Function|string|Array<string|Function>;
-        controllerAs?: string;
-        /**
-         * Function (injectable), returns the actual controller function or string.
-         */
-        controllerProvider?: Function|Array<string|Function>;
-
-        /**
-         * Specifies the parent state of this state
-         */
-        parent?: string | IState;
-
-
-        resolve?: { [name:string]: any };
-        /**
-         * A url with optional parameters. When a state is navigated or transitioned to, the $stateParams service will be populated with any parameters that were passed.
-         */
-        url?: string | IUrlMatcher;
-        /**
-         * A map which optionally configures parameters declared in the url, or defines additional non-url parameters. Only use this within a state if you are not using url. Otherwise you can specify your parameters within the url. When a state is navigated or transitioned to, the $stateParams service will be populated with any parameters that were passed.
-         */
-        params?: any;
-        /**
-         * Use the views property to set up multiple views. If you don't need multiple views within a single state this property is not needed. Tip: remember that often nested views are more useful and powerful than multiple sibling views.
-         */
-        views?: { [name:string]: IState };
-        abstract?: boolean;
-        /**
-         * Callback function for when a state is entered. Good way to trigger an action or dispatch an event, such as opening a dialog.
-         * If minifying your scripts, make sure to explicitly annotate this function, because it won't be automatically annotated by your build tools.
-         */
-        onEnter?: Function|Array<string|Function>;
-        /**
-         * Callback functions for when a state is entered and exited. Good way to trigger an action or dispatch an event, such as opening a dialog.
-         * If minifying your scripts, make sure to explicitly annotate this function, because it won't be automatically annotated by your build tools.
-         */
-        onExit?: Function|Array<string|Function>;
-        /**
-         * Arbitrary data object, useful for custom configuration.
-         */
-        data?: any;
-
-        /**
-         * Boolean (default true). If false will not re-trigger the same state just because a search/query parameter has changed. Useful for when you'd like to modify $location.search() without triggering a reload.
-         */
-        reloadOnSearch?: boolean;
-
-        /**
-         * Boolean (default true). If false will reload state on everytransitions. Useful for when you'd like to restore all data  to its initial state.
-         */
-        cache?: boolean;
-    }
-
-    interface IUnfoundState {
-        to: string,
-        toParams: {},
-        options: IStateOptions
-    }
-    
-    interface IStateProvider extends angular.IServiceProvider {
-        state(name:string, config:IState): IStateProvider;
-        state(config:IState): IStateProvider;
-        decorator(name?: string, decorator?: (state: IState, parent: Function) => any): any;
-    }
-
-    interface IUrlMatcher {
-        concat(pattern: string): IUrlMatcher;
-        exec(path: string, searchParams: {}): {};
-        parameters(): string[];
-        format(values: {}): string;
-    }
-
-    interface IUrlMatcherFactory {
-        /**
-         * Creates a UrlMatcher for the specified pattern.
-         *
-         * @param pattern {string} The URL pattern.
-         *
-         * @returns {IUrlMatcher} The UrlMatcher.
-         */
-        compile(pattern: string): IUrlMatcher;
-        /**
-         * Returns true if the specified object is a UrlMatcher, or false otherwise.
-         *
-         * @param o {any} The object to perform the type check against.
-         *
-         * @returns {boolean} Returns true if the object matches the IUrlMatcher interface, by implementing all the same methods.
-         */
-        isMatcher(o: any): boolean;
-        /**
-         * Returns a type definition for the specified name
-         *
-         * @param name {string} The type definition name
-         *
-         * @returns {IType} The type definition
-         */
-        type(name: string): IType;
-        /**
-         * Registers a custom Type object that can be used to generate URLs with typed parameters.
-         *
-         * @param {IType} definition The type definition.
-         * @param {any[]} inlineAnnotedDefinitionFn A function that is injected before the app runtime starts. The result of this function is merged into the existing definition.
-         *
-         * @returns {IUrlMatcherFactory} Returns $urlMatcherFactoryProvider.
-         */
-        type(name: string, definition: IType, inlineAnnotedDefinitionFn?: any[]): IUrlMatcherFactory;
-        /**
-         * Registers a custom Type object that can be used to generate URLs with typed parameters.
-         *
-         * @param {IType} definition The type definition.
-         * @param {any[]} inlineAnnotedDefinitionFn A function that is injected before the app runtime starts. The result of this function is merged into the existing definition.
-         *
-         * @returns {IUrlMatcherFactory} Returns $urlMatcherFactoryProvider.
-         */
-        type(name: string, definition: IType, definitionFn?: (...args:any[]) => IType): IUrlMatcherFactory;
-        /**
-         * Defines whether URL matching should be case sensitive (the default behavior), or not.
-         *
-         * @param value {boolean} false to match URL in a case sensitive manner; otherwise true;
-         *
-         * @returns {boolean} the current value of caseInsensitive
-         */
-        caseInsensitive(value?: boolean): boolean;
-        /**
-         * Sets the default behavior when generating or matching URLs with default parameter values
-         *
-         * @param value {string} A string that defines the default parameter URL squashing behavior. nosquash: When generating an href with a default parameter value, do not squash the parameter value from the URL slash: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the parameter is surrounded by slashes, squash (remove) one slash from the URL any other string, e.g. "~": When generating an href with a default parameter value, squash (remove) the parameter value from the URL and replace it with this string.
-         */
-        defaultSquashPolicy(value: string): void;
-        /**
-         * Defines whether URLs should match trailing slashes, or not (the default behavior).
-         *
-         * @param value {boolean} false to match trailing slashes in URLs, otherwise true.
-         *
-         * @returns {boolean} the current value of strictMode
-         */
-        strictMode(value?: boolean): boolean;
-    }
-
-    interface IUrlRouterProvider extends angular.IServiceProvider {
-        when(whenPath: RegExp, handler: Function): IUrlRouterProvider;
-        when(whenPath: RegExp, handler: any[]): IUrlRouterProvider;
-        when(whenPath: RegExp, toPath: string): IUrlRouterProvider;
-        when(whenPath: IUrlMatcher, hanlder: Function): IUrlRouterProvider;
-        when(whenPath: IUrlMatcher, handler: any[]): IUrlRouterProvider;
-        when(whenPath: IUrlMatcher, toPath: string): IUrlRouterProvider;
-        when(whenPath: string, handler: Function): IUrlRouterProvider;
-        when(whenPath: string, handler: any[]): IUrlRouterProvider;
-        when(whenPath: string, toPath: string): IUrlRouterProvider;
-        otherwise(handler: Function): IUrlRouterProvider;
-        otherwise(handler: any[]): IUrlRouterProvider;
-        otherwise(path: string): IUrlRouterProvider;
-        rule(handler: Function): IUrlRouterProvider;
-        rule(handler: any[]): IUrlRouterProvider;
-        /**
-         * Disables (or enables) deferring location change interception.
-         *
-         * If you wish to customize the behavior of syncing the URL (for example, if you wish to defer a transition but maintain the current URL), call this method at configuration time. Then, at run time, call $urlRouter.listen() after you have configured your own $locationChangeSuccess event handler.
-         *
-         * @param {boolean} defer Indicates whether to defer location change interception. Passing no parameter is equivalent to true.
-         */
-        deferIntercept(defer?: boolean): void;
-    }
-
-    interface IStateOptions {
-        /**
-         * {boolean=true|string=} - If true will update the url in the location bar, if false will not. If string, must be "replace", which will update url and also replace last history record.
-         */
-        location?: boolean | string;
-        /**
-         *  {boolean=true}, If true will inherit url parameters from current url.
-         */
-        inherit?: boolean;
-        /**
-         * {object=$state.$current}, When transitioning with relative path (e.g '^'), defines which state to be relative from.
-         */
-        relative?: IState;
-        /**
-         * {boolean=true}, If true will broadcast $stateChangeStart and $stateChangeSuccess events.
-         */
-        notify?: boolean;
-        /**
-         * {boolean=false|string|IState}, If true will force transition even if the state or params have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd use this when you want to force a reload when everything is the same, including search params.
-         */
-        reload?: boolean | string | IState;
-    }
-
-    interface IHrefOptions {
-        lossy?: boolean;
-        inherit?: boolean;
-        relative?: IState;
-        absolute?: boolean;
-    }
-
-    interface IStateService {
-        /**
-         * Convenience method for transitioning to a new state. $state.go calls $state.transitionTo internally but automatically sets options to { location: true, inherit: true, relative: $state.$current, notify: true }. This allows you to easily use an absolute or relative to path and specify only the parameters you'd like to update (while letting unspecified parameters inherit from the currently active ancestor states).
-         *
-         * @param to Absolute state name or relative state path. Some examples:
-         *
-         * $state.go('contact.detail') - will go to the contact.detail state
-         * $state.go('^') - will go to a parent state
-         * $state.go('^.sibling') - will go to a sibling state
-         * $state.go('.child.grandchild') - will go to grandchild state
-         *
-         * @param params A map of the parameters that will be sent to the state, will populate $stateParams. Any parameters that are not specified will be inherited from currently defined parameters. This allows, for example, going to a sibling state that shares parameters specified in a parent state. Parameter inheritance only works between common ancestor states, I.e. transitioning to a sibling will get you the parameters for all parents, transitioning to a child will get you all current parameters, etc.
-         *
-         * @param options Options object.
-         */
-        go(to: string, params?: {}, options?: IStateOptions): angular.IPromise<any>;
-        go(to: IState, params?: {}, options?: IStateOptions): angular.IPromise<any>;
-        transitionTo(state: string, params?: {}, updateLocation?: boolean): angular.IPromise<any>;
-        transitionTo(state: IState, params?: {}, updateLocation?: boolean): angular.IPromise<any>;
-        transitionTo(state: string, params?: {}, options?: IStateOptions): angular.IPromise<any>;
-        transitionTo(state: IState, params?: {}, options?: IStateOptions): angular.IPromise<any>;
-        includes(state: string, params?: {}): boolean;
-        includes(state: string, params?: {}, options?:any): boolean;
-        is(state:string, params?: {}): boolean;
-        is(state: IState, params?: {}): boolean;
-        href(state: IState, params?: {}, options?: IHrefOptions): string;
-        href(state: string, params?: {}, options?: IHrefOptions): string;
-        get(state: string, context?: string): IState;
-        get(state: IState, context?: string): IState;
-        get(state: string, context?: IState): IState;
-        get(state: IState, context?: IState): IState;
-        get(): IState[];
-        /** A reference to the state's config object. However you passed it in. Useful for accessing custom data. */
-        current: IState;
-        /** A param object, e.g. {sectionId: section.id)}, that you'd like to test against the current active state. */
-        params: IStateParamsService;
-        reload(): angular.IPromise<any>;
-
-        /** Currently pending transition. A promise that'll resolve or reject. */
-        transition: angular.IPromise<{}>;
-
-        $current: IResolvedState;
-    }
-
-    interface IResolvedState {
-        locals: {
-            /**
-             * Currently resolved "resolve" values from the current state
-             */
-            globals: { [key: string]: any; };
-        };
-    }
-
-    interface IStateParamsService {
-        [key: string]: any;
-    }
-
-    interface IUrlRouterService {
-    	/*
-    	 * Triggers an update; the same update that happens when the address bar
-    	 * url changes, aka $locationChangeSuccess.
-    	 *
-    	 * This method is useful when you need to use preventDefault() on the
-    	 * $locationChangeSuccess event, perform some custom logic (route protection,
-    	 * auth, config, redirection, etc) and then finally proceed with the transition
-    	 * by calling $urlRouter.sync().
-    	 *
-    	 */
-        sync(): void;
-        listen(): Function;
-        href(urlMatcher: IUrlMatcher, params?: IStateParamsService, options?: IHrefOptions): string;
-        update(read?: boolean): void;
-        push(urlMatcher: IUrlMatcher, params?: IStateParamsService, options?: IHrefOptions): void;
-    }
-
-    interface IUiViewScrollProvider {
-        /*
-         * Reverts back to using the core $anchorScroll service for scrolling
-         * based on the url anchor.
-         */
-        useAnchorScroll(): void;
-    }
-
-    interface IType {
-        /**
-         * Converts a parameter value (from URL string or transition param) to a custom/native value.
-         *
-         * @param val {string} The URL parameter value to decode.
-         * @param key {string} The name of the parameter in which val is stored. Can be used for meta-programming of Type objects.
-         *
-         * @returns {any} Returns a custom representation of the URL parameter value.
-         */
-        decode(val: string, key: string): any;
-        /**
-         * Encodes a custom/native type value to a string that can be embedded in a URL. Note that the return value does not need to be URL-safe (i.e. passed through encodeURIComponent()), it only needs to be a representation of val that has been coerced to a string.
-         *
-         * @param val {any} The value to encode.
-         * @param key {string} The name of the parameter in which val is stored. Can be used for meta-programming of Type objects.
-         *
-         * @returns {string} Returns a string representation of val that can be encoded in a URL.
-         */
-        encode(val: any, key: string): string;
-        /**
-         * Determines whether two decoded values are equivalent.
-         *
-         * @param a {any} A value to compare against.
-         * @param b {any} A value to compare against.
-         *
-         * @returns {boolean} Returns true if the values are equivalent/equal, otherwise false.
-         */
-        equals? (a: any, b: any): boolean;
-        /**
-         * Detects whether a value is of a particular type. Accepts a native (decoded) value and determines whether it matches the current Type object.
-         *
-         * @param val {any} The value to check.
-         * @param key {any} Optional. If the type check is happening in the context of a specific UrlMatcher object, this is the name of the parameter in which val is stored. Can be used for meta-programming of Type objects.
-         *
-         * @returns {boolean} Returns true if the value matches the type, otherwise false.
-         */
-        is(val: any, key: string): boolean;
-        /**
-         * The regular expression pattern used to match values of this type when coming from a substring of a URL.
-         */
-        pattern?: RegExp;
-    }
-}
diff --git a/typings/globals/angular-ui-router/typings.json b/typings/globals/angular-ui-router/typings.json
deleted file mode 100644
index 13e0275..0000000
--- a/typings/globals/angular-ui-router/typings.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "resolution": "main",
-  "tree": {
-    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/b38cd68fe2dacaea0bb4efd6a3c638ceeae4fb25/angular-ui-router/angular-ui-router.d.ts",
-    "raw": "registry:dt/angular-ui-router#1.1.5+20160707113237",
-    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/b38cd68fe2dacaea0bb4efd6a3c638ceeae4fb25/angular-ui-router/angular-ui-router.d.ts"
-  }
-}
diff --git a/typings/globals/angular/index.d.ts b/typings/globals/angular/index.d.ts
deleted file mode 100644
index edb1d69..0000000
--- a/typings/globals/angular/index.d.ts
+++ /dev/null
@@ -1,1984 +0,0 @@
-// Generated by typings
-// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/5f2450ba8001ed38c83eae3c0db93f0a3309180d/angularjs/angular.d.ts
-declare var angular: angular.IAngularStatic;
-
-// Support for painless dependency injection
-interface Function {
-    $inject?: string[];
-}
-
-// Collapse angular into ng
-import ng = angular;
-// Support AMD require
-declare module 'angular' {
-    export = angular;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// ng module (angular.js)
-///////////////////////////////////////////////////////////////////////////////
-declare namespace angular {
-
-    type Injectable<T extends Function> = T | (string | T)[];
-
-    // not directly implemented, but ensures that constructed class implements $get
-    interface IServiceProviderClass {
-        new (...args: any[]): IServiceProvider;
-    }
-
-    interface IServiceProviderFactory {
-        (...args: any[]): IServiceProvider;
-    }
-
-    // All service providers extend this interface
-    interface IServiceProvider {
-        $get: any;
-    }
-
-    interface IAngularBootstrapConfig {
-        strictDi?: boolean;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // AngularStatic
-    // see http://docs.angularjs.org/api
-    ///////////////////////////////////////////////////////////////////////////
-    interface IAngularStatic {
-        bind(context: any, fn: Function, ...args: any[]): Function;
-
-        /**
-         * Use this function to manually start up angular application.
-         *
-         * @param element DOM element which is the root of angular application.
-         * @param modules An array of modules to load into the application.
-         *     Each item in the array should be the name of a predefined module or a (DI annotated)
-         *     function that will be invoked by the injector as a config block.
-         * @param config an object for defining configuration options for the application. The following keys are supported:
-         *     - `strictDi`: disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code.
-         */
-        bootstrap(element: string|Element|JQuery|Document, modules?: (string|Function|any[])[], config?: IAngularBootstrapConfig): auto.IInjectorService;
-
-        /**
-         * Creates a deep copy of source, which should be an object or an array.
-         *
-         * - If no destination is supplied, a copy of the object or array is created.
-         * - If a destination is provided, all of its elements (for array) or properties (for objects) are deleted and then all elements/properties from the source are copied to it.
-         * - If source is not an object or array (inc. null and undefined), source is returned.
-         * - If source is identical to 'destination' an exception will be thrown.
-         *
-         * @param source The source that will be used to make a copy. Can be any type, including primitives, null, and undefined.
-         * @param destination Destination into which the source is copied. If provided, must be of the same type as source.
-         */
-        copy<T>(source: T, destination?: T): T;
-
-        /**
-         * Wraps a raw DOM element or HTML string as a jQuery element.
-         *
-         * If jQuery is available, angular.element is an alias for the jQuery function. If jQuery is not available, angular.element delegates to Angular's built-in subset of jQuery, called "jQuery lite" or "jqLite."
-         */
-        element: JQueryStatic;
-        equals(value1: any, value2: any): boolean;
-        extend(destination: any, ...sources: any[]): any;
-
-        /**
-         * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional.
-         *
-         * It is worth noting that .forEach does not iterate over inherited properties because it filters using the hasOwnProperty method.
-         *
-         * @param obj Object to iterate over.
-         * @param iterator Iterator function.
-         * @param context Object to become context (this) for the iterator function.
-         */
-        forEach<T>(obj: T[], iterator: (value: T, key: number) => any, context?: any): any;
-        /**
-         * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional.
-         *
-         * It is worth noting that .forEach does not iterate over inherited properties because it filters using the hasOwnProperty method.
-         *
-         * @param obj Object to iterate over.
-         * @param iterator Iterator function.
-         * @param context Object to become context (this) for the iterator function.
-         */
-        forEach<T>(obj: { [index: string]: T; }, iterator: (value: T, key: string) => any, context?: any): any;
-        /**
-         * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional.
-         *
-         * It is worth noting that .forEach does not iterate over inherited properties because it filters using the hasOwnProperty method.
-         *
-         * @param obj Object to iterate over.
-         * @param iterator Iterator function.
-         * @param context Object to become context (this) for the iterator function.
-         */
-        forEach(obj: any, iterator: (value: any, key: any) => any, context?: any): any;
-
-        fromJson(json: string): any;
-        identity<T>(arg?: T): T;
-        injector(modules?: any[], strictDi?: boolean): auto.IInjectorService;
-        isArray(value: any): value is Array<any>;
-        isDate(value: any): value is Date;
-        isDefined(value: any): boolean;
-        isElement(value: any): boolean;
-        isFunction(value: any): value is Function;
-        isNumber(value: any): value is number;
-        isObject(value: any): value is Object;
-        isObject<T>(value: any): value is T;
-        isString(value: any): value is string;
-        isUndefined(value: any): boolean;
-        lowercase(str: string): string;
-
-        /**
-         * Deeply extends the destination object dst by copying own enumerable properties from the src object(s) to dst. You can specify multiple src objects. If you want to preserve original objects, you can do so by passing an empty object as the target: var object = angular.merge({}, object1, object2).
-         *
-         * Unlike extend(), merge() recursively descends into object properties of source objects, performing a deep copy.
-         *
-         * @param dst Destination object.
-         * @param src Source object(s).
-         */
-        merge(dst: any, ...src: any[]): any;
-
-        /**
-         * The angular.module is a global place for creating, registering and retrieving Angular modules. All modules (angular core or 3rd party) that should be available to an application must be registered using this mechanism.
-         *
-         * When passed two or more arguments, a new module is created. If passed only one argument, an existing module (the name passed as the first argument to module) is retrieved.
-         *
-         * @param name The name of the module to create or retrieve.
-         * @param requires The names of modules this module depends on. If specified then new module is being created. If unspecified then the module is being retrieved for further configuration.
-         * @param configFn Optional configuration function for the module.
-         */
-        module(
-            name: string,
-            requires?: string[],
-            configFn?: Function): IModule;
-
-        noop(...args: any[]): void;
-        reloadWithDebugInfo(): void;
-        toJson(obj: any, pretty?: boolean | number): string;
-        uppercase(str: string): string;
-        version: {
-            full: string;
-            major: number;
-            minor: number;
-            dot: number;
-            codeName: string;
-        };
-
-        /**
-         * If window.name contains prefix NG_DEFER_BOOTSTRAP! when angular.bootstrap is called, the bootstrap process will be paused until angular.resumeBootstrap() is called.
-         * @param extraModules An optional array of modules that should be added to the original list of modules that the app was about to be bootstrapped with.
-         */
-        resumeBootstrap?(extraModules?: string[]): ng.auto.IInjectorService;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // Module
-    // see http://docs.angularjs.org/api/angular.Module
-    ///////////////////////////////////////////////////////////////////////////
-    interface IModule {
-        /**
-         * Use this method to register a component.
-         *
-         * @param name The name of the component.
-         * @param options A definition object passed into the component.
-         */
-        component(name: string, options: IComponentOptions): IModule;
-        /**
-         * Use this method to register work which needs to be performed on module loading.
-         *
-         * @param configFn Execute this function on module load. Useful for service configuration.
-         */
-        config(configFn: Function): IModule;
-        /**
-         * Use this method to register work which needs to be performed on module loading.
-         *
-         * @param inlineAnnotatedFunction Execute this function on module load. Useful for service configuration.
-         */
-        config(inlineAnnotatedFunction: any[]): IModule;
-        config(object: Object): IModule;
-        /**
-         * Register a constant service, such as a string, a number, an array, an object or a function, with the $injector. Unlike value it can be injected into a module configuration function (see config) and it cannot be overridden by an Angular decorator.
-         *
-         * @param name The name of the constant.
-         * @param value The constant value.
-         */
-        constant<T>(name: string, value: T): IModule;
-        constant(object: Object): IModule;
-        /**
-         * The $controller service is used by Angular to create new controllers.
-         *
-         * This provider allows controller registration via the register method.
-         *
-         * @param name Controller name, or an object map of controllers where the keys are the names and the values are the constructors.
-         * @param controllerConstructor Controller constructor fn (optionally decorated with DI annotations in the array notation).
-         */
-        controller(name: string, controllerConstructor: Injectable<IControllerConstructor>): IModule;
-        controller(object: {[name: string]: Injectable<IControllerConstructor>}): IModule;
-        /**
-         * Register a new directive with the compiler.
-         *
-         * @param name Name of the directive in camel-case (i.e. ngBind which will match as ng-bind)
-         * @param directiveFactory An injectable directive factory function.
-         */
-        directive(name: string, directiveFactory: Injectable<IDirectiveFactory>): IModule;
-        directive(object: {[directiveName: string]: Injectable<IDirectiveFactory>}): IModule;
-        /**
-         * Register a service factory, which will be called to return the service instance. This is short for registering a service where its provider consists of only a $get property, which is the given service factory function. You should use $provide.factory(getFn) if you do not need to configure your service in a provider.
-         *
-         * @param name The name of the instance.
-         * @param $getFn The $getFn for the instance creation. Internally this is a short hand for $provide.provider(name, {$get: $getFn}).
-         */
-        factory(name: string, $getFn: Injectable<Function>): IModule;
-        factory(object: {[name: string]: Injectable<Function>}): IModule;
-        filter(name: string, filterFactoryFunction: Injectable<Function>): IModule;
-        filter(object: {[name: string]: Injectable<Function>}): IModule;
-        provider(name: string, serviceProviderFactory: IServiceProviderFactory): IModule;
-        provider(name: string, serviceProviderConstructor: IServiceProviderClass): IModule;
-        provider(name: string, inlineAnnotatedConstructor: any[]): IModule;
-        provider(name: string, providerObject: IServiceProvider): IModule;
-        provider(object: Object): IModule;
-        /**
-         * Run blocks are the closest thing in Angular to the main method. A run block is the code which needs to run to kickstart the application. It is executed after all of the service have been configured and the injector has been created. Run blocks typically contain code which is hard to unit-test, and for this reason should be declared in isolated modules, so that they can be ignored in the unit-tests.
-         */
-        run(initializationFunction: Injectable<Function>): IModule;
-        /**
-         * Register a service constructor, which will be invoked with new to create the service instance. This is short for registering a service where its provider's $get property is a factory function that returns an instance instantiated by the injector from the service constructor function.
-         *
-         * @param name The name of the instance.
-         * @param serviceConstructor An injectable class (constructor function) that will be instantiated.
-         */
-        service(name: string, serviceConstructor: Injectable<Function>): IModule;
-        service(object: {[name: string]: Injectable<Function>}): IModule;
-        /**
-         * Register a value service with the $injector, such as a string, a number, an array, an object or a function. This is short for registering a service where its provider's $get property is a factory function that takes no arguments and returns the value service.
-
-           Value services are similar to constant services, except that they cannot be injected into a module configuration function (see config) but they can be overridden by an Angular decorator.
-         *
-         * @param name The name of the instance.
-         * @param value The value.
-         */
-        value<T>(name: string, value: T): IModule;
-        value(object: Object): IModule;
-
-        /**
-         * Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behaviour of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service.
-         * @param name The name of the service to decorate
-         * @param decorator This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments: $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.
-         */
-        decorator(name: string, decorator: Injectable<Function>): IModule;
-
-        // Properties
-        name: string;
-        requires: string[];
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // Attributes
-    // see http://docs.angularjs.org/api/ng.$compile.directive.Attributes
-    ///////////////////////////////////////////////////////////////////////////
-    interface IAttributes {
-        /**
-         * this is necessary to be able to access the scoped attributes. it's not very elegant
-         * because you have to use attrs['foo'] instead of attrs.foo but I don't know of a better way
-         * this should really be limited to return string but it creates this problem: http://stackoverflow.com/q/17201854/165656
-         */
-        [name: string]: any;
-
-        /**
-         * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with x- or data-) to its normalized, camelCase form.
-         *
-         * Also there is special case for Moz prefix starting with upper case letter.
-         *
-         * For further information check out the guide on @see https://docs.angularjs.org/guide/directive#matching-directives
-         */
-        $normalize(name: string): string;
-
-        /**
-         * Adds the CSS class value specified by the classVal parameter to the
-         * element. If animations are enabled then an animation will be triggered
-         * for the class addition.
-         */
-        $addClass(classVal: string): void;
-
-        /**
-         * Removes the CSS class value specified by the classVal parameter from the
-         * element. If animations are enabled then an animation will be triggered for
-         * the class removal.
-         */
-        $removeClass(classVal: string): void;
-
-        /**
-         * Adds and removes the appropriate CSS class values to the element based on the difference between
-         * the new and old CSS class values (specified as newClasses and oldClasses).
-         */
-        $updateClass(newClasses: string, oldClasses: string): void;
-
-        /**
-         * Set DOM element attribute value.
-         */
-        $set(key: string, value: any): void;
-
-        /**
-         * Observes an interpolated attribute.
-         * The observer function will be invoked once during the next $digest
-         * following compilation. The observer is then invoked whenever the
-         * interpolated value changes.
-         */
-        $observe<T>(name: string, fn: (value?: T) => any): Function;
-
-        /**
-         * A map of DOM element attribute names to the normalized name. This is needed
-         * to do reverse lookup from normalized name back to actual name.
-         */
-        $attr: Object;
-    }
-
-    /**
-     * form.FormController - type in module ng
-     * see https://docs.angularjs.org/api/ng/type/form.FormController
-     */
-    interface IFormController {
-
-        /**
-         * Indexer which should return ng.INgModelController for most properties but cannot because of "All named properties must be assignable to string indexer type" constraint - see https://github.com/Microsoft/TypeScript/issues/272
-         */
-        [name: string]: any;
-
-        $pristine: boolean;
-        $dirty: boolean;
-        $valid: boolean;
-        $invalid: boolean;
-        $submitted: boolean;
-        $error: any;
-        $name: string;
-        $pending: any;
-        $addControl(control: INgModelController | IFormController): void;
-        $removeControl(control: INgModelController | IFormController): void;
-        $setValidity(validationErrorKey: string, isValid: boolean, control: INgModelController | IFormController): void;
-        $setDirty(): void;
-        $setPristine(): void;
-        $commitViewValue(): void;
-        $rollbackViewValue(): void;
-        $setSubmitted(): void;
-        $setUntouched(): void;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // NgModelController
-    // see http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController
-    ///////////////////////////////////////////////////////////////////////////
-    interface INgModelController {
-        $render(): void;
-        $setValidity(validationErrorKey: string, isValid: boolean): void;
-        // Documentation states viewValue and modelValue to be a string but other
-        // types do work and it's common to use them.
-        $setViewValue(value: any, trigger?: string): void;
-        $setPristine(): void;
-        $setDirty(): void;
-        $validate(): void;
-        $setTouched(): void;
-        $setUntouched(): void;
-        $rollbackViewValue(): void;
-        $commitViewValue(): void;
-        $isEmpty(value: any): boolean;
-
-        $viewValue: any;
-
-        $modelValue: any;
-
-        $parsers: IModelParser[];
-        $formatters: IModelFormatter[];
-        $viewChangeListeners: IModelViewChangeListener[];
-        $error: any;
-        $name: string;
-
-        $touched: boolean;
-        $untouched: boolean;
-
-        $validators: IModelValidators;
-        $asyncValidators: IAsyncModelValidators;
-
-        $pending: any;
-        $pristine: boolean;
-        $dirty: boolean;
-        $valid: boolean;
-        $invalid: boolean;
-    }
-
-    //Allows tuning how model updates are done.
-    //https://docs.angularjs.org/api/ng/directive/ngModelOptions
-    interface INgModelOptions {
-        updateOn?: string;
-        debounce?: any;
-        allowInvalid?: boolean;
-        getterSetter?: boolean;
-        timezone?: string;
-    }
-
-    interface IModelValidators {
-        /**
-         * viewValue is any because it can be an object that is called in the view like $viewValue.name:$viewValue.subName
-         */
-        [index: string]: (modelValue: any, viewValue: any) => boolean;
-    }
-
-    interface IAsyncModelValidators {
-        [index: string]: (modelValue: any, viewValue: any) => IPromise<any>;
-    }
-
-    interface IModelParser {
-        (value: any): any;
-    }
-
-    interface IModelFormatter {
-        (value: any): any;
-    }
-
-    interface IModelViewChangeListener {
-        (): void;
-    }
-
-    /**
-     * $rootScope - $rootScopeProvider - service in module ng
-     * see https://docs.angularjs.org/api/ng/type/$rootScope.Scope and https://docs.angularjs.org/api/ng/service/$rootScope
-     */
-    interface IRootScopeService {
-        [index: string]: any;
-
-        $apply(): any;
-        $apply(exp: string): any;
-        $apply(exp: (scope: IScope) => any): any;
-
-        $applyAsync(): any;
-        $applyAsync(exp: string): any;
-        $applyAsync(exp: (scope: IScope) => any): any;
-
-        /**
-         * Dispatches an event name downwards to all child scopes (and their children) notifying the registered $rootScope.Scope listeners.
-         *
-         * The event life cycle starts at the scope on which $broadcast was called. All listeners listening for name event on this scope get notified. Afterwards, the event propagates to all direct and indirect scopes of the current scope and calls all registered listeners along the way. The event cannot be canceled.
-         *
-         * Any exception emitted from the listeners will be passed onto the $exceptionHandler service.
-         *
-         * @param name Event name to broadcast.
-         * @param args Optional one or more arguments which will be passed onto the event listeners.
-         */
-        $broadcast(name: string, ...args: any[]): IAngularEvent;
-        $destroy(): void;
-        $digest(): void;
-        /**
-         * Dispatches an event name upwards through the scope hierarchy notifying the registered $rootScope.Scope listeners.
-         *
-         * The event life cycle starts at the scope on which $emit was called. All listeners listening for name event on this scope get notified. Afterwards, the event traverses upwards toward the root scope and calls all registered listeners along the way. The event will stop propagating if one of the listeners cancels it.
-         *
-         * Any exception emitted from the listeners will be passed onto the $exceptionHandler service.
-         *
-         * @param name Event name to emit.
-         * @param args Optional one or more arguments which will be passed onto the event listeners.
-         */
-        $emit(name: string, ...args: any[]): IAngularEvent;
-
-        $eval(): any;
-        $eval(expression: string, locals?: Object): any;
-        $eval(expression: (scope: IScope) => any, locals?: Object): any;
-
-        $evalAsync(): void;
-        $evalAsync(expression: string): void;
-        $evalAsync(expression: (scope: IScope) => any): void;
-
-        // Defaults to false by the implementation checking strategy
-        $new(isolate?: boolean, parent?: IScope): IScope;
-
-        /**
-         * Listens on events of a given type. See $emit for discussion of event life cycle.
-         *
-         * The event listener function format is: function(event, args...).
-         *
-         * @param name Event name to listen on.
-         * @param listener Function to call when the event is emitted.
-         */
-        $on(name: string, listener: (event: IAngularEvent, ...args: any[]) => any): () => void;
-
-        $watch(watchExpression: string, listener?: string, objectEquality?: boolean): () => void;
-        $watch<T>(watchExpression: string, listener?: (newValue: T, oldValue: T, scope: IScope) => any, objectEquality?: boolean): () => void;
-        $watch(watchExpression: (scope: IScope) => any, listener?: string, objectEquality?: boolean): () => void;
-        $watch<T>(watchExpression: (scope: IScope) => T, listener?: (newValue: T, oldValue: T, scope: IScope) => any, objectEquality?: boolean): () => void;
-
-        $watchCollection<T>(watchExpression: string, listener: (newValue: T, oldValue: T, scope: IScope) => any): () => void;
-        $watchCollection<T>(watchExpression: (scope: IScope) => T, listener: (newValue: T, oldValue: T, scope: IScope) => any): () => void;
-
-        $watchGroup(watchExpressions: any[], listener: (newValue: any, oldValue: any, scope: IScope) => any): () => void;
-        $watchGroup(watchExpressions: { (scope: IScope): any }[], listener: (newValue: any, oldValue: any, scope: IScope) => any): () => void;
-
-        $parent: IScope;
-        $root: IRootScopeService;
-        $id: number;
-
-        // Hidden members
-        $$isolateBindings: any;
-        $$phase: any;
-    }
-
-    interface IScope extends IRootScopeService { }
-
-    /**
-     * $scope for ngRepeat directive.
-     * see https://docs.angularjs.org/api/ng/directive/ngRepeat
-     */
-    interface IRepeatScope extends IScope {
-
-        /**
-         * iterator offset of the repeated element (0..length-1).
-         */
-        $index: number;
-
-        /**
-         * true if the repeated element is first in the iterator.
-         */
-        $first: boolean;
-
-        /**
-         * true if the repeated element is between the first and last in the iterator.
-         */
-        $middle: boolean;
-
-        /**
-         * true if the repeated element is last in the iterator.
-         */
-        $last: boolean;
-
-        /**
-         * true if the iterator position $index is even (otherwise false).
-         */
-        $even: boolean;
-
-        /**
-         * true if the iterator position $index is odd (otherwise false).
-         */
-        $odd: boolean;
-
-    }
-
-    interface IAngularEvent {
-        /**
-         * the scope on which the event was $emit-ed or $broadcast-ed.
-         */
-        targetScope: IScope;
-        /**
-         * the scope that is currently handling the event. Once the event propagates through the scope hierarchy, this property is set to null.
-         */
-        currentScope: IScope;
-        /**
-         * name of the event.
-         */
-        name: string;
-        /**
-         * calling stopPropagation function will cancel further event propagation (available only for events that were $emit-ed).
-         */
-        stopPropagation?(): void;
-        /**
-         * calling preventDefault sets defaultPrevented flag to true.
-         */
-        preventDefault(): void;
-        /**
-         * true if preventDefault was called.
-         */
-        defaultPrevented: boolean;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // WindowService
-    // see http://docs.angularjs.org/api/ng.$window
-    ///////////////////////////////////////////////////////////////////////////
-    interface IWindowService extends Window {
-        [key: string]: any;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // TimeoutService
-    // see http://docs.angularjs.org/api/ng.$timeout
-    ///////////////////////////////////////////////////////////////////////////
-    interface ITimeoutService {
-        (delay?: number, invokeApply?: boolean): IPromise<void>;
-        <T>(fn: (...args: any[]) => T, delay?: number, invokeApply?: boolean, ...args: any[]): IPromise<T>;
-        cancel(promise?: IPromise<any>): boolean;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // IntervalService
-    // see http://docs.angularjs.org/api/ng.$interval
-    ///////////////////////////////////////////////////////////////////////////
-    interface IIntervalService {
-        (func: Function, delay: number, count?: number, invokeApply?: boolean, ...args: any[]): IPromise<any>;
-        cancel(promise: IPromise<any>): boolean;
-    }
-
-    /**
-     * $filter - $filterProvider - service in module ng
-     *
-     * Filters are used for formatting data displayed to the user.
-     *
-     * see https://docs.angularjs.org/api/ng/service/$filter
-     */
-    interface IFilterService {
-        (name: 'filter'): IFilterFilter;
-        (name: 'currency'): IFilterCurrency;
-        (name: 'number'): IFilterNumber;
-        (name: 'date'): IFilterDate;
-        (name: 'json'): IFilterJson;
-        (name: 'lowercase'): IFilterLowercase;
-        (name: 'uppercase'): IFilterUppercase;
-        (name: 'limitTo'): IFilterLimitTo;
-        (name: 'orderBy'): IFilterOrderBy;
-        /**
-         * Usage:
-         * $filter(name);
-         *
-         * @param name Name of the filter function to retrieve
-         */
-        <T>(name: string): T;
-    }
-
-    interface IFilterFilter {
-        <T>(array: T[], expression: string | IFilterFilterPatternObject | IFilterFilterPredicateFunc<T>, comparator?: IFilterFilterComparatorFunc<T>|boolean): T[];
-    }
-
-    interface IFilterFilterPatternObject {
-        [name: string]: any;
-    }
-
-    interface IFilterFilterPredicateFunc<T> {
-        (value: T, index: number, array: T[]): boolean;
-    }
-
-    interface IFilterFilterComparatorFunc<T> {
-        (actual: T, expected: T): boolean;
-    }
-
-    interface IFilterCurrency {
-        /**
-         * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default symbol for current locale is used.
-         * @param amount Input to filter.
-         * @param symbol Currency symbol or identifier to be displayed.
-         * @param fractionSize Number of decimal places to round the amount to, defaults to default max fraction size for current locale
-         * @return Formatted number
-         */
-        (amount: number, symbol?: string, fractionSize?: number): string;
-    }
-
-    interface IFilterNumber {
-        /**
-         * Formats a number as text.
-         * @param number Number to format.
-         * @param fractionSize Number of decimal places to round the number to. If this is not provided then the fraction size is computed from the current locale's number formatting pattern. In the case of the default locale, it will be 3.
-         * @return Number rounded to decimalPlaces and places a “,” after each third digit.
-         */
-        (value: number|string, fractionSize?: number|string): string;
-    }
-
-    interface IFilterDate {
-        /**
-         * Formats date to a string based on the requested format.
-         *
-         * @param date Date to format either as Date object, milliseconds (string or number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is specified in the string input, the time is considered to be in the local timezone.
-         * @param format Formatting rules (see Description). If not specified, mediumDate is used.
-         * @param timezone Timezone to be used for formatting. It understands UTC/GMT and the continental US time zone abbreviations, but for general use, use a time zone offset, for example, '+0430' (4 hours, 30 minutes east of the Greenwich meridian) If not specified, the timezone of the browser will be used.
-         * @return Formatted string or the input if input is not recognized as date/millis.
-         */
-        (date: Date | number | string, format?: string, timezone?: string): string;
-    }
-
-    interface IFilterJson {
-        /**
-         * Allows you to convert a JavaScript object into JSON string.
-         * @param object Any JavaScript object (including arrays and primitive types) to filter.
-         * @param spacing The number of spaces to use per indentation, defaults to 2.
-         * @return JSON string.
-         */
-        (object: any, spacing?: number): string;
-    }
-
-    interface IFilterLowercase {
-        /**
-         * Converts string to lowercase.
-         */
-        (value: string): string;
-    }
-
-    interface IFilterUppercase {
-        /**
-         * Converts string to uppercase.
-         */
-        (value: string): string;
-    }
-
-    interface IFilterLimitTo {
-        /**
-         * Creates a new array containing only a specified number of elements. The elements are taken from either the beginning or the end of the source array, string or number, as specified by the value and sign (positive or negative) of limit.
-         * @param input Source array to be limited.
-         * @param limit The length of the returned array. If the limit number is positive, limit number of items from the beginning of the source array/string are copied. If the number is negative, limit number of items from the end of the source array are copied. The limit will be trimmed if it exceeds array.length. If limit is undefined, the input will be returned unchanged.
-         * @param begin Index at which to begin limitation. As a negative index, begin indicates an offset from the end of input. Defaults to 0.
-         * @return A new sub-array of length limit or less if input array had less than limit elements.
-         */
-        <T>(input: T[], limit: string|number, begin?: string|number): T[];
-        /**
-         * Creates a new string containing only a specified number of elements. The elements are taken from either the beginning or the end of the source string or number, as specified by the value and sign (positive or negative) of limit. If a number is used as input, it is converted to a string.
-         * @param input Source string or number to be limited.
-         * @param limit The length of the returned string. If the limit number is positive, limit number of items from the beginning of the source string are copied. If the number is negative, limit number of items from the end of the source string are copied. The limit will be trimmed if it exceeds input.length. If limit is undefined, the input will be returned unchanged.
-         * @param begin Index at which to begin limitation. As a negative index, begin indicates an offset from the end of input. Defaults to 0.
-         * @return A new substring of length limit or less if input had less than limit elements.
-         */
-        (input: string|number, limit: string|number, begin?: string|number): string;
-    }
-
-    interface IFilterOrderBy {
-        /**
-         * Orders a specified array by the expression predicate. It is ordered alphabetically for strings and numerically for numbers. Note: if you notice numbers are not being sorted as expected, make sure they are actually being saved as numbers and not strings.
-         * @param array The array to sort.
-         * @param expression A predicate to be used by the comparator to determine the order of elements.
-         * @param reverse Reverse the order of the array.
-         * @return Reverse the order of the array.
-         */
-        <T>(array: T[], expression: string|((value: T) => any)|(((value: T) => any)|string)[], reverse?: boolean): T[];
-    }
-
-    /**
-     * $filterProvider - $filter - provider in module ng
-     *
-     * Filters are just functions which transform input to an output. However filters need to be Dependency Injected. To achieve this a filter definition consists of a factory function which is annotated with dependencies and is responsible for creating a filter function.
-     *
-     * see https://docs.angularjs.org/api/ng/provider/$filterProvider
-     */
-    interface IFilterProvider extends IServiceProvider {
-        /**
-         * register(name);
-         *
-         * @param name Name of the filter function, or an object map of filters where the keys are the filter names and the values are the filter factories. Note: Filter names must be valid angular Expressions identifiers, such as uppercase or orderBy. Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace your filters, then you can use capitalization (myappSubsectionFilterx) or underscores (myapp_subsection_filterx).
-         */
-        register(name: string | {}): IServiceProvider;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // LocaleService
-    // see http://docs.angularjs.org/api/ng.$locale
-    ///////////////////////////////////////////////////////////////////////////
-    interface ILocaleService {
-        id: string;
-
-        // These are not documented
-        // Check angular's i18n files for exemples
-        NUMBER_FORMATS: ILocaleNumberFormatDescriptor;
-        DATETIME_FORMATS: ILocaleDateTimeFormatDescriptor;
-        pluralCat: (num: any) => string;
-    }
-
-    interface ILocaleNumberFormatDescriptor {
-        DECIMAL_SEP: string;
-        GROUP_SEP: string;
-        PATTERNS: ILocaleNumberPatternDescriptor[];
-        CURRENCY_SYM: string;
-    }
-
-    interface ILocaleNumberPatternDescriptor {
-        minInt: number;
-        minFrac: number;
-        maxFrac: number;
-        posPre: string;
-        posSuf: string;
-        negPre: string;
-        negSuf: string;
-        gSize: number;
-        lgSize: number;
-    }
-
-    interface ILocaleDateTimeFormatDescriptor {
-        MONTH: string[];
-        SHORTMONTH: string[];
-        DAY: string[];
-        SHORTDAY: string[];
-        AMPMS: string[];
-        medium: string;
-        short: string;
-        fullDate: string;
-        longDate: string;
-        mediumDate: string;
-        shortDate: string;
-        mediumTime: string;
-        shortTime: string;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // LogService
-    // see http://docs.angularjs.org/api/ng.$log
-    // see http://docs.angularjs.org/api/ng.$logProvider
-    ///////////////////////////////////////////////////////////////////////////
-    interface ILogService {
-        debug: ILogCall;
-        error: ILogCall;
-        info: ILogCall;
-        log: ILogCall;
-        warn: ILogCall;
-    }
-
-    interface ILogProvider extends IServiceProvider {
-        debugEnabled(): boolean;
-        debugEnabled(enabled: boolean): ILogProvider;
-    }
-
-    // We define this as separate interface so we can reopen it later for
-    // the ngMock module.
-    interface ILogCall {
-        (...args: any[]): void;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // ParseService
-    // see http://docs.angularjs.org/api/ng.$parse
-    // see http://docs.angularjs.org/api/ng.$parseProvider
-    ///////////////////////////////////////////////////////////////////////////
-    interface IParseService {
-        (expression: string, interceptorFn?: (value: any, scope: IScope, locals: any) => any, expensiveChecks?: boolean): ICompiledExpression;
-    }
-
-    interface IParseProvider {
-        logPromiseWarnings(): boolean;
-        logPromiseWarnings(value: boolean): IParseProvider;
-
-        unwrapPromises(): boolean;
-        unwrapPromises(value: boolean): IParseProvider;
-
-        /**
-         * Configure $parse service to add literal values that will be present as literal at expressions.
-         *
-         * @param literalName Token for the literal value. The literal name value must be a valid literal name.
-         * @param literalValue Value for this literal. All literal values must be primitives or `undefined`.
-         **/
-        addLiteral(literalName: string, literalValue: any): void;
-
-        /**
-         * Allows defining the set of characters that are allowed in Angular expressions. The function identifierStart will get called to know if a given character is a valid character to be the first character for an identifier. The function identifierContinue will get called to know if a given character is a valid character to be a follow-up identifier character. The functions identifierStart and identifierContinue will receive as arguments the single character to be identifier and the character code point. These arguments will be string and numeric. Keep in mind that the string parameter can be two characters long depending on the character representation. It is expected for the function to return true or false, whether that character is allowed or not.
-         * Since this function will be called extensivelly, keep the implementation of these functions fast, as the performance of these functions have a direct impact on the expressions parsing speed.
-         *
-         * @param identifierStart The function that will decide whether the given character is a valid identifier start character.
-         * @param identifierContinue The function that will decide whether the given character is a valid identifier continue character.
-         **/
-        setIdentifierFns(identifierStart?: (character: string, codePoint: number) => boolean,
-            identifierContinue?: (character: string, codePoint: number) => boolean): void;
-    }
-
-    interface ICompiledExpression {
-        (context: any, locals?: any): any;
-
-        literal: boolean;
-        constant: boolean;
-
-        // If value is not provided, undefined is gonna be used since the implementation
-        // does not check the parameter. Let's force a value for consistency. If consumer
-        // whants to undefine it, pass the undefined value explicitly.
-        assign(context: any, value: any): any;
-    }
-
-    /**
-     * $location - $locationProvider - service in module ng
-     * see https://docs.angularjs.org/api/ng/service/$location
-     */
-    interface ILocationService {
-        absUrl(): string;
-        hash(): string;
-        hash(newHash: string): ILocationService;
-        host(): string;
-
-        /**
-         * Return path of current url
-         */
-        path(): string;
-
-        /**
-         * Change path when called with parameter and return $location.
-         * Note: Path should always begin with forward slash (/), this method will add the forward slash if it is missing.
-         *
-         * @param path New path
-         */
-        path(path: string): ILocationService;
-
-        port(): number;
-        protocol(): string;
-        replace(): ILocationService;
-
-        /**
-         * Return search part (as object) of current url
-         */
-        search(): any;
-
-        /**
-         * Change search part when called with parameter and return $location.
-         *
-         * @param search When called with a single argument the method acts as a setter, setting the search component of $location to the specified value.
-         *
-         * If the argument is a hash object containing an array of values, these values will be encoded as duplicate search parameters in the url.
-         */
-        search(search: any): ILocationService;
-
-        /**
-         * Change search part when called with parameter and return $location.
-         *
-         * @param search New search params
-         * @param paramValue If search is a string or a Number, then paramValue will override only a single search property. If paramValue is null, the property specified via the first argument will be deleted. If paramValue is an array, it will override the property of the search component of $location specified via the first argument. If paramValue is true, the property specified via the first argument will be added with no value nor trailing equal sign.
-         */
-        search(search: string, paramValue: string|number|string[]|boolean): ILocationService;
-
-        state(): any;
-        state(state: any): ILocationService;
-        url(): string;
-        url(url: string): ILocationService;
-    }
-
-    interface ILocationProvider extends IServiceProvider {
-        hashPrefix(): string;
-        hashPrefix(prefix: string): ILocationProvider;
-        html5Mode(): boolean;
-
-        // Documentation states that parameter is string, but
-        // implementation tests it as boolean, which makes more sense
-        // since this is a toggler
-        html5Mode(active: boolean): ILocationProvider;
-        html5Mode(mode: { enabled?: boolean; requireBase?: boolean; rewriteLinks?: boolean; }): ILocationProvider;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // DocumentService
-    // see http://docs.angularjs.org/api/ng.$document
-    ///////////////////////////////////////////////////////////////////////////
-    interface IDocumentService extends JQuery {
-        // Must return intersection type for index signature compatibility with JQuery
-        [index: number]: HTMLElement & Document;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // ExceptionHandlerService
-    // see http://docs.angularjs.org/api/ng.$exceptionHandler
-    ///////////////////////////////////////////////////////////////////////////
-    interface IExceptionHandlerService {
-        (exception: Error, cause?: string): void;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // RootElementService
-    // see http://docs.angularjs.org/api/ng.$rootElement
-    ///////////////////////////////////////////////////////////////////////////
-    interface IRootElementService extends JQuery {}
-
-    interface IQResolveReject<T> {
-        (): void;
-        (value: T): void;
-    }
-    /**
-     * $q - service in module ng
-     * A promise/deferred implementation inspired by Kris Kowal's Q.
-     * See http://docs.angularjs.org/api/ng/service/$q
-     */
-    interface IQService {
-        new <T>(resolver: (resolve: IQResolveReject<T>) => any): IPromise<T>;
-        new <T>(resolver: (resolve: IQResolveReject<T>, reject: IQResolveReject<any>) => any): IPromise<T>;
-        <T>(resolver: (resolve: IQResolveReject<T>) => any): IPromise<T>;
-        <T>(resolver: (resolve: IQResolveReject<T>, reject: IQResolveReject<any>) => any): IPromise<T>;
-
-        /**
-         * Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
-         *
-         * Returns a single promise that will be resolved with an array of values, each value corresponding to the promise at the same index in the promises array. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
-         *
-         * @param promises An array of promises.
-         */
-        all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise <T4>, T5 | IPromise<T5>, T6 | IPromise<T6>, T7 | IPromise<T7>, T8 | IPromise<T8>, T9 | IPromise<T9>, T10 | IPromise<T10>]): IPromise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
-        all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise <T4>, T5 | IPromise<T5>, T6 | IPromise<T6>, T7 | IPromise<T7>, T8 | IPromise<T8>, T9 | IPromise<T9>]): IPromise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
-        all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise <T4>, T5 | IPromise<T5>, T6 | IPromise<T6>, T7 | IPromise<T7>, T8 | IPromise<T8>]): IPromise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
-        all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise <T4>, T5 | IPromise<T5>, T6 | IPromise<T6>, T7 | IPromise<T7>]): IPromise<[T1, T2, T3, T4, T5, T6, T7]>;
-        all<T1, T2, T3, T4, T5, T6>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise <T4>, T5 | IPromise<T5>, T6 | IPromise<T6>]): IPromise<[T1, T2, T3, T4, T5, T6]>;
-        all<T1, T2, T3, T4, T5>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise <T4>, T5 | IPromise<T5>]): IPromise<[T1, T2, T3, T4, T5]>;
-        all<T1, T2, T3, T4>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>, T4 | IPromise <T4>]): IPromise<[T1, T2, T3, T4]>;
-        all<T1, T2, T3>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>]): IPromise<[T1, T2, T3]>;
-        all<T1, T2>(values: [T1 | IPromise<T1>, T2 | IPromise<T2>]): IPromise<[T1, T2]>;
-        all<TAll>(promises: IPromise<TAll>[]): IPromise<TAll[]>;
-        /**
-         * Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
-         *
-         * Returns a single promise that will be resolved with a hash of values, each value corresponding to the promise at the same key in the promises hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
-         *
-         * @param promises A hash of promises.
-         */
-        all(promises: { [id: string]: IPromise<any>; }): IPromise<{ [id: string]: any; }>;
-        all<T extends {}>(promises: { [id: string]: IPromise<any>; }): IPromise<T>;
-        /**
-         * Creates a Deferred object which represents a task which will finish in the future.
-         */
-        defer<T>(): IDeferred<T>;
-        /**
-         * Creates a promise that is resolved as rejected with the specified reason. This api should be used to forward rejection in a chain of promises. If you are dealing with the last promise in a promise chain, you don't need to worry about it.
-         *
-         * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of reject as the throw keyword in JavaScript. This also means that if you "catch" an error via a promise error callback and you want to forward the error to the promise derived from the current promise, you have to "rethrow" the error by returning a rejection constructed via reject.
-         *
-         * @param reason Constant, message, exception or an object representing the rejection reason.
-         */
-        reject(reason?: any): IPromise<any>;
-        /**
-         * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
-         *
-         * @param value Value or a promise
-         */
-        resolve<T>(value: IPromise<T>|T): IPromise<T>;
-        /**
-         * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
-         */
-        resolve(): IPromise<void>;
-        /**
-         * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
-         *
-         * @param value Value or a promise
-         */
-        when<T>(value: IPromise<T>|T): IPromise<T>;
-        when<TResult, T>(value: IPromise<T>|T, successCallback: (promiseValue: T) => IPromise<TResult>|TResult, errorCallback?: (reason: any) => any, notifyCallback?: (state: any) => any): IPromise<TResult>;
-        /**
-         * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
-         */
-        when(): IPromise<void>;
-    }
-
-    interface IPromise<T> {
-        /**
-         * Regardless of when the promise was or will be resolved or rejected, then calls one of the success or error callbacks asynchronously as soon as the result is available. The callbacks are called with a single argument: the result or rejection reason. Additionally, the notify callback may be called zero or more times to provide a progress indication, before the promise is resolved or rejected.
-         * The successCallBack may return IPromise<void> for when a $q.reject() needs to be returned
-         * This method returns a new promise which is resolved or rejected via the return value of the successCallback, errorCallback. It also notifies via the return value of the notifyCallback method. The promise can not be resolved or rejected from the notifyCallback method.
-         */
-        then<TResult>(successCallback: (promiseValue: T) => IPromise<TResult>|TResult, errorCallback?: (reason: any) => any, notifyCallback?: (state: any) => any): IPromise<TResult>;
-
-        /**
-         * Shorthand for promise.then(null, errorCallback)
-         */
-        catch<TResult>(onRejected: (reason: any) => IPromise<TResult>|TResult): IPromise<TResult>;
-
-        /**
-         * Allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful to release resources or do some clean-up that needs to be done whether the promise was rejected or resolved. See the full specification for more information.
-         *
-         * Because finally is a reserved word in JavaScript and reserved keywords are not supported as property names by ES3, you'll need to invoke the method like promise['finally'](callback) to make your code IE8 and Android 2.x compatible.
-         */
-        finally(finallyCallback: () => any): IPromise<T>;
-    }
-
-    interface IDeferred<T> {
-        resolve(value?: T|IPromise<T>): void;
-        reject(reason?: any): void;
-        notify(state?: any): void;
-        promise: IPromise<T>;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // AnchorScrollService
-    // see http://docs.angularjs.org/api/ng.$anchorScroll
-    ///////////////////////////////////////////////////////////////////////////
-    interface IAnchorScrollService {
-        (): void;
-        (hash: string): void;
-        yOffset: any;
-    }
-
-    interface IAnchorScrollProvider extends IServiceProvider {
-        disableAutoScrolling(): void;
-    }
-
-    /**
-     * $cacheFactory - service in module ng
-     *
-     * Factory that constructs Cache objects and gives access to them.
-     *
-     * see https://docs.angularjs.org/api/ng/service/$cacheFactory
-     */
-    interface ICacheFactoryService {
-        /**
-         * Factory that constructs Cache objects and gives access to them.
-         *
-         * @param cacheId Name or id of the newly created cache.
-         * @param optionsMap Options object that specifies the cache behavior. Properties:
-         *
-         * capacity — turns the cache into LRU cache.
-         */
-        (cacheId: string, optionsMap?: { capacity?: number; }): ICacheObject;
-
-        /**
-         * Get information about all the caches that have been created.
-         * @returns key-value map of cacheId to the result of calling cache#info
-         */
-        info(): any;
-
-        /**
-         * Get access to a cache object by the cacheId used when it was created.
-         *
-         * @param cacheId Name or id of a cache to access.
-         */
-        get(cacheId: string): ICacheObject;
-    }
-
-    /**
-     * $cacheFactory.Cache - type in module ng
-     *
-     * A cache object used to store and retrieve data, primarily used by $http and the script directive to cache templates and other data.
-     *
-     * see https://docs.angularjs.org/api/ng/type/$cacheFactory.Cache
-     */
-    interface ICacheObject {
-        /**
-         * Retrieve information regarding a particular Cache.
-         */
-        info(): {
-            /**
-             * the id of the cache instance
-             */
-            id: string;
-
-            /**
-             * the number of entries kept in the cache instance
-             */
-            size: number;
-
-            //...: any additional properties from the options object when creating the cache.
-        };
-
-        /**
-         * Inserts a named entry into the Cache object to be retrieved later, and incrementing the size of the cache if the key was not already present in the cache. If behaving like an LRU cache, it will also remove stale entries from the set.
-         *
-         * It will not insert undefined values into the cache.
-         *
-         * @param key the key under which the cached data is stored.
-         * @param value the value to store alongside the key. If it is undefined, the key will not be stored.
-         */
-        put<T>(key: string, value?: T): T;
-
-        /**
-         * Retrieves named data stored in the Cache object.
-         *
-         * @param key the key of the data to be retrieved
-         */
-        get<T>(key: string): T;
-
-        /**
-         * Removes an entry from the Cache object.
-         *
-         * @param key the key of the entry to be removed
-         */
-        remove(key: string): void;
-
-        /**
-         * Clears the cache object of any entries.
-         */
-        removeAll(): void;
-
-        /**
-         * Destroys the Cache object entirely, removing it from the $cacheFactory set.
-         */
-        destroy(): void;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // CompileService
-    // see http://docs.angularjs.org/api/ng.$compile
-    // see http://docs.angularjs.org/api/ng.$compileProvider
-    ///////////////////////////////////////////////////////////////////////////
-    interface ICompileService {
-        (element: string | Element | JQuery, transclude?: ITranscludeFunction, maxPriority?: number): ITemplateLinkingFunction;
-    }
-
-    interface ICompileProvider extends IServiceProvider {
-        directive(name: string, directiveFactory: Injectable<IDirectiveFactory>): ICompileProvider;
-        directive(object: {[directiveName: string]: Injectable<IDirectiveFactory>}): ICompileProvider;
-
-        component(name: string, options: IComponentOptions): ICompileProvider;
-
-        aHrefSanitizationWhitelist(): RegExp;
-        aHrefSanitizationWhitelist(regexp: RegExp): ICompileProvider;
-
-        imgSrcSanitizationWhitelist(): RegExp;
-        imgSrcSanitizationWhitelist(regexp: RegExp): ICompileProvider;
-
-        debugInfoEnabled(): boolean;
-        debugInfoEnabled(enabled: boolean): ICompileProvider;
-    
-        /**
-         * Sets the number of times $onChanges hooks can trigger new changes before giving up and assuming that the model is unstable.
-         * Increasing the TTL could have performance implications, so you should not change it without proper justification.
-         * Default: 10.
-         * See: https://docs.angularjs.org/api/ng/provider/$compileProvider#onChangesTtl
-         */
-        onChangesTtl(): number;
-        onChangesTtl(limit: number): ICompileProvider;
-    
-        /**
-         * It indicates to the compiler whether or not directives on comments should be compiled.
-         * It results in a compilation performance gain since the compiler doesn't have to check comments when looking for directives.
-         * Defaults to true.
-         * See: https://docs.angularjs.org/api/ng/provider/$compileProvider#commentDirectivesEnabled
-         */
-        commentDirectivesEnabled(): boolean;
-        commentDirectivesEnabled(enabled: boolean): ICompileProvider;
-    
-        /**
-         * It indicates to the compiler whether or not directives on element classes should be compiled.
-         * It results in a compilation performance gain since the compiler doesn't have to check element classes when looking for directives.
-         * Defaults to true.
-         * See: https://docs.angularjs.org/api/ng/provider/$compileProvider#cssClassDirectivesEnabled
-         */
-        cssClassDirectivesEnabled(): boolean;
-        cssClassDirectivesEnabled(enabled: boolean): ICompileProvider;
-    }
-
-    interface ICloneAttachFunction {
-        // Let's hint but not force cloneAttachFn's signature
-        (clonedElement?: JQuery, scope?: IScope): any;
-    }
-
-    // This corresponds to the "publicLinkFn" returned by $compile.
-    interface ITemplateLinkingFunction {
-        (scope: IScope, cloneAttachFn?: ICloneAttachFunction): JQuery;
-    }
-
-    /**
-     * This corresponds to $transclude passed to controllers and to the transclude function passed to link functions.
-     * https://docs.angularjs.org/api/ng/service/$compile#-controller-
-     * http://teropa.info/blog/2015/06/09/transclusion.html
-     */
-    interface ITranscludeFunction {
-        // If the scope is provided, then the cloneAttachFn must be as well.
-        (scope: IScope, cloneAttachFn: ICloneAttachFunction, futureParentElement?: JQuery, slotName?: string): JQuery;
-        // If one argument is provided, then it's assumed to be the cloneAttachFn.
-        (cloneAttachFn?: ICloneAttachFunction, futureParentElement?: JQuery, slotName?: string): JQuery;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // ControllerService
-    // see http://docs.angularjs.org/api/ng.$controller
-    // see http://docs.angularjs.org/api/ng.$controllerProvider
-    ///////////////////////////////////////////////////////////////////////////
-    interface IControllerService {
-        // Although the documentation doesn't state this, locals are optional
-        <T>(controllerConstructor: new (...args: any[]) => T, locals?: any, later?: boolean, ident?: string): T;
-        <T>(controllerConstructor: Function, locals?: any, later?: boolean, ident?: string): T;
-        <T>(controllerName: string, locals?: any, later?: boolean, ident?: string): T;
-    }
-
-    interface IControllerProvider extends IServiceProvider {
-        register(name: string, controllerConstructor: Function): void;
-        register(name: string, dependencyAnnotatedConstructor: any[]): void;
-        allowGlobals(): void;
-    }
-
-    /**
-     * xhrFactory
-     * Replace or decorate this service to create your own custom XMLHttpRequest objects.
-     * see https://docs.angularjs.org/api/ng/service/$xhrFactory
-     */
-    interface IXhrFactory<T> {
-        (method: string, url: string): T;
-    }
-
-    /**
-     * HttpService
-     * see http://docs.angularjs.org/api/ng/service/$http
-     */
-    interface IHttpService {
-        /**
-         * Object describing the request to be made and how it should be processed.
-         */
-        <T>(config: IRequestConfig): IHttpPromise<T>;
-
-        /**
-         * Shortcut method to perform GET request.
-         *
-         * @param url Relative or absolute URL specifying the destination of the request
-         * @param config Optional configuration object
-         */
-        get<T>(url: string, config?: IRequestShortcutConfig): IHttpPromise<T>;
-
-        /**
-         * Shortcut method to perform DELETE request.
-         *
-         * @param url Relative or absolute URL specifying the destination of the request
-         * @param config Optional configuration object
-         */
-        delete<T>(url: string, config?: IRequestShortcutConfig): IHttpPromise<T>;
-
-        /**
-         * Shortcut method to perform HEAD request.
-         *
-         * @param url Relative or absolute URL specifying the destination of the request
-         * @param config Optional configuration object
-         */
-        head<T>(url: string, config?: IRequestShortcutConfig): IHttpPromise<T>;
-
-        /**
-         * Shortcut method to perform JSONP request.
-         *
-         * @param url Relative or absolute URL specifying the destination of the request
-         * @param config Optional configuration object
-         */
-        jsonp<T>(url: string, config?: IRequestShortcutConfig): IHttpPromise<T>;
-
-        /**
-         * Shortcut method to perform POST request.
-         *
-         * @param url Relative or absolute URL specifying the destination of the request
-         * @param data Request content
-         * @param config Optional configuration object
-         */
-        post<T>(url: string, data: any, config?: IRequestShortcutConfig): IHttpPromise<T>;
-
-        /**
-         * Shortcut method to perform PUT request.
-         *
-         * @param url Relative or absolute URL specifying the destination of the request
-         * @param data Request content
-         * @param config Optional configuration object
-         */
-        put<T>(url: string, data: any, config?: IRequestShortcutConfig): IHttpPromise<T>;
-
-        /**
-         * Shortcut method to perform PATCH request.
-         *
-         * @param url Relative or absolute URL specifying the destination of the request
-         * @param data Request content
-         * @param config Optional configuration object
-         */
-        patch<T>(url: string, data: any, config?: IRequestShortcutConfig): IHttpPromise<T>;
-
-        /**
-         * Runtime equivalent of the $httpProvider.defaults property. Allows configuration of default headers, withCredentials as well as request and response transformations.
-         */
-        defaults: IHttpProviderDefaults;
-
-        /**
-         * Array of config objects for currently pending requests. This is primarily meant to be used for debugging purposes.
-         */
-        pendingRequests: IRequestConfig[];
-    }
-
-    /**
-     * Object describing the request to be made and how it should be processed.
-     * see http://docs.angularjs.org/api/ng/service/$http#usage
-     */
-    interface IRequestShortcutConfig extends IHttpProviderDefaults {
-        /**
-         * {Object.<string|Object>}
-         * Map of strings or objects which will be turned to ?key1=value1&key2=value2 after the url. If the value is not a string, it will be JSONified.
-         */
-        params?: any;
-
-        /**
-         * {string|Object}
-         * Data to be sent as the request message data.
-         */
-        data?: any;
-
-        /**
-         * Timeout in milliseconds, or promise that should abort the request when resolved.
-         */
-        timeout?: number|IPromise<any>;
-
-        /**
-         * See [XMLHttpRequest.responseType]https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#xmlhttprequest-responsetype
-         */
-        responseType?: string;
-    }
-
-    /**
-     * Object describing the request to be made and how it should be processed.
-     * see http://docs.angularjs.org/api/ng/service/$http#usage
-     */
-    interface IRequestConfig extends IRequestShortcutConfig {
-        /**
-         * HTTP method (e.g. 'GET', 'POST', etc)
-         */
-        method: string;
-        /**
-         * Absolute or relative URL of the resource that is being requested.
-         */
-        url: string;
-        /**
-         * Event listeners to be bound to the XMLHttpRequest object.
-         * To bind events to the XMLHttpRequest upload object, use uploadEventHandlers. The handler will be called in the context of a $apply block.
-         */
-        eventHandlers?: { [type: string]: EventListenerOrEventListenerObject };
-        /**
-         * Event listeners to be bound to the XMLHttpRequest upload object.
-         * To bind events to the XMLHttpRequest object, use eventHandlers. The handler will be called in the context of a $apply block.
-         */
-        uploadEventHandlers?: { [type: string]: EventListenerOrEventListenerObject };
-    }
-
-    interface IHttpHeadersGetter {
-        (): { [name: string]: string; };
-        (headerName: string): string;
-    }
-
-    interface IHttpPromiseCallback<T> {
-        (data: T, status: number, headers: IHttpHeadersGetter, config: IRequestConfig): void;
-    }
-
-    interface IHttpPromiseCallbackArg<T> {
-        data?: T;
-        status?: number;
-        headers?: IHttpHeadersGetter;
-        config?: IRequestConfig;
-        statusText?: string;
-    }
-
-    interface IHttpPromise<T> extends IPromise<IHttpPromiseCallbackArg<T>> {
-        /**
-         * The $http legacy promise methods success and error have been deprecated. Use the standard then method instead.
-         * If $httpProvider.useLegacyPromiseExtensions is set to false then these methods will throw $http/legacy error.
-         * @deprecated
-         */
-        success?(callback: IHttpPromiseCallback<T>): IHttpPromise<T>;
-        /**
-         * The $http legacy promise methods success and error have been deprecated. Use the standard then method instead.
-         * If $httpProvider.useLegacyPromiseExtensions is set to false then these methods will throw $http/legacy error.
-         * @deprecated
-         */
-        error?(callback: IHttpPromiseCallback<any>): IHttpPromise<T>;
-    }
-
-    // See the jsdoc for transformData() at https://github.com/angular/angular.js/blob/master/src/ng/http.js#L228
-    interface IHttpRequestTransformer {
-        (data: any, headersGetter: IHttpHeadersGetter): any;
-    }
-
-    // The definition of fields are the same as IHttpPromiseCallbackArg
-    interface IHttpResponseTransformer {
-        (data: any, headersGetter: IHttpHeadersGetter, status: number): any;
-    }
-
-    type HttpHeaderType = {[requestType: string]:string|((config:IRequestConfig) => string)};
-
-    interface IHttpRequestConfigHeaders {
-        [requestType: string]: any;
-        common?: any;
-        get?: any;
-        post?: any;
-        put?: any;
-        patch?: any;
-    }
-
-    /**
-    * Object that controls the defaults for $http provider. Not all fields of IRequestShortcutConfig can be configured
-    * via defaults and the docs do not say which. The following is based on the inspection of the source code.
-    * https://docs.angularjs.org/api/ng/service/$http#defaults
-    * https://docs.angularjs.org/api/ng/service/$http#usage
-    * https://docs.angularjs.org/api/ng/provider/$httpProvider The properties section
-    */
-    interface IHttpProviderDefaults {
-        /**
-         * {boolean|Cache}
-         * If true, a default $http cache will be used to cache the GET request, otherwise if a cache instance built with $cacheFactory, this cache will be used for caching.
-         */
-        cache?: any;
-
-        /**
-         * Transform function or an array of such functions. The transform function takes the http request body and
-         * headers and returns its transformed (typically serialized) version.
-         * @see {@link https://docs.angularjs.org/api/ng/service/$http#transforming-requests-and-responses}
-         */
-        transformRequest?: IHttpRequestTransformer |IHttpRequestTransformer[];
-
-        /**
-         * Transform function or an array of such functions. The transform function takes the http response body and
-         * headers and returns its transformed (typically deserialized) version.
-         */
-        transformResponse?: IHttpResponseTransformer | IHttpResponseTransformer[];
-
-        /**
-         * Map of strings or functions which return strings representing HTTP headers to send to the server. If the
-         * return value of a function is null, the header will not be sent.
-         * The key of the map is the request verb in lower case. The "common" key applies to all requests.
-         * @see {@link https://docs.angularjs.org/api/ng/service/$http#setting-http-headers}
-         */
-        headers?: IHttpRequestConfigHeaders;
-
-        /** Name of HTTP header to populate with the XSRF token. */
-        xsrfHeaderName?: string;
-
-        /** Name of cookie containing the XSRF token. */
-        xsrfCookieName?: string;
-
-        /**
-         * whether to to set the withCredentials flag on the XHR object. See [requests with credentials]https://developer.mozilla.org/en/http_access_control#section_5 for more information.
-         */
-        withCredentials?: boolean;
-
-        /**
-        * A function used to the prepare string representation of request parameters (specified as an object). If
-        * specified as string, it is interpreted as a function registered with the $injector. Defaults to
-        * $httpParamSerializer.
-        */
-        paramSerializer?: string | ((obj: any) => string);
-    }
-
-    interface IHttpInterceptor {
-        request?: (config: IRequestConfig) => IRequestConfig|IPromise<IRequestConfig>;
-        requestError?: (rejection: any) => any;
-        response?: <T>(response: IHttpPromiseCallbackArg<T>) => IPromise<IHttpPromiseCallbackArg<T>>|IHttpPromiseCallbackArg<T>;
-        responseError?: (rejection: any) => any;
-    }
-
-    interface IHttpInterceptorFactory {
-        (...args: any[]): IHttpInterceptor;
-    }
-
-    interface IHttpProvider extends IServiceProvider {
-        defaults: IHttpProviderDefaults;
-
-        /**
-         * Register service factories (names or implementations) for interceptors which are called before and after
-         * each request.
-         */
-        interceptors: (string | Injectable<IHttpInterceptorFactory>)[];
-        useApplyAsync(): boolean;
-        useApplyAsync(value: boolean): IHttpProvider;
-
-        /**
-         *
-         * @param {boolean=} value If true, `$http` will return a normal promise without the `success` and `error` methods.
-         * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.
-         *    otherwise, returns the current configured value.
-         */
-        useLegacyPromiseExtensions(value:boolean) : boolean | IHttpProvider;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // HttpBackendService
-    // see http://docs.angularjs.org/api/ng.$httpBackend
-    // You should never need to use this service directly.
-    ///////////////////////////////////////////////////////////////////////////
-    interface IHttpBackendService {
-        // XXX Perhaps define callback signature in the future
-        (method: string, url: string, post?: any, callback?: Function, headers?: any, timeout?: number, withCredentials?: boolean): void;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // InterpolateService
-    // see http://docs.angularjs.org/api/ng.$interpolate
-    // see http://docs.angularjs.org/api/ng.$interpolateProvider
-    ///////////////////////////////////////////////////////////////////////////
-    interface IInterpolateService {
-        (text: string, mustHaveExpression?: boolean, trustedContext?: string, allOrNothing?: boolean): IInterpolationFunction;
-        endSymbol(): string;
-        startSymbol(): string;
-    }
-
-    interface IInterpolationFunction {
-        (context: any): string;
-    }
-
-    interface IInterpolateProvider extends IServiceProvider {
-        startSymbol(): string;
-        startSymbol(value: string): IInterpolateProvider;
-        endSymbol(): string;
-        endSymbol(value: string): IInterpolateProvider;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // TemplateCacheService
-    // see http://docs.angularjs.org/api/ng.$templateCache
-    ///////////////////////////////////////////////////////////////////////////
-    interface ITemplateCacheService extends ICacheObject {}
-
-    ///////////////////////////////////////////////////////////////////////////
-    // SCEService
-    // see http://docs.angularjs.org/api/ng.$sce
-    ///////////////////////////////////////////////////////////////////////////
-    interface ISCEService {
-        getTrusted(type: string, mayBeTrusted: any): any;
-        getTrustedCss(value: any): any;
-        getTrustedHtml(value: any): any;
-        getTrustedJs(value: any): any;
-        getTrustedResourceUrl(value: any): any;
-        getTrustedUrl(value: any): any;
-        parse(type: string, expression: string): (context: any, locals: any) => any;
-        parseAsCss(expression: string): (context: any, locals: any) => any;
-        parseAsHtml(expression: string): (context: any, locals: any) => any;
-        parseAsJs(expression: string): (context: any, locals: any) => any;
-        parseAsResourceUrl(expression: string): (context: any, locals: any) => any;
-        parseAsUrl(expression: string): (context: any, locals: any) => any;
-        trustAs(type: string, value: any): any;
-        trustAsHtml(value: any): any;
-        trustAsJs(value: any): any;
-        trustAsResourceUrl(value: any): any;
-        trustAsUrl(value: any): any;
-        isEnabled(): boolean;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // SCEProvider
-    // see http://docs.angularjs.org/api/ng.$sceProvider
-    ///////////////////////////////////////////////////////////////////////////
-    interface ISCEProvider extends IServiceProvider {
-        enabled(value: boolean): void;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // SCEDelegateService
-    // see http://docs.angularjs.org/api/ng.$sceDelegate
-    ///////////////////////////////////////////////////////////////////////////
-    interface ISCEDelegateService {
-        getTrusted(type: string, mayBeTrusted: any): any;
-        trustAs(type: string, value: any): any;
-        valueOf(value: any): any;
-    }
-
-
-    ///////////////////////////////////////////////////////////////////////////
-    // SCEDelegateProvider
-    // see http://docs.angularjs.org/api/ng.$sceDelegateProvider
-    ///////////////////////////////////////////////////////////////////////////
-    interface ISCEDelegateProvider extends IServiceProvider {
-        resourceUrlBlacklist(blacklist: any[]): void;
-        resourceUrlWhitelist(whitelist: any[]): void;
-        resourceUrlBlacklist(): any[];
-        resourceUrlWhitelist(): any[];
-    }
-
-    /**
-     * $templateRequest service
-     * see http://docs.angularjs.org/api/ng/service/$templateRequest
-     */
-    interface ITemplateRequestService {
-        /**
-         * Downloads a template using $http and, upon success, stores the
-         * contents inside of $templateCache.
-         *
-         * If the HTTP request fails or the response data of the HTTP request is
-         * empty then a $compile error will be thrown (unless
-         * {ignoreRequestError} is set to true).
-         *
-         * @param tpl                  The template URL.
-         * @param ignoreRequestError   Whether or not to ignore the exception
-         *                             when the request fails or the template is
-         *                             empty.
-         *
-         * @return   A promise whose value is the template content.
-         */
-        (tpl: string, ignoreRequestError?: boolean): IPromise<string>;
-        /**
-         * total amount of pending template requests being downloaded.
-         * @type {number}
-         */
-        totalPendingRequests: number;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // Component
-    // see http://angularjs.blogspot.com.br/2015/11/angularjs-15-beta2-and-14-releases.html
-    // and http://toddmotto.com/exploring-the-angular-1-5-component-method/
-    ///////////////////////////////////////////////////////////////////////////
-    /**
-     * Component definition object (a simplified directive definition object)
-     */
-    interface IComponentOptions {
-        /**
-         * Controller constructor function that should be associated with newly created scope or the name of a registered
-         * controller if passed as a string. Empty function by default.
-         * Use the array form to define dependencies (necessary if strictDi is enabled and you require dependency injection)
-         */
-        controller?: string | Injectable<IControllerConstructor>;
-        /**
-         * An identifier name for a reference to the controller. If present, the controller will be published to its scope under
-         * the specified name. If not present, this will default to '$ctrl'.
-         */
-        controllerAs?: string;
-        /**
-         * html template as a string or a function that returns an html template as a string which should be used as the
-         * contents of this component. Empty string by default.
-         * If template is a function, then it is injected with the following locals:
-         * $element - Current element
-         * $attrs - Current attributes object for the element
-         * Use the array form to define dependencies (necessary if strictDi is enabled and you require dependency injection)
-         */
-        template?: string | Injectable<(...args: any[]) => string>;
-        /**
-         * Path or function that returns a path to an html template that should be used as the contents of this component.
-         * If templateUrl is a function, then it is injected with the following locals:
-         * $element - Current element
-         * $attrs - Current attributes object for the element
-         * Use the array form to define dependencies (necessary if strictDi is enabled and you require dependency injection)
-         */
-        templateUrl?: string | Injectable<(...args: any[]) => string>;
-        /**
-         * Define DOM attribute binding to component properties. Component properties are always bound to the component
-         * controller and not to the scope.
-         */
-        bindings?: {[boundProperty: string]: string};
-        /**
-         * Whether transclusion is enabled. Disabled by default.
-         */
-        transclude?: boolean | {[slot: string]: string};
-        /**
-         * Requires the controllers of other directives and binds them to this component's controller.
-         * The object keys specify the property names under which the required controllers (object values) will be bound.
-         * Note that the required controllers will not be available during the instantiation of the controller,
-         * but they are guaranteed to be available just before the $onInit method is executed!
-         */
-        require?: {[controller: string]: string};
-    }
-
-    type IControllerConstructor =
-        (new (...args: any[]) => IController) |
-        // Instead of classes, plain functions are often used as controller constructors, especially in examples.
-        ((...args: any[]) => (void | IController));
-
-    /**
-     * Directive controllers have a well-defined lifecycle. Each controller can implement "lifecycle hooks". These are methods that
-     * will be called by Angular at certain points in the life cycle of the directive.
-     * https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks
-     * https://docs.angularjs.org/guide/component
-     */
-    interface IController {
-        /**
-         * Called on each controller after all the controllers on an element have been constructed and had their bindings
-         * initialized (and before the pre & post linking functions for the directives on this element). This is a good
-         * place to put initialization code for your controller.
-         */
-        $onInit?(): void;
-        /**
-         * Called on each turn of the digest cycle. Provides an opportunity to detect and act on changes.
-         * Any actions that you wish to take in response to the changes that you detect must be invoked from this hook;
-         * implementing this has no effect on when `$onChanges` is called. For example, this hook could be useful if you wish
-         * to perform a deep equality check, or to check a `Dat`e object, changes to which would not be detected by Angular's
-         * change detector and thus not trigger `$onChanges`. This hook is invoked with no arguments; if detecting changes,
-         * you must store the previous value(s) for comparison to the current values.
-         */
-        $doCheck?(): void;
-        /**
-         * Called whenever one-way bindings are updated. The onChangesObj is a hash whose keys are the names of the bound
-         * properties that have changed, and the values are an {@link IChangesObject} object of the form
-         * { currentValue, previousValue, isFirstChange() }. Use this hook to trigger updates within a component such as
-         * cloning the bound value to prevent accidental mutation of the outer value.
-         */
-        $onChanges?(onChangesObj: IOnChangesObject): void;
-        /**
-         * Called on a controller when its containing scope is destroyed. Use this hook for releasing external resources,
-         * watches and event handlers.
-         */
-        $onDestroy?(): void;
-        /**
-         * Called after this controller's element and its children have been linked. Similar to the post-link function this
-         * hook can be used to set up DOM event handlers and do direct DOM manipulation. Note that child elements that contain
-         * templateUrl directives will not have been compiled and linked since they are waiting for their template to load
-         * asynchronously and their own compilation and linking has been suspended until that occurs. This hook can be considered
-         * analogous to the ngAfterViewInit and ngAfterContentInit hooks in Angular 2. Since the compilation process is rather
-         * different in Angular 1 there is no direct mapping and care should be taken when upgrading.
-         */
-        $postLink?(): void;
-    }
-
-    interface IOnChangesObject {
-        [property: string]: IChangesObject<any>;
-    }
-
-    interface IChangesObject<T> {
-        currentValue: T;
-        previousValue: T;
-        isFirstChange(): boolean;
-    }
-
-    ///////////////////////////////////////////////////////////////////////////
-    // Directive
-    // see http://docs.angularjs.org/api/ng.$compileProvider#directive
-    // and http://docs.angularjs.org/guide/directive
-    ///////////////////////////////////////////////////////////////////////////
-
-    interface IDirectiveFactory {
-        (...args: any[]): IDirective | IDirectiveLinkFn;
-    }
-
-    interface IDirectiveLinkFn {
-        (
-            scope: IScope,
-            instanceElement: JQuery,
-            instanceAttributes: IAttributes,
-            controller?: IController | IController[] | {[key: string]: IController},
-            transclude?: ITranscludeFunction
-        ): void;
-    }
-
-    interface IDirectivePrePost {
-        pre?: IDirectiveLinkFn;
-        post?: IDirectiveLinkFn;
-    }
-
-    interface IDirectiveCompileFn {
-        (
-            templateElement: JQuery,
-            templateAttributes: IAttributes,
-            /**
-             * @deprecated
-             * Note: The transclude function that is passed to the compile function is deprecated,
-             * as it e.g. does not know about the right outer scope. Please use the transclude function
-             * that is passed to the link function instead.
-             */
-            transclude: ITranscludeFunction
-        ): void | IDirectiveLinkFn | IDirectivePrePost;
-    }
-
-    interface IDirective {
-        compile?: IDirectiveCompileFn;
-        controller?: string | Injectable<IControllerConstructor>;
-        controllerAs?: string;
-        /**
-         * Deprecation warning: although bindings for non-ES6 class controllers are currently bound to this before
-         * the controller constructor is called, this use is now deprecated. Please place initialization code that
-         * relies upon bindings inside a $onInit method on the controller, instead.
-         */
-        bindToController?: boolean | {[boundProperty: string]: string};
-        link?: IDirectiveLinkFn | IDirectivePrePost;
-        multiElement?: boolean;
-        priority?: number;
-        /**
-         * @deprecated
-         */
-        replace?: boolean;
-        require?: string | string[] | {[controller: string]: string};
-        restrict?: string;
-        scope?: boolean | {[boundProperty: string]: string};
-        template?: string | ((tElement: JQuery, tAttrs: IAttributes) => string);
-        templateNamespace?: string;
-        templateUrl?: string | ((tElement: JQuery, tAttrs: IAttributes) => string);
-        terminal?: boolean;
-        transclude?: boolean | 'element' | {[slot: string]: string};
-    }
-
-    /**
-     * These interfaces are kept for compatibility with older versions of these type definitions.
-     * Actually, Angular doesn't create a special subclass of jQuery objects. It extends jQuery.prototype
-     * like jQuery plugins do, that's why all jQuery objects have these Angular-specific methods, not
-     * only those returned from angular.element.
-     * See: http://docs.angularjs.org/api/angular.element
-     */
-    interface IAugmentedJQueryStatic extends JQueryStatic {}
-    interface IAugmentedJQuery extends JQuery {}
-
-    /**
-     * Same as IController. Keeping it for compatibility with older versions of these type definitions.
-     */
-    interface IComponentController extends IController {}
-
-    ///////////////////////////////////////////////////////////////////////////
-    // AUTO module (angular.js)
-    ///////////////////////////////////////////////////////////////////////////
-    export module auto {
-
-        ///////////////////////////////////////////////////////////////////////
-        // InjectorService
-        // see http://docs.angularjs.org/api/AUTO.$injector
-        ///////////////////////////////////////////////////////////////////////
-        interface IInjectorService {
-            annotate(fn: Function, strictDi?: boolean): string[];
-            annotate(inlineAnnotatedFunction: any[]): string[];
-            get<T>(name: string, caller?: string): T;
-            get(name: '$anchorScroll'): IAnchorScrollService
-            get(name: '$cacheFactory'): ICacheFactoryService
-            get(name: '$compile'): ICompileService
-            get(name: '$controller'): IControllerService
-            get(name: '$document'): IDocumentService
-            get(name: '$exceptionHandler'): IExceptionHandlerService
-            get(name: '$filter'): IFilterService
-            get(name: '$http'): IHttpService
-            get(name: '$httpBackend'): IHttpBackendService
-            get(name: '$httpParamSerializer'): IHttpParamSerializer
-            get(name: '$httpParamSerializerJQLike'): IHttpParamSerializer
-            get(name: '$interpolate'): IInterpolateService
-            get(name: '$interval'): IIntervalService
-            get(name: '$locale'): ILocaleService
-            get(name: '$location'): ILocationService
-            get(name: '$log'): ILogService
-            get(name: '$parse'): IParseService
-            get(name: '$q'): IQService
-            get(name: '$rootElement'): IRootElementService
-            get(name: '$rootScope'): IRootScopeService
-            get(name: '$sce'): ISCEService
-            get(name: '$sceDelegate'): ISCEDelegateService
-            get(name: '$templateCache'): ITemplateCacheService
-            get(name: '$templateRequest'): ITemplateRequestService
-            get(name: '$timeout'): ITimeoutService
-            get(name: '$window'): IWindowService
-            get<T>(name: '$xhrFactory'): IXhrFactory<T>
-            has(name: string): boolean;
-            instantiate<T>(typeConstructor: Function, locals?: any): T;
-            invoke(inlineAnnotatedFunction: any[]): any;
-            invoke(func: Function, context?: any, locals?: any): any;
-            strictDi: boolean;
-        }
-
-        ///////////////////////////////////////////////////////////////////////
-        // ProvideService
-        // see http://docs.angularjs.org/api/AUTO.$provide
-        ///////////////////////////////////////////////////////////////////////
-        interface IProvideService {
-            // Documentation says it returns the registered instance, but actual
-            // implementation does not return anything.
-            // constant(name: string, value: any): any;
-            /**
-             * Register a constant service, such as a string, a number, an array, an object or a function, with the $injector. Unlike value it can be injected into a module configuration function (see config) and it cannot be overridden by an Angular decorator.
-             *
-             * @param name The name of the constant.
-             * @param value The constant value.
-             */
-            constant(name: string, value: any): void;
-
-            /**
-             * Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behaviour of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service.
-             *
-             * @param name The name of the service to decorate.
-             * @param decorator This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments:
-             *
-             * $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.
-             */
-            decorator(name: string, decorator: Function): void;
-            /**
-             * Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behaviour of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service.
-             *
-             * @param name The name of the service to decorate.
-             * @param inlineAnnotatedFunction This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments:
-             *
-             * $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.
-             */
-            decorator(name: string, inlineAnnotatedFunction: any[]): void;
-            factory(name: string, serviceFactoryFunction: Function): IServiceProvider;
-            factory(name: string, inlineAnnotatedFunction: any[]): IServiceProvider;
-            provider(name: string, provider: IServiceProvider): IServiceProvider;
-            provider(name: string, serviceProviderConstructor: Function): IServiceProvider;
-            service(name: string, constructor: Function): IServiceProvider;
-            service(name: string, inlineAnnotatedFunction: any[]): IServiceProvider;
-            value(name: string, value: any): IServiceProvider;
-        }
-
-    }
-
-    /**
-     * $http params serializer that converts objects to strings
-     * see https://docs.angularjs.org/api/ng/service/$httpParamSerializer
-     */
-    interface IHttpParamSerializer {
-        (obj: Object): string;
-    }
-}
-
-interface JQuery {
-    // TODO: events, how to define?
-    //$destroy
-
-    find(element: any): JQuery;
-    find(obj: JQuery): JQuery;
-    controller(name?: string): any;
-    injector(): ng.auto.IInjectorService;
-    /** It's declared generic for custom scope interfaces */
-    scope<T extends ng.IScope>(): T;
-    isolateScope<T extends ng.IScope>(): T;
-
-    inheritedData(key: string, value: any): JQuery;
-    inheritedData(obj: { [key: string]: any; }): JQuery;
-    inheritedData(key?: string): any;
-}
diff --git a/typings/globals/angular/typings.json b/typings/globals/angular/typings.json
deleted file mode 100644
index f890168..0000000
--- a/typings/globals/angular/typings.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "resolution": "main",
-  "tree": {
-    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/5f2450ba8001ed38c83eae3c0db93f0a3309180d/angularjs/angular.d.ts",
-    "raw": "registry:dt/angular#1.5.0+20161208205636",
-    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/5f2450ba8001ed38c83eae3c0db93f0a3309180d/angularjs/angular.d.ts"
-  }
-}
diff --git a/typings/globals/es6-shim/index.d.ts b/typings/globals/es6-shim/index.d.ts
deleted file mode 100644
index 6ad8ced..0000000
--- a/typings/globals/es6-shim/index.d.ts
+++ /dev/null
@@ -1,666 +0,0 @@
-// Generated by typings
-// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/9807d9b701f58be068cb07833d2b24235351d052/es6-shim/es6-shim.d.ts
-declare type PropertyKey = string | number | symbol;
-
-interface IteratorResult<T> {
-    done: boolean;
-    value?: T;
-}
-
-interface IterableShim<T> {
-    /**
-      * Shim for an ES6 iterable. Not intended for direct use by user code.
-      */
-    "_es6-shim iterator_"(): Iterator<T>;
-}
-
-interface Iterator<T> {
-    next(value?: any): IteratorResult<T>;
-    return?(value?: any): IteratorResult<T>;
-    throw?(e?: any): IteratorResult<T>;
-}
-
-interface IterableIteratorShim<T> extends IterableShim<T>, Iterator<T> {
-    /**
-      * Shim for an ES6 iterable iterator. Not intended for direct use by user code.
-      */
-    "_es6-shim iterator_"(): IterableIteratorShim<T>;
-}
-
-interface StringConstructor {
-    /**
-      * Return the String value whose elements are, in order, the elements in the List elements.
-      * If length is 0, the empty string is returned.
-      */
-    fromCodePoint(...codePoints: number[]): string;
-
-    /**
-      * String.raw is intended for use as a tag function of a Tagged Template String. When called
-      * as such the first argument will be a well formed template call site object and the rest
-      * parameter will contain the substitution values.
-      * @param template A well-formed template string call site representation.
-      * @param substitutions A set of substitution values.
-      */
-    raw(template: TemplateStringsArray, ...substitutions: any[]): string;
-}
-
-interface String {
-    /**
-      * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
-      * value of the UTF-16 encoded code point starting at the string element at position pos in
-      * the String resulting from converting this object to a String.
-      * If there is no element at that position, the result is undefined.
-      * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
-      */
-    codePointAt(pos: number): number;
-
-    /**
-      * Returns true if searchString appears as a substring of the result of converting this
-      * object to a String, at one or more positions that are
-      * greater than or equal to position; otherwise, returns false.
-      * @param searchString search string
-      * @param position If position is undefined, 0 is assumed, so as to search all of the String.
-      */
-    includes(searchString: string, position?: number): boolean;
-
-    /**
-      * Returns true if the sequence of elements of searchString converted to a String is the
-      * same as the corresponding elements of this object (converted to a String) starting at
-      * endPosition – length(this). Otherwise returns false.
-      */
-    endsWith(searchString: string, endPosition?: number): boolean;
-
-    /**
-      * Returns a String value that is made from count copies appended together. If count is 0,
-      * T is the empty String is returned.
-      * @param count number of copies to append
-      */
-    repeat(count: number): string;
-
-    /**
-      * Returns true if the sequence of elements of searchString converted to a String is the
-      * same as the corresponding elements of this object (converted to a String) starting at
-      * position. Otherwise returns false.
-      */
-    startsWith(searchString: string, position?: number): boolean;
-
-    /**
-      * Returns an <a> HTML anchor element and sets the name attribute to the text value
-      * @param name
-      */
-    anchor(name: string): string;
-
-    /** Returns a <big> HTML element */
-    big(): string;
-
-    /** Returns a <blink> HTML element */
-    blink(): string;
-
-    /** Returns a <b> HTML element */
-    bold(): string;
-
-    /** Returns a <tt> HTML element */
-    fixed(): string
-
-    /** Returns a <font> HTML element and sets the color attribute value */
-    fontcolor(color: string): string
-
-    /** Returns a <font> HTML element and sets the size attribute value */
-    fontsize(size: number): string;
-
-    /** Returns a <font> HTML element and sets the size attribute value */
-    fontsize(size: string): string;
-
-    /** Returns an <i> HTML element */
-    italics(): string;
-
-    /** Returns an <a> HTML element and sets the href attribute value */
-    link(url: string): string;
-
-    /** Returns a <small> HTML element */
-    small(): string;
-
-    /** Returns a <strike> HTML element */
-    strike(): string;
-
-    /** Returns a <sub> HTML element */
-    sub(): string;
-
-    /** Returns a <sup> HTML element */
-    sup(): string;
-
-    /**
-      * Shim for an ES6 iterable. Not intended for direct use by user code.
-      */
-    "_es6-shim iterator_"(): IterableIteratorShim<string>;
-}
-
-interface ArrayConstructor {
-    /**
-      * Creates an array from an array-like object.
-      * @param arrayLike An array-like object to convert to an array.
-      * @param mapfn A mapping function to call on every element of the array.
-      * @param thisArg Value of 'this' used to invoke the mapfn.
-      */
-    from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
-
-    /**
-      * Creates an array from an iterable object.
-      * @param iterable An iterable object to convert to an array.
-      * @param mapfn A mapping function to call on every element of the array.
-      * @param thisArg Value of 'this' used to invoke the mapfn.
-      */
-    from<T, U>(iterable: IterableShim<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
-
-    /**
-      * Creates an array from an array-like object.
-      * @param arrayLike An array-like object to convert to an array.
-      */
-    from<T>(arrayLike: ArrayLike<T>): Array<T>;
-
-    /**
-      * Creates an array from an iterable object.
-      * @param iterable An iterable object to convert to an array.
-      */
-    from<T>(iterable: IterableShim<T>): Array<T>;
-
-    /**
-      * Returns a new array from a set of elements.
-      * @param items A set of elements to include in the new array object.
-      */
-    of<T>(...items: T[]): Array<T>;
-}
-
-interface Array<T> {
-    /**
-      * Returns the value of the first element in the array where predicate is true, and undefined
-      * otherwise.
-      * @param predicate find calls predicate once for each element of the array, in ascending
-      * order, until it finds one where predicate returns true. If such an element is found, find
-      * immediately returns that element value. Otherwise, find returns undefined.
-      * @param thisArg If provided, it will be used as the this value for each invocation of
-      * predicate. If it is not provided, undefined is used instead.
-      */
-    find(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T;
-
-    /**
-      * Returns the index of the first element in the array where predicate is true, and undefined
-      * otherwise.
-      * @param predicate find calls predicate once for each element of the array, in ascending
-      * order, until it finds one where predicate returns true. If such an element is found, find
-      * immediately returns that element value. Otherwise, find returns undefined.
-      * @param thisArg If provided, it will be used as the this value for each invocation of
-      * predicate. If it is not provided, undefined is used instead.
-      */
-    findIndex(predicate: (value: T) => boolean, thisArg?: any): number;
-
-    /**
-      * Returns the this object after filling the section identified by start and end with value
-      * @param value value to fill array section with
-      * @param start index to start filling the array at. If start is negative, it is treated as
-      * length+start where length is the length of the array.
-      * @param end index to stop filling the array at. If end is negative, it is treated as
-      * length+end.
-      */
-    fill(value: T, start?: number, end?: number): T[];
-
-    /**
-      * Returns the this object after copying a section of the array identified by start and end
-      * to the same array starting at position target
-      * @param target If target is negative, it is treated as length+target where length is the
-      * length of the array.
-      * @param start If start is negative, it is treated as length+start. If end is negative, it
-      * is treated as length+end.
-      * @param end If not specified, length of the this object is used as its default value.
-      */
-    copyWithin(target: number, start: number, end?: number): T[];
-
-    /**
-      * Returns an array of key, value pairs for every entry in the array
-      */
-    entries(): IterableIteratorShim<[number, T]>;
-
-    /**
-      * Returns an list of keys in the array
-      */
-    keys(): IterableIteratorShim<number>;
-
-    /**
-      * Returns an list of values in the array
-      */
-    values(): IterableIteratorShim<T>;
-
-    /**
-      * Shim for an ES6 iterable. Not intended for direct use by user code.
-      */
-    "_es6-shim iterator_"(): IterableIteratorShim<T>;
-}
-
-interface NumberConstructor {
-    /**
-      * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
-      * that is representable as a Number value, which is approximately:
-      * 2.2204460492503130808472633361816 x 10‍−‍16.
-      */
-    EPSILON: number;
-
-    /**
-      * Returns true if passed value is finite.
-      * Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a
-      * number. Only finite values of the type number, result in true.
-      * @param number A numeric value.
-      */
-    isFinite(number: number): boolean;
-
-    /**
-      * Returns true if the value passed is an integer, false otherwise.
-      * @param number A numeric value.
-      */
-    isInteger(number: number): boolean;
-
-    /**
-      * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
-      * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
-      * to a number. Only values of the type number, that are also NaN, result in true.
-      * @param number A numeric value.
-      */
-    isNaN(number: number): boolean;
-
-    /**
-      * Returns true if the value passed is a safe integer.
-      * @param number A numeric value.
-      */
-    isSafeInteger(number: number): boolean;
-
-    /**
-      * The value of the largest integer n such that n and n + 1 are both exactly representable as
-      * a Number value.
-      * The value of Number.MIN_SAFE_INTEGER is 9007199254740991 2^53 − 1.
-      */
-    MAX_SAFE_INTEGER: number;
-
-    /**
-      * The value of the smallest integer n such that n and n − 1 are both exactly representable as
-      * a Number value.
-      * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
-      */
-    MIN_SAFE_INTEGER: number;
-
-    /**
-      * Converts a string to a floating-point number.
-      * @param string A string that contains a floating-point number.
-      */
-    parseFloat(string: string): number;
-
-    /**
-      * Converts A string to an integer.
-      * @param s A string to convert into a number.
-      * @param radix A value between 2 and 36 that specifies the base of the number in numString.
-      * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
-      * All other strings are considered decimal.
-      */
-    parseInt(string: string, radix?: number): number;
-}
-
-interface ObjectConstructor {
-    /**
-      * Copy the values of all of the enumerable own properties from one or more source objects to a
-      * target object. Returns the target object.
-      * @param target The target object to copy to.
-      * @param sources One or more source objects to copy properties from.
-      */
-    assign(target: any, ...sources: any[]): any;
-
-    /**
-      * Returns true if the values are the same value, false otherwise.
-      * @param value1 The first value.
-      * @param value2 The second value.
-      */
-    is(value1: any, value2: any): boolean;
-
-    /**
-      * Sets the prototype of a specified object o to  object proto or null. Returns the object o.
-      * @param o The object to change its prototype.
-      * @param proto The value of the new prototype or null.
-      * @remarks Requires `__proto__` support.
-      */
-    setPrototypeOf(o: any, proto: any): any;
-}
-
-interface RegExp {
-    /**
-      * Returns a string indicating the flags of the regular expression in question. This field is read-only.
-      * The characters in this string are sequenced and concatenated in the following order:
-      *
-      *    - "g" for global
-      *    - "i" for ignoreCase
-      *    - "m" for multiline
-      *    - "u" for unicode
-      *    - "y" for sticky
-      *
-      * If no flags are set, the value is the empty string.
-      */
-    flags: string;
-}
-
-interface Math {
-    /**
-      * Returns the number of leading zero bits in the 32-bit binary representation of a number.
-      * @param x A numeric expression.
-      */
-    clz32(x: number): number;
-
-    /**
-      * Returns the result of 32-bit multiplication of two numbers.
-      * @param x First number
-      * @param y Second number
-      */
-    imul(x: number, y: number): number;
-
-    /**
-      * Returns the sign of the x, indicating whether x is positive, negative or zero.
-      * @param x The numeric expression to test
-      */
-    sign(x: number): number;
-
-    /**
-      * Returns the base 10 logarithm of a number.
-      * @param x A numeric expression.
-      */
-    log10(x: number): number;
-
-    /**
-      * Returns the base 2 logarithm of a number.
-      * @param x A numeric expression.
-      */
-    log2(x: number): number;
-
-    /**
-      * Returns the natural logarithm of 1 + x.
-      * @param x A numeric expression.
-      */
-    log1p(x: number): number;
-
-    /**
-      * Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
-      * the natural logarithms).
-      * @param x A numeric expression.
-      */
-    expm1(x: number): number;
-
-    /**
-      * Returns the hyperbolic cosine of a number.
-      * @param x A numeric expression that contains an angle measured in radians.
-      */
-    cosh(x: number): number;
-
-    /**
-      * Returns the hyperbolic sine of a number.
-      * @param x A numeric expression that contains an angle measured in radians.
-      */
-    sinh(x: number): number;
-
-    /**
-      * Returns the hyperbolic tangent of a number.
-      * @param x A numeric expression that contains an angle measured in radians.
-      */
-    tanh(x: number): number;
-
-    /**
-      * Returns the inverse hyperbolic cosine of a number.
-      * @param x A numeric expression that contains an angle measured in radians.
-      */
-    acosh(x: number): number;
-
-    /**
-      * Returns the inverse hyperbolic sine of a number.
-      * @param x A numeric expression that contains an angle measured in radians.
-      */
-    asinh(x: number): number;
-
-    /**
-      * Returns the inverse hyperbolic tangent of a number.
-      * @param x A numeric expression that contains an angle measured in radians.
-      */
-    atanh(x: number): number;
-
-    /**
-      * Returns the square root of the sum of squares of its arguments.
-      * @param values Values to compute the square root for.
-      *     If no arguments are passed, the result is +0.
-      *     If there is only one argument, the result is the absolute value.
-      *     If any argument is +Infinity or -Infinity, the result is +Infinity.
-      *     If any argument is NaN, the result is NaN.
-      *     If all arguments are either +0 or −0, the result is +0.
-      */
-    hypot(...values: number[]): number;
-
-    /**
-      * Returns the integral part of the a numeric expression, x, removing any fractional digits.
-      * If x is already an integer, the result is x.
-      * @param x A numeric expression.
-      */
-    trunc(x: number): number;
-
-    /**
-      * Returns the nearest single precision float representation of a number.
-      * @param x A numeric expression.
-      */
-    fround(x: number): number;
-
-    /**
-      * Returns an implementation-dependent approximation to the cube root of number.
-      * @param x A numeric expression.
-      */
-    cbrt(x: number): number;
-}
-
-interface PromiseLike<T> {
-    /**
-    * Attaches callbacks for the resolution and/or rejection of the Promise.
-    * @param onfulfilled The callback to execute when the Promise is resolved.
-    * @param onrejected The callback to execute when the Promise is rejected.
-    * @returns A Promise for the completion of which ever callback is executed.
-    */
-    then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>;
-    then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>;
-}
-
-/**
- * Represents the completion of an asynchronous operation
- */
-interface Promise<T> {
-    /**
-    * Attaches callbacks for the resolution and/or rejection of the Promise.
-    * @param onfulfilled The callback to execute when the Promise is resolved.
-    * @param onrejected The callback to execute when the Promise is rejected.
-    * @returns A Promise for the completion of which ever callback is executed.
-    */
-    then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>;
-    then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): Promise<TResult>;
-
-    /**
-     * Attaches a callback for only the rejection of the Promise.
-     * @param onrejected The callback to execute when the Promise is rejected.
-     * @returns A Promise for the completion of the callback.
-     */
-    catch(onrejected?: (reason: any) => T | PromiseLike<T>): Promise<T>;
-    catch(onrejected?: (reason: any) => void): Promise<T>;
-}
-
-interface PromiseConstructor {
-    /**
-      * A reference to the prototype.
-      */
-    prototype: Promise<any>;
-
-    /**
-     * Creates a new Promise.
-     * @param executor A callback used to initialize the promise. This callback is passed two arguments:
-     * a resolve callback used resolve the promise with a value or the result of another promise,
-     * and a reject callback used to reject the promise with a provided reason or error.
-     */
-    new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
-
-    /**
-     * Creates a Promise that is resolved with an array of results when all of the provided Promises
-     * resolve, or rejected when any Promise is rejected.
-     * @param values An array of Promises.
-     * @returns A new Promise.
-     */
-    all<T>(values: IterableShim<T | PromiseLike<T>>): Promise<T[]>;
-
-    /**
-     * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
-     * or rejected.
-     * @param values An array of Promises.
-     * @returns A new Promise.
-     */
-    race<T>(values: IterableShim<T | PromiseLike<T>>): Promise<T>;
-
-    /**
-     * Creates a new rejected promise for the provided reason.
-     * @param reason The reason the promise was rejected.
-     * @returns A new rejected Promise.
-     */
-    reject(reason: any): Promise<void>;
-
-    /**
-     * Creates a new rejected promise for the provided reason.
-     * @param reason The reason the promise was rejected.
-     * @returns A new rejected Promise.
-     */
-    reject<T>(reason: any): Promise<T>;
-
-    /**
-      * Creates a new resolved promise for the provided value.
-      * @param value A promise.
-      * @returns A promise whose internal state matches the provided promise.
-      */
-    resolve<T>(value: T | PromiseLike<T>): Promise<T>;
-
-    /**
-     * Creates a new resolved promise .
-     * @returns A resolved promise.
-     */
-    resolve(): Promise<void>;
-}
-
-declare var Promise: PromiseConstructor;
-
-interface Map<K, V> {
-    clear(): void;
-    delete(key: K): boolean;
-    forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void;
-    get(key: K): V;
-    has(key: K): boolean;
-    set(key: K, value?: V): Map<K, V>;
-    size: number;
-    entries(): IterableIteratorShim<[K, V]>;
-    keys(): IterableIteratorShim<K>;
-    values(): IterableIteratorShim<V>;
-}
-
-interface MapConstructor {
-    new <K, V>(): Map<K, V>;
-    new <K, V>(iterable: IterableShim<[K, V]>): Map<K, V>;
-    prototype: Map<any, any>;
-}
-
-declare var Map: MapConstructor;
-
-interface Set<T> {
-    add(value: T): Set<T>;
-    clear(): void;
-    delete(value: T): boolean;
-    forEach(callbackfn: (value: T, index: T, set: Set<T>) => void, thisArg?: any): void;
-    has(value: T): boolean;
-    size: number;
-    entries(): IterableIteratorShim<[T, T]>;
-    keys(): IterableIteratorShim<T>;
-    values(): IterableIteratorShim<T>;
-    '_es6-shim iterator_'(): IterableIteratorShim<T>;
-}
-
-interface SetConstructor {
-    new <T>(): Set<T>;
-    new <T>(iterable: IterableShim<T>): Set<T>;
-    prototype: Set<any>;
-}
-
-declare var Set: SetConstructor;
-
-interface WeakMap<K, V> {
-    delete(key: K): boolean;
-    get(key: K): V;
-    has(key: K): boolean;
-    set(key: K, value?: V): WeakMap<K, V>;
-}
-
-interface WeakMapConstructor {
-    new <K, V>(): WeakMap<K, V>;
-    new <K, V>(iterable: IterableShim<[K, V]>): WeakMap<K, V>;
-    prototype: WeakMap<any, any>;
-}
-
-declare var WeakMap: WeakMapConstructor;
-
-interface WeakSet<T> {
-    add(value: T): WeakSet<T>;
-    delete(value: T): boolean;
-    has(value: T): boolean;
-}
-
-interface WeakSetConstructor {
-    new <T>(): WeakSet<T>;
-    new <T>(iterable: IterableShim<T>): WeakSet<T>;
-    prototype: WeakSet<any>;
-}
-
-declare var WeakSet: WeakSetConstructor;
-
-declare namespace Reflect {
-    function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
-    function construct(target: Function, argumentsList: ArrayLike<any>): any;
-    function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
-    function deleteProperty(target: any, propertyKey: PropertyKey): boolean;
-    function enumerate(target: any): IterableIteratorShim<any>;
-    function get(target: any, propertyKey: PropertyKey, receiver?: any): any;
-    function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor;
-    function getPrototypeOf(target: any): any;
-    function has(target: any, propertyKey: PropertyKey): boolean;
-    function isExtensible(target: any): boolean;
-    function ownKeys(target: any): Array<PropertyKey>;
-    function preventExtensions(target: any): boolean;
-    function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
-    function setPrototypeOf(target: any, proto: any): boolean;
-}
-
-declare module "es6-shim" {
-    var String: StringConstructor;
-    var Array: ArrayConstructor;
-    var Number: NumberConstructor;
-    var Math: Math;
-    var Object: ObjectConstructor;
-    var Map: MapConstructor;
-    var Set: SetConstructor;
-    var WeakMap: WeakMapConstructor;
-    var WeakSet: WeakSetConstructor;
-    var Promise: PromiseConstructor;
-    namespace Reflect {
-        function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
-        function construct(target: Function, argumentsList: ArrayLike<any>): any;
-        function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
-        function deleteProperty(target: any, propertyKey: PropertyKey): boolean;
-        function enumerate(target: any): Iterator<any>;
-        function get(target: any, propertyKey: PropertyKey, receiver?: any): any;
-        function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor;
-        function getPrototypeOf(target: any): any;
-        function has(target: any, propertyKey: PropertyKey): boolean;
-        function isExtensible(target: any): boolean;
-        function ownKeys(target: any): Array<PropertyKey>;
-        function preventExtensions(target: any): boolean;
-        function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
-        function setPrototypeOf(target: any, proto: any): boolean;
-    }
-}
diff --git a/typings/globals/es6-shim/typings.json b/typings/globals/es6-shim/typings.json
deleted file mode 100644
index 9a84847..0000000
--- a/typings/globals/es6-shim/typings.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "resolution": "main",
-  "tree": {
-    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/9807d9b701f58be068cb07833d2b24235351d052/es6-shim/es6-shim.d.ts",
-    "raw": "registry:dt/es6-shim#0.31.2+20160602141504",
-    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/9807d9b701f58be068cb07833d2b24235351d052/es6-shim/es6-shim.d.ts"
-  }
-}
diff --git a/typings/globals/jasmine/index.d.ts b/typings/globals/jasmine/index.d.ts
deleted file mode 100644
index 3e63179..0000000
--- a/typings/globals/jasmine/index.d.ts
+++ /dev/null
@@ -1,489 +0,0 @@
-// Generated by typings
-// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/dc9dabe74a5be62613b17a3605309783a12ff28a/jasmine/jasmine.d.ts
-declare function describe(description: string, specDefinitions: () => void): void;
-declare function fdescribe(description: string, specDefinitions: () => void): void;
-declare function xdescribe(description: string, specDefinitions: () => void): void;
-
-declare function it(expectation: string, assertion?: () => void, timeout?: number): void;
-declare function it(expectation: string, assertion?: (done: () => void) => void, timeout?: number): void;
-declare function fit(expectation: string, assertion?: () => void, timeout?: number): void;
-declare function fit(expectation: string, assertion?: (done: () => void) => void, timeout?: number): void;
-declare function xit(expectation: string, assertion?: () => void, timeout?: number): void;
-declare function xit(expectation: string, assertion?: (done: () => void) => void, timeout?: number): void;
-
-/** If you call the function pending anywhere in the spec body, no matter the expectations, the spec will be marked pending. */
-declare function pending(reason?: string): void;
-
-declare function beforeEach(action: () => void, timeout?: number): void;
-declare function beforeEach(action: (done: () => void) => void, timeout?: number): void;
-declare function afterEach(action: () => void, timeout?: number): void;
-declare function afterEach(action: (done: () => void) => void, timeout?: number): void;
-
-declare function beforeAll(action: () => void, timeout?: number): void;
-declare function beforeAll(action: (done: () => void) => void, timeout?: number): void;
-declare function afterAll(action: () => void, timeout?: number): void;
-declare function afterAll(action: (done: () => void) => void, timeout?: number): void;
-
-declare function expect(spy: Function): jasmine.Matchers;
-declare function expect(actual: any): jasmine.Matchers;
-
-declare function fail(e?: any): void;
-
-declare function spyOn(object: any, method: string): jasmine.Spy;
-
-declare function runs(asyncMethod: Function): void;
-declare function waitsFor(latchMethod: () => boolean, failureMessage?: string, timeout?: number): void;
-declare function waits(timeout?: number): void;
-
-declare module jasmine {
-
-    var clock: () => Clock;
-
-    function any(aclass: any): Any;
-    function anything(): Any;
-    function arrayContaining(sample: any[]): ArrayContaining;
-    function objectContaining(sample: any): ObjectContaining;
-    function createSpy(name: string, originalFn?: Function): Spy;
-    function createSpyObj(baseName: string, methodNames: any[]): any;
-    function createSpyObj<T>(baseName: string, methodNames: any[]): T;
-    function pp(value: any): string;
-    function getEnv(): Env;
-    function addCustomEqualityTester(equalityTester: CustomEqualityTester): void;
-    function addMatchers(matchers: CustomMatcherFactories): void;
-    function stringMatching(str: string): Any;
-    function stringMatching(str: RegExp): Any;
-
-    interface Any {
-
-        new (expectedClass: any): any;
-
-        jasmineMatches(other: any): boolean;
-        jasmineToString(): string;
-    }
-
-    // taken from TypeScript lib.core.es6.d.ts, applicable to CustomMatchers.contains()
-    interface ArrayLike<T> {
-        length: number;
-        [n: number]: T;
-    }
-
-    interface ArrayContaining {
-        new (sample: any[]): any;
-
-        asymmetricMatch(other: any): boolean;
-        jasmineToString(): string;
-    }
-
-    interface ObjectContaining {
-        new (sample: any): any;
-
-        jasmineMatches(other: any, mismatchKeys: any[], mismatchValues: any[]): boolean;
-        jasmineToString(): string;
-    }
-
-    interface Block {
-
-        new (env: Env, func: SpecFunction, spec: Spec): any;
-
-        execute(onComplete: () => void): void;
-    }
-
-    interface WaitsBlock extends Block {
-        new (env: Env, timeout: number, spec: Spec): any;
-    }
-
-    interface WaitsForBlock extends Block {
-        new (env: Env, timeout: number, latchFunction: SpecFunction, message: string, spec: Spec): any;
-    }
-
-    interface Clock {
-        install(): void;
-        uninstall(): void;
-        /** Calls to any registered callback are triggered when the clock is ticked forward via the jasmine.clock().tick function, which takes a number of milliseconds. */
-        tick(ms: number): void;
-        mockDate(date?: Date): void;
-    }
-
-    interface CustomEqualityTester {
-        (first: any, second: any): boolean;
-    }
-
-    interface CustomMatcher {
-        compare<T>(actual: T, expected: T): CustomMatcherResult;
-        compare(actual: any, expected: any): CustomMatcherResult;
-    }
-
-    interface CustomMatcherFactory {
-        (util: MatchersUtil, customEqualityTesters: Array<CustomEqualityTester>): CustomMatcher;
-    }
-
-    interface CustomMatcherFactories {
-        [index: string]: CustomMatcherFactory;
-    }
-
-    interface CustomMatcherResult {
-        pass: boolean;
-        message?: string;
-    }
-
-    interface MatchersUtil {
-        equals(a: any, b: any, customTesters?: Array<CustomEqualityTester>): boolean;
-        contains<T>(haystack: ArrayLike<T> | string, needle: any, customTesters?: Array<CustomEqualityTester>): boolean;
-        buildFailureMessage(matcherName: string, isNot: boolean, actual: any, ...expected: Array<any>): string;
-    }
-
-    interface Env {
-        setTimeout: any;
-        clearTimeout: void;
-        setInterval: any;
-        clearInterval: void;
-        updateInterval: number;
-
-        currentSpec: Spec;
-
-        matchersClass: Matchers;
-
-        version(): any;
-        versionString(): string;
-        nextSpecId(): number;
-        addReporter(reporter: Reporter): void;
-        execute(): void;
-        describe(description: string, specDefinitions: () => void): Suite;
-        // ddescribe(description: string, specDefinitions: () => void): Suite; Not a part of jasmine. Angular team adds these
-        beforeEach(beforeEachFunction: () => void): void;
-        beforeAll(beforeAllFunction: () => void): void;
-        currentRunner(): Runner;
-        afterEach(afterEachFunction: () => void): void;
-        afterAll(afterAllFunction: () => void): void;
-        xdescribe(desc: string, specDefinitions: () => void): XSuite;
-        it(description: string, func: () => void): Spec;
-        // iit(description: string, func: () => void): Spec; Not a part of jasmine. Angular team adds these
-        xit(desc: string, func: () => void): XSpec;
-        compareRegExps_(a: RegExp, b: RegExp, mismatchKeys: string[], mismatchValues: string[]): boolean;
-        compareObjects_(a: any, b: any, mismatchKeys: string[], mismatchValues: string[]): boolean;
-        equals_(a: any, b: any, mismatchKeys: string[], mismatchValues: string[]): boolean;
-        contains_(haystack: any, needle: any): boolean;
-        addCustomEqualityTester(equalityTester: CustomEqualityTester): void;
-        addMatchers(matchers: CustomMatcherFactories): void;
-        specFilter(spec: Spec): boolean;
-    }
-
-    interface FakeTimer {
-
-        new (): any;
-
-        reset(): void;
-        tick(millis: number): void;
-        runFunctionsWithinRange(oldMillis: number, nowMillis: number): void;
-        scheduleFunction(timeoutKey: any, funcToCall: () => void, millis: number, recurring: boolean): void;
-    }
-
-    interface HtmlReporter {
-        new (): any;
-    }
-
-    interface HtmlSpecFilter {
-        new (): any;
-    }
-
-    interface Result {
-        type: string;
-    }
-
-    interface NestedResults extends Result {
-        description: string;
-
-        totalCount: number;
-        passedCount: number;
-        failedCount: number;
-
-        skipped: boolean;
-
-        rollupCounts(result: NestedResults): void;
-        log(values: any): void;
-        getItems(): Result[];
-        addResult(result: Result): void;
-        passed(): boolean;
-    }
-
-    interface MessageResult extends Result  {
-        values: any;
-        trace: Trace;
-    }
-
-    interface ExpectationResult extends Result  {
-        matcherName: string;
-        passed(): boolean;
-        expected: any;
-        actual: any;
-        message: string;
-        trace: Trace;
-    }
-
-    interface Trace {
-        name: string;
-        message: string;
-        stack: any;
-    }
-
-    interface PrettyPrinter {
-
-        new (): any;
-
-        format(value: any): void;
-        iterateObject(obj: any, fn: (property: string, isGetter: boolean) => void): void;
-        emitScalar(value: any): void;
-        emitString(value: string): void;
-        emitArray(array: any[]): void;
-        emitObject(obj: any): void;
-        append(value: any): void;
-    }
-
-    interface StringPrettyPrinter extends PrettyPrinter {
-    }
-
-    interface Queue {
-
-        new (env: any): any;
-
-        env: Env;
-        ensured: boolean[];
-        blocks: Block[];
-        running: boolean;
-        index: number;
-        offset: number;
-        abort: boolean;
-
-        addBefore(block: Block, ensure?: boolean): void;
-        add(block: any, ensure?: boolean): void;
-        insertNext(block: any, ensure?: boolean): void;
-        start(onComplete?: () => void): void;
-        isRunning(): boolean;
-        next_(): void;
-        results(): NestedResults;
-    }
-
-    interface Matchers {
-
-        new (env: Env, actual: any, spec: Env, isNot?: boolean): any;
-
-        env: Env;
-        actual: any;
-        spec: Env;
-        isNot?: boolean;
-        message(): any;
-
-        toBe(expected: any, expectationFailOutput?: any): boolean;
-        toEqual(expected: any, expectationFailOutput?: any): boolean;
-        toMatch(expected: string | RegExp, expectationFailOutput?: any): boolean;
-        toBeDefined(expectationFailOutput?: any): boolean;
-        toBeUndefined(expectationFailOutput?: any): boolean;
-        toBeNull(expectationFailOutput?: any): boolean;
-        toBeNaN(): boolean;
-        toBeTruthy(expectationFailOutput?: any): boolean;
-        toBeFalsy(expectationFailOutput?: any): boolean;
-        toHaveBeenCalled(): boolean;
-        toHaveBeenCalledWith(...params: any[]): boolean;
-        toContain(expected: any, expectationFailOutput?: any): boolean;
-        toBeLessThan(expected: number, expectationFailOutput?: any): boolean;
-        toBeGreaterThan(expected: number, expectationFailOutput?: any): boolean;
-        toBeCloseTo(expected: number, precision: any, expectationFailOutput?: any): boolean;
-        toThrow(expected?: any): boolean;
-        toThrowError(message?: string | RegExp): boolean;
-        toThrowError(expected?: Error, message?: string | RegExp): boolean;
-        not: Matchers;
-
-        Any: Any;
-    }
-
-    interface Reporter {
-        reportRunnerStarting(runner: Runner): void;
-        reportRunnerResults(runner: Runner): void;
-        reportSuiteResults(suite: Suite): void;
-        reportSpecStarting(spec: Spec): void;
-        reportSpecResults(spec: Spec): void;
-        log(str: string): void;
-    }
-
-    interface MultiReporter extends Reporter {
-        addReporter(reporter: Reporter): void;
-    }
-
-    interface Runner {
-
-        new (env: Env): any;
-
-        execute(): void;
-        beforeEach(beforeEachFunction: SpecFunction): void;
-        afterEach(afterEachFunction: SpecFunction): void;
-        beforeAll(beforeAllFunction: SpecFunction): void;
-        afterAll(afterAllFunction: SpecFunction): void;
-        finishCallback(): void;
-        addSuite(suite: Suite): void;
-        add(block: Block): void;
-        specs(): Spec[];
-        suites(): Suite[];
-        topLevelSuites(): Suite[];
-        results(): NestedResults;
-    }
-
-    interface SpecFunction {
-        (spec?: Spec): void;
-    }
-
-    interface SuiteOrSpec {
-        id: number;
-        env: Env;
-        description: string;
-        queue: Queue;
-    }
-
-    interface Spec extends SuiteOrSpec {
-
-        new (env: Env, suite: Suite, description: string): any;
-
-        suite: Suite;
-
-        afterCallbacks: SpecFunction[];
-        spies_: Spy[];
-
-        results_: NestedResults;
-        matchersClass: Matchers;
-
-        getFullName(): string;
-        results(): NestedResults;
-        log(arguments: any): any;
-        runs(func: SpecFunction): Spec;
-        addToQueue(block: Block): void;
-        addMatcherResult(result: Result): void;
-        expect(actual: any): any;
-        waits(timeout: number): Spec;
-        waitsFor(latchFunction: SpecFunction, timeoutMessage?: string, timeout?: number): Spec;
-        fail(e?: any): void;
-        getMatchersClass_(): Matchers;
-        addMatchers(matchersPrototype: CustomMatcherFactories): void;
-        finishCallback(): void;
-        finish(onComplete?: () => void): void;
-        after(doAfter: SpecFunction): void;
-        execute(onComplete?: () => void): any;
-        addBeforesAndAftersToQueue(): void;
-        explodes(): void;
-        spyOn(obj: any, methodName: string, ignoreMethodDoesntExist: boolean): Spy;
-        removeAllSpies(): void;
-    }
-
-    interface XSpec {
-        id: number;
-        runs(): void;
-    }
-
-    interface Suite extends SuiteOrSpec {
-
-        new (env: Env, description: string, specDefinitions: () => void, parentSuite: Suite): any;
-
-        parentSuite: Suite;
-
-        getFullName(): string;
-        finish(onComplete?: () => void): void;
-        beforeEach(beforeEachFunction: SpecFunction): void;
-        afterEach(afterEachFunction: SpecFunction): void;
-        beforeAll(beforeAllFunction: SpecFunction): void;
-        afterAll(afterAllFunction: SpecFunction): void;
-        results(): NestedResults;
-        add(suiteOrSpec: SuiteOrSpec): void;
-        specs(): Spec[];
-        suites(): Suite[];
-        children(): any[];
-        execute(onComplete?: () => void): void;
-    }
-
-    interface XSuite {
-        execute(): void;
-    }
-
-    interface Spy {
-        (...params: any[]): any;
-
-        identity: string;
-        and: SpyAnd;
-        calls: Calls;
-        mostRecentCall: { args: any[]; };
-        argsForCall: any[];
-        wasCalled: boolean;
-    }
-
-    interface SpyAnd {
-        /** By chaining the spy with and.callThrough, the spy will still track all calls to it but in addition it will delegate to the actual implementation. */
-        callThrough(): Spy;
-        /** By chaining the spy with and.returnValue, all calls to the function will return a specific value. */
-        returnValue(val: any): void;
-        /** By chaining the spy with and.callFake, all calls to the spy will delegate to the supplied function. */
-        callFake(fn: Function): Spy;
-        /** By chaining the spy with and.throwError, all calls to the spy will throw the specified value. */
-        throwError(msg: string): void;
-        /** When a calling strategy is used for a spy, the original stubbing behavior can be returned at any time with and.stub. */
-        stub(): Spy;
-    }
-
-    interface Calls {
-        /** By chaining the spy with calls.any(), will return false if the spy has not been called at all, and then true once at least one call happens. **/
-        any(): boolean;
-        /** By chaining the spy with calls.count(), will return the number of times the spy was called **/
-        count(): number;
-        /** By chaining the spy with calls.argsFor(), will return the arguments passed to call number index **/
-        argsFor(index: number): any[];
-        /** By chaining the spy with calls.allArgs(), will return the arguments to all calls **/
-        allArgs(): any[];
-        /** By chaining the spy with calls.all(), will return the context (the this) and arguments passed all calls **/
-        all(): CallInfo[];
-        /** By chaining the spy with calls.mostRecent(), will return the context (the this) and arguments for the most recent call **/
-        mostRecent(): CallInfo;
-        /** By chaining the spy with calls.first(), will return the context (the this) and arguments for the first call **/
-        first(): CallInfo;
-        /** By chaining the spy with calls.reset(), will clears all tracking for a spy **/
-        reset(): void;
-    }
-
-    interface CallInfo {
-        /** The context (the this) for the call */
-        object: any;
-        /** All arguments passed to the call */
-        args: any[];
-    }
-
-    interface Util {
-        inherit(childClass: Function, parentClass: Function): any;
-        formatException(e: any): any;
-        htmlEscape(str: string): string;
-        argsToArray(args: any): any;
-        extend(destination: any, source: any): any;
-    }
-
-    interface JsApiReporter extends Reporter {
-
-        started: boolean;
-        finished: boolean;
-        result: any;
-        messages: any;
-
-        new (): any;
-
-        suites(): Suite[];
-        summarize_(suiteOrSpec: SuiteOrSpec): any;
-        results(): any;
-        resultsForSpec(specId: any): any;
-        log(str: any): any;
-        resultsForSpecs(specIds: any): any;
-        summarizeResult_(result: any): any;
-    }
-
-    interface Jasmine {
-        Spec: Spec;
-        clock: Clock;
-        util: Util;
-    }
-
-    export var HtmlReporter: HtmlReporter;
-    export var HtmlSpecFilter: HtmlSpecFilter;
-    export var DEFAULT_TIMEOUT_INTERVAL: number;
-}
diff --git a/typings/globals/jasmine/typings.json b/typings/globals/jasmine/typings.json
deleted file mode 100644
index b8e2a53..0000000
--- a/typings/globals/jasmine/typings.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "resolution": "main",
-  "tree": {
-    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/dc9dabe74a5be62613b17a3605309783a12ff28a/jasmine/jasmine.d.ts",
-    "raw": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#dc9dabe74a5be62613b17a3605309783a12ff28a",
-    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/dc9dabe74a5be62613b17a3605309783a12ff28a/jasmine/jasmine.d.ts"
-  }
-}
diff --git a/typings/globals/jquery/index.d.ts b/typings/globals/jquery/index.d.ts
deleted file mode 100644
index cfe1b5a..0000000
--- a/typings/globals/jquery/index.d.ts
+++ /dev/null
@@ -1,3168 +0,0 @@
-// Generated by typings
-// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/dc9dabe74a5be62613b17a3605309783a12ff28a/jquery/jquery.d.ts
-interface JQueryAjaxSettings {
-    /**
-     * The content type sent in the request header that tells the server what kind of response it will accept in return. If the accepts setting needs modification, it is recommended to do so once in the $.ajaxSetup() method.
-     */
-    accepts?: any;
-    /**
-     * By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active. As of jQuery 1.8, the use of async: false with jqXHR ($.Deferred) is deprecated; you must use the success/error/complete callback options instead of the corresponding methods of the jqXHR object such as jqXHR.done() or the deprecated jqXHR.success().
-     */
-    async?: boolean;
-    /**
-     * A pre-request callback function that can be used to modify the jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object before it is sent. Use this to set custom headers, etc. The jqXHR and settings objects are passed as arguments. This is an Ajax Event. Returning false in the beforeSend function will cancel the request. As of jQuery 1.5, the beforeSend option will be called regardless of the type of request.
-     */
-    beforeSend? (jqXHR: JQueryXHR, settings: JQueryAjaxSettings): any;
-    /**
-     * If set to false, it will force requested pages not to be cached by the browser. Note: Setting cache to false will only work correctly with HEAD and GET requests. It works by appending "_={timestamp}" to the GET parameters. The parameter is not needed for other types of requests, except in IE8 when a POST is made to a URL that has already been requested by a GET.
-     */
-    cache?: boolean;
-    /**
-     * A function to be called when the request finishes (after success and error callbacks are executed). The function gets passed two arguments: The jqXHR (in jQuery 1.4.x, XMLHTTPRequest) object and a string categorizing the status of the request ("success", "notmodified", "error", "timeout", "abort", or "parsererror"). As of jQuery 1.5, the complete setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event.
-     */
-    complete? (jqXHR: JQueryXHR, textStatus: string): any;
-    /**
-     * An object of string/regular-expression pairs that determine how jQuery will parse the response, given its content type. (version added: 1.5)
-     */
-    contents?: { [key: string]: any; };
-    //According to jQuery.ajax source code, ajax's option actually allows contentType to set to "false"
-    // https://github.com/borisyankov/DefinitelyTyped/issues/742
-    /**
-     * When sending data to the server, use this content type. Default is "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly pass in a content-type to $.ajax(), then it is always sent to the server (even if no data is sent). The W3C XMLHttpRequest specification dictates that the charset is always UTF-8; specifying another charset will not force the browser to change the encoding.
-     */
-    contentType?: any;
-    /**
-     * This object will be made the context of all Ajax-related callbacks. By default, the context is an object that represents the ajax settings used in the call ($.ajaxSettings merged with the settings passed to $.ajax).
-     */
-    context?: any;
-    /**
-     * An object containing dataType-to-dataType converters. Each converter's value is a function that returns the transformed value of the response. (version added: 1.5)
-     */
-    converters?: { [key: string]: any; };
-    /**
-     * If you wish to force a crossDomain request (such as JSONP) on the same domain, set the value of crossDomain to true. This allows, for example, server-side redirection to another domain. (version added: 1.5)
-     */
-    crossDomain?: boolean;
-    /**
-     * Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests. See processData option to prevent this automatic processing. Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same key based on the value of the traditional setting (described below).
-     */
-    data?: any;
-    /**
-     * A function to be used to handle the raw response data of XMLHttpRequest.This is a pre-filtering function to sanitize the response. You should return the sanitized data. The function accepts two arguments: The raw data returned from the server and the 'dataType' parameter.
-     */
-    dataFilter? (data: any, ty: any): any;
-    /**
-     * The type of data that you're expecting back from the server. If none is specified, jQuery will try to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string). 
-     */
-    dataType?: string;
-    /**
-     * A function to be called if the request fails. The function receives three arguments: The jqXHR (in jQuery 1.4.x, XMLHttpRequest) object, a string describing the type of error that occurred and an optional exception object, if one occurred. Possible values for the second argument (besides null) are "timeout", "error", "abort", and "parsererror". When an HTTP error occurs, errorThrown receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." As of jQuery 1.5, the error setting can accept an array of functions. Each function will be called in turn. Note: This handler is not called for cross-domain script and cross-domain JSONP requests. This is an Ajax Event.
-     */
-    error? (jqXHR: JQueryXHR, textStatus: string, errorThrown: string): any;
-    /**
-     * Whether to trigger global Ajax event handlers for this request. The default is true. Set to false to prevent the global handlers like ajaxStart or ajaxStop from being triggered. This can be used to control various Ajax Events.
-     */
-    global?: boolean;
-    /**
-     * An object of additional header key/value pairs to send along with requests using the XMLHttpRequest transport. The header X-Requested-With: XMLHttpRequest is always added, but its default XMLHttpRequest value can be changed here. Values in the headers setting can also be overwritten from within the beforeSend function. (version added: 1.5)
-     */
-    headers?: { [key: string]: any; };
-    /**
-     * Allow the request to be successful only if the response has changed since the last request. This is done by checking the Last-Modified header. Default value is false, ignoring the header. In jQuery 1.4 this technique also checks the 'etag' specified by the server to catch unmodified data.
-     */
-    ifModified?: boolean;
-    /**
-     * Allow the current environment to be recognized as "local," (e.g. the filesystem), even if jQuery does not recognize it as such by default. The following protocols are currently recognized as local: file, *-extension, and widget. If the isLocal setting needs modification, it is recommended to do so once in the $.ajaxSetup() method. (version added: 1.5.1)
-     */
-    isLocal?: boolean;
-    /**
-     * Override the callback function name in a jsonp request. This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation. In this case, you should also explicitly set the jsonpCallback setting. For example, { jsonp: false, jsonpCallback: "callbackName" }
-     */
-    jsonp?: any;
-    /**
-     * Specify the callback function name for a JSONP request. This value will be used instead of the random name automatically generated by jQuery. It is preferable to let jQuery generate a unique name as it'll make it easier to manage the requests and provide callbacks and error handling. You may want to specify the callback when you want to enable better browser caching of GET requests. As of jQuery 1.5, you can also use a function for this setting, in which case the value of jsonpCallback is set to the return value of that function.
-     */
-    jsonpCallback?: any;
-    /**
-     * The HTTP method to use for the request (e.g. "POST", "GET", "PUT"). (version added: 1.9.0)
-     */
-    method?: string;
-    /**
-     * A mime type to override the XHR mime type. (version added: 1.5.1)
-     */
-    mimeType?: string;
-    /**
-     * A password to be used with XMLHttpRequest in response to an HTTP access authentication request.
-     */
-    password?: string;
-    /**
-     * By default, data passed in to the data option as an object (technically, anything other than a string) will be processed and transformed into a query string, fitting to the default content-type "application/x-www-form-urlencoded". If you want to send a DOMDocument, or other non-processed data, set this option to false.
-     */
-    processData?: boolean;
-    /**
-     * Only applies when the "script" transport is used (e.g., cross-domain requests with "jsonp" or "script" dataType and "GET" type). Sets the charset attribute on the script tag used in the request. Used when the character set on the local page is not the same as the one on the remote script.
-     */
-    scriptCharset?: string;
-    /**
-     * An object of numeric HTTP codes and functions to be called when the response has the corresponding code. f the request is successful, the status code functions take the same parameters as the success callback; if it results in an error (including 3xx redirect), they take the same parameters as the error callback. (version added: 1.5)
-     */
-    statusCode?: { [key: string]: any; };
-    /**
-     * A function to be called if the request succeeds. The function gets passed three arguments: The data returned from the server, formatted according to the dataType parameter; a string describing the status; and the jqXHR (in jQuery 1.4.x, XMLHttpRequest) object. As of jQuery 1.5, the success setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event.
-     */
-    success? (data: any, textStatus: string, jqXHR: JQueryXHR): any;
-    /**
-     * Set a timeout (in milliseconds) for the request. This will override any global timeout set with $.ajaxSetup(). The timeout period starts at the point the $.ajax call is made; if several other requests are in progress and the browser has no connections available, it is possible for a request to time out before it can be sent. In jQuery 1.4.x and below, the XMLHttpRequest object will be in an invalid state if the request times out; accessing any object members may throw an exception. In Firefox 3.0+ only, script and JSONP requests cannot be cancelled by a timeout; the script will run even if it arrives after the timeout period.
-     */
-    timeout?: number;
-    /**
-     * Set this to true if you wish to use the traditional style of param serialization.
-     */
-    traditional?: boolean;
-    /**
-     * The type of request to make ("POST" or "GET"), default is "GET". Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers.
-     */
-    type?: string;
-    /**
-     * A string containing the URL to which the request is sent.
-     */
-    url?: string;
-    /**
-     * A username to be used with XMLHttpRequest in response to an HTTP access authentication request.
-     */
-    username?: string;
-    /**
-     * Callback for creating the XMLHttpRequest object. Defaults to the ActiveXObject when available (IE), the XMLHttpRequest otherwise. Override to provide your own implementation for XMLHttpRequest or enhancements to the factory.
-     */
-    xhr?: any;
-    /**
-     * An object of fieldName-fieldValue pairs to set on the native XHR object. For example, you can use it to set withCredentials to true for cross-domain requests if needed. In jQuery 1.5, the withCredentials property was not propagated to the native XHR and thus CORS requests requiring it would ignore this flag. For this reason, we recommend using jQuery 1.5.1+ should you require the use of it. (version added: 1.5.1)
-     */
-    xhrFields?: { [key: string]: any; };
-}
-
-/**
- * Interface for the jqXHR object
- */
-interface JQueryXHR extends XMLHttpRequest, JQueryPromise<any> {
-    /**
-     * The .overrideMimeType() method may be used in the beforeSend() callback function, for example, to modify the response content-type header. As of jQuery 1.5.1, the jqXHR object also contains the overrideMimeType() method (it was available in jQuery 1.4.x, as well, but was temporarily removed in jQuery 1.5). 
-     */
-    overrideMimeType(mimeType: string): any;
-    /**
-     * Cancel the request. 
-     *
-     * @param statusText A string passed as the textStatus parameter for the done callback. Default value: "canceled"
-     */
-    abort(statusText?: string): void;
-    /**
-     * Incorporates the functionality of the .done() and .fail() methods, allowing (as of jQuery 1.8) the underlying Promise to be manipulated. Refer to deferred.then() for implementation details.
-     */
-    then(doneCallback: (data: any, textStatus: string, jqXHR: JQueryXHR) => void, failCallback?: (jqXHR: JQueryXHR, textStatus: string, errorThrown: any) => void): JQueryPromise<any>;
-    /**
-     * Property containing the parsed response if the response Content-Type is json
-     */
-    responseJSON?: any;
-    /**
-     * A function to be called if the request fails.
-     */
-    error(xhr: JQueryXHR, textStatus: string, errorThrown: string): void;
-}
-
-/**
- * Interface for the JQuery callback
- */
-interface JQueryCallback {
-    /**
-     * Add a callback or a collection of callbacks to a callback list.
-     * 
-     * @param callbacks A function, or array of functions, that are to be added to the callback list.
-     */
-    add(callbacks: Function): JQueryCallback;
-    /**
-     * Add a callback or a collection of callbacks to a callback list.
-     * 
-     * @param callbacks A function, or array of functions, that are to be added to the callback list.
-     */
-    add(callbacks: Function[]): JQueryCallback;
-
-    /**
-     * Disable a callback list from doing anything more.
-     */
-    disable(): JQueryCallback;
-
-    /**
-     * Determine if the callbacks list has been disabled.
-     */
-    disabled(): boolean;
-
-    /**
-     * Remove all of the callbacks from a list.
-     */
-    empty(): JQueryCallback;
-
-    /**
-     * Call all of the callbacks with the given arguments
-     * 
-     * @param arguments The argument or list of arguments to pass back to the callback list.
-     */
-    fire(...arguments: any[]): JQueryCallback;
-
-    /**
-     * Determine if the callbacks have already been called at least once.
-     */
-    fired(): boolean;
-
-    /**
-     * Call all callbacks in a list with the given context and arguments.
-     * 
-     * @param context A reference to the context in which the callbacks in the list should be fired.
-     * @param arguments An argument, or array of arguments, to pass to the callbacks in the list.
-     */
-    fireWith(context?: any, args?: any[]): JQueryCallback;
-
-    /**
-     * Determine whether a supplied callback is in a list
-     * 
-     * @param callback The callback to search for.
-     */
-    has(callback: Function): boolean;
-
-    /**
-     * Lock a callback list in its current state.
-     */
-    lock(): JQueryCallback;
-
-    /**
-     * Determine if the callbacks list has been locked.
-     */
-    locked(): boolean;
-
-    /**
-     * Remove a callback or a collection of callbacks from a callback list.
-     * 
-     * @param callbacks A function, or array of functions, that are to be removed from the callback list.
-     */
-    remove(callbacks: Function): JQueryCallback;
-    /**
-     * Remove a callback or a collection of callbacks from a callback list.
-     * 
-     * @param callbacks A function, or array of functions, that are to be removed from the callback list.
-     */
-    remove(callbacks: Function[]): JQueryCallback;
-}
-
-/**
- * Allows jQuery Promises to interop with non-jQuery promises
- */
-interface JQueryGenericPromise<T> {
-    /**
-     * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
-     * 
-     * @param doneFilter A function that is called when the Deferred is resolved.
-     * @param failFilter An optional function that is called when the Deferred is rejected.
-     */
-    then<U>(doneFilter: (value?: T, ...values: any[]) => U|JQueryPromise<U>, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise<U>;
-
-    /**
-     * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
-     * 
-     * @param doneFilter A function that is called when the Deferred is resolved.
-     * @param failFilter An optional function that is called when the Deferred is rejected.
-     */
-    then(doneFilter: (value?: T, ...values: any[]) => void, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise<void>;
-}
-
-/**
- * Interface for the JQuery promise/deferred callbacks
- */
-interface JQueryPromiseCallback<T> {
-    (value?: T, ...args: any[]): void;
-}
-
-interface JQueryPromiseOperator<T, U> {
-    (callback1: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...callbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<U>;
-}
-
-/**
- * Interface for the JQuery promise, part of callbacks
- */
-interface JQueryPromise<T> extends JQueryGenericPromise<T> {
-    /**
-     * Determine the current state of a Deferred object.
-     */
-    state(): string;
-    /**
-     * Add handlers to be called when the Deferred object is either resolved or rejected.
-     * 
-     * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected.
-     * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected.
-     */
-    always(alwaysCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...alwaysCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<T>;
-    /**
-     * Add handlers to be called when the Deferred object is resolved.
-     * 
-     * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved.
-     * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved.
-     */
-    done(doneCallback1?: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...doneCallbackN: Array<JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[]>): JQueryPromise<T>;
-    /**
-     * Add handlers to be called when the Deferred object is rejected.
-     * 
-     * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected.
-     * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected.
-     */
-    fail(failCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...failCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<T>;
-    /**
-     * Add handlers to be called when the Deferred object generates progress notifications.
-     * 
-     * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications.
-     */
-    progress(progressCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...progressCallbackN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryPromise<T>;
-
-    // Deprecated - given no typings
-    pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise<any>;
-}
-
-/**
- * Interface for the JQuery deferred, part of callbacks
- */
-interface JQueryDeferred<T> extends JQueryGenericPromise<T> {
-    /**
-     * Determine the current state of a Deferred object.
-     */
-    state(): string;
-    /**
-     * Add handlers to be called when the Deferred object is either resolved or rejected.
-     * 
-     * @param alwaysCallbacks1 A function, or array of functions, that is called when the Deferred is resolved or rejected.
-     * @param alwaysCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved or rejected.
-     */
-    always(alwaysCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...alwaysCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryDeferred<T>;
-    /**
-     * Add handlers to be called when the Deferred object is resolved.
-     * 
-     * @param doneCallbacks1 A function, or array of functions, that are called when the Deferred is resolved.
-     * @param doneCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is resolved.
-     */
-    done(doneCallback1?: JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[], ...doneCallbackN: Array<JQueryPromiseCallback<T>|JQueryPromiseCallback<T>[]>): JQueryDeferred<T>;
-    /**
-     * Add handlers to be called when the Deferred object is rejected.
-     * 
-     * @param failCallbacks1 A function, or array of functions, that are called when the Deferred is rejected.
-     * @param failCallbacks2 Optional additional functions, or arrays of functions, that are called when the Deferred is rejected.
-     */
-    fail(failCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...failCallbacksN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryDeferred<T>;
-    /**
-     * Add handlers to be called when the Deferred object generates progress notifications.
-     * 
-     * @param progressCallbacks A function, or array of functions, to be called when the Deferred generates progress notifications.
-     */
-    progress(progressCallback1?: JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[], ...progressCallbackN: Array<JQueryPromiseCallback<any>|JQueryPromiseCallback<any>[]>): JQueryDeferred<T>;
-
-    /**
-     * Call the progressCallbacks on a Deferred object with the given args.
-     * 
-     * @param args Optional arguments that are passed to the progressCallbacks.
-     */
-    notify(value?: any, ...args: any[]): JQueryDeferred<T>;
-
-    /**
-     * Call the progressCallbacks on a Deferred object with the given context and args.
-     * 
-     * @param context Context passed to the progressCallbacks as the this object.
-     * @param args Optional arguments that are passed to the progressCallbacks.
-     */
-    notifyWith(context: any, value?: any[]): JQueryDeferred<T>;
-
-    /**
-     * Reject a Deferred object and call any failCallbacks with the given args.
-     * 
-     * @param args Optional arguments that are passed to the failCallbacks.
-     */
-    reject(value?: any, ...args: any[]): JQueryDeferred<T>;
-    /**
-     * Reject a Deferred object and call any failCallbacks with the given context and args.
-     * 
-     * @param context Context passed to the failCallbacks as the this object.
-     * @param args An optional array of arguments that are passed to the failCallbacks.
-     */
-    rejectWith(context: any, value?: any[]): JQueryDeferred<T>;
-
-    /**
-     * Resolve a Deferred object and call any doneCallbacks with the given args.
-     * 
-     * @param value First argument passed to doneCallbacks.
-     * @param args Optional subsequent arguments that are passed to the doneCallbacks.
-     */
-    resolve(value?: T, ...args: any[]): JQueryDeferred<T>;
-
-    /**
-     * Resolve a Deferred object and call any doneCallbacks with the given context and args.
-     * 
-     * @param context Context passed to the doneCallbacks as the this object.
-     * @param args An optional array of arguments that are passed to the doneCallbacks.
-     */
-    resolveWith(context: any, value?: T[]): JQueryDeferred<T>;
-
-    /**
-     * Return a Deferred's Promise object.
-     * 
-     * @param target Object onto which the promise methods have to be attached
-     */
-    promise(target?: any): JQueryPromise<T>;
-
-    // Deprecated - given no typings
-    pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise<any>;
-}
-
-/**
- * Interface of the JQuery extension of the W3C event object
- */
-interface BaseJQueryEventObject extends Event {
-    data: any;
-    delegateTarget: Element;
-    isDefaultPrevented(): boolean;
-    isImmediatePropagationStopped(): boolean;
-    isPropagationStopped(): boolean;
-    namespace: string;
-    originalEvent: Event;
-    preventDefault(): any;
-    relatedTarget: Element;
-    result: any;
-    stopImmediatePropagation(): void;
-    stopPropagation(): void;
-    target: Element;
-    pageX: number;
-    pageY: number;
-    which: number;
-    metaKey: boolean;
-}
-
-interface JQueryInputEventObject extends BaseJQueryEventObject {
-    altKey: boolean;
-    ctrlKey: boolean;
-    metaKey: boolean;
-    shiftKey: boolean;
-}
-
-interface JQueryMouseEventObject extends JQueryInputEventObject {
-    button: number;
-    clientX: number;
-    clientY: number;
-    offsetX: number;
-    offsetY: number;
-    pageX: number;
-    pageY: number;
-    screenX: number;
-    screenY: number;
-}
-
-interface JQueryKeyEventObject extends JQueryInputEventObject {
-    char: any;
-    charCode: number;
-    key: any;
-    keyCode: number;
-}
-
-interface JQueryEventObject extends BaseJQueryEventObject, JQueryInputEventObject, JQueryMouseEventObject, JQueryKeyEventObject{
-}
-
-/*
-    Collection of properties of the current browser
-*/
-
-interface JQuerySupport {
-    ajax?: boolean;
-    boxModel?: boolean;
-    changeBubbles?: boolean;
-    checkClone?: boolean;
-    checkOn?: boolean;
-    cors?: boolean;
-    cssFloat?: boolean;
-    hrefNormalized?: boolean;
-    htmlSerialize?: boolean;
-    leadingWhitespace?: boolean;
-    noCloneChecked?: boolean;
-    noCloneEvent?: boolean;
-    opacity?: boolean;
-    optDisabled?: boolean;
-    optSelected?: boolean;
-    scriptEval? (): boolean;
-    style?: boolean;
-    submitBubbles?: boolean;
-    tbody?: boolean;
-}
-
-interface JQueryParam {
-    /**
-     * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
-     * 
-     * @param obj An array or object to serialize.
-     */
-    (obj: any): string;
-
-    /**
-     * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
-     * 
-     * @param obj An array or object to serialize.
-     * @param traditional A Boolean indicating whether to perform a traditional "shallow" serialization.
-     */
-    (obj: any, traditional: boolean): string;
-}
-
-/**
- * The interface used to construct jQuery events (with $.Event). It is
- * defined separately instead of inline in JQueryStatic to allow
- * overriding the construction function with specific strings
- * returning specific event objects.
- */
-interface JQueryEventConstructor {
-    (name: string, eventProperties?: any): JQueryEventObject;
-    new (name: string, eventProperties?: any): JQueryEventObject;
-}
-
-/**
- * The interface used to specify coordinates.
- */
-interface JQueryCoordinates {
-    left: number;
-    top: number;
-}
-
-/**
- * Elements in the array returned by serializeArray()
- */
-interface JQuerySerializeArrayElement {
-    name: string;
-    value: string;
-}
-
-interface JQueryAnimationOptions { 
-    /**
-     * A string or number determining how long the animation will run.
-     */
-    duration?: any; 
-    /**
-     * A string indicating which easing function to use for the transition.
-     */
-    easing?: string; 
-    /**
-     * A function to call once the animation is complete.
-     */
-    complete?: Function; 
-    /**
-     * A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set.
-     */
-    step?: (now: number, tween: any) => any; 
-    /**
-     * A function to be called after each step of the animation, only once per animated element regardless of the number of animated properties. (version added: 1.8)
-     */
-    progress?: (animation: JQueryPromise<any>, progress: number, remainingMs: number) => any; 
-    /**
-     * A function to call when the animation begins. (version added: 1.8)
-     */
-    start?: (animation: JQueryPromise<any>) => any; 
-    /**
-     * A function to be called when the animation completes (its Promise object is resolved). (version added: 1.8)
-     */
-    done?: (animation: JQueryPromise<any>, jumpedToEnd: boolean) => any; 
-    /**
-     * A function to be called when the animation fails to complete (its Promise object is rejected). (version added: 1.8)
-     */
-    fail?: (animation: JQueryPromise<any>, jumpedToEnd: boolean) => any; 
-    /**
-     * A function to be called when the animation completes or stops without completing (its Promise object is either resolved or rejected). (version added: 1.8)
-     */
-    always?: (animation: JQueryPromise<any>, jumpedToEnd: boolean) => any; 
-    /**
-     * A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it.
-     */
-    queue?: any; 
-    /**
-     * A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. (version added: 1.4)
-     */
-    specialEasing?: Object;
-}
-
-/**
- * Static members of jQuery (those on $ and jQuery themselves)
- */
-interface JQueryStatic {
-
-    /**
-     * Perform an asynchronous HTTP (Ajax) request.
-     *
-     * @param settings A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup().
-     */
-    ajax(settings: JQueryAjaxSettings): JQueryXHR;
-    /**
-     * Perform an asynchronous HTTP (Ajax) request.
-     *
-     * @param url A string containing the URL to which the request is sent.
-     * @param settings A set of key/value pairs that configure the Ajax request. All settings are optional. A default can be set for any option with $.ajaxSetup().
-     */
-    ajax(url: string, settings?: JQueryAjaxSettings): JQueryXHR;
-
-    /**
-     * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().
-     *
-     * @param dataTypes An optional string containing one or more space-separated dataTypes
-     * @param handler A handler to set default values for future Ajax requests.
-     */
-    ajaxPrefilter(dataTypes: string, handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void;
-    /**
-     * Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().
-     *
-     * @param handler A handler to set default values for future Ajax requests.
-     */
-    ajaxPrefilter(handler: (opts: any, originalOpts: JQueryAjaxSettings, jqXHR: JQueryXHR) => any): void;
-
-    ajaxSettings: JQueryAjaxSettings;
-
-     /**
-      * Set default values for future Ajax requests. Its use is not recommended.
-      *
-      * @param options A set of key/value pairs that configure the default Ajax request. All options are optional.
-      */
-    ajaxSetup(options: JQueryAjaxSettings): void;
-
-    /**
-     * Load data from the server using a HTTP GET request.
-     *
-     * @param url A string containing the URL to which the request is sent.
-     * @param success A callback function that is executed if the request succeeds.
-     * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
-     */
-    get(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
-    /**
-     * Load data from the server using a HTTP GET request.
-     *
-     * @param url A string containing the URL to which the request is sent.
-     * @param data A plain object or string that is sent to the server with the request.
-     * @param success A callback function that is executed if the request succeeds.
-     * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
-     */
-    get(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
-    /**
-     * Load JSON-encoded data from the server using a GET HTTP request.
-     *
-     * @param url A string containing the URL to which the request is sent.
-     * @param success A callback function that is executed if the request succeeds.
-     */
-    getJSON(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
-    /**
-     * Load JSON-encoded data from the server using a GET HTTP request.
-     *
-     * @param url A string containing the URL to which the request is sent.
-     * @param data A plain object or string that is sent to the server with the request.
-     * @param success A callback function that is executed if the request succeeds.
-     */
-    getJSON(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
-    /**
-     * Load a JavaScript file from the server using a GET HTTP request, then execute it.
-     *
-     * @param url A string containing the URL to which the request is sent.
-     * @param success A callback function that is executed if the request succeeds.
-     */
-    getScript(url: string, success?: (script: string, textStatus: string, jqXHR: JQueryXHR) => any): JQueryXHR;
-
-    /**
-     * Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request.
-     */
-    param: JQueryParam;
-
-    /**
-     * Load data from the server using a HTTP POST request.
-     *
-     * @param url A string containing the URL to which the request is sent.
-     * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case.
-     * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).
-     */
-    post(url: string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
-    /**
-     * Load data from the server using a HTTP POST request.
-     *
-     * @param url A string containing the URL to which the request is sent.
-     * @param data A plain object or string that is sent to the server with the request.
-     * @param success A callback function that is executed if the request succeeds. Required if dataType is provided, but can be null in that case.
-     * @param dataType The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html).
-     */
-    post(url: string, data?: Object|string, success?: (data: any, textStatus: string, jqXHR: JQueryXHR) => any, dataType?: string): JQueryXHR;
-
-    /**
-     * A multi-purpose callbacks list object that provides a powerful way to manage callback lists.
-     *
-     * @param flags An optional list of space-separated flags that change how the callback list behaves.
-     */
-    Callbacks(flags?: string): JQueryCallback;
-
-    /**
-     * Holds or releases the execution of jQuery's ready event.
-     *
-     * @param hold Indicates whether the ready hold is being requested or released
-     */
-    holdReady(hold: boolean): void;
-
-    /**
-     * Accepts a string containing a CSS selector which is then used to match a set of elements.
-     *
-     * @param selector A string containing a selector expression
-     * @param context A DOM Element, Document, or jQuery to use as context
-     */
-    (selector: string, context?: Element|JQuery): JQuery;
-
-    /**
-     * Accepts a string containing a CSS selector which is then used to match a set of elements.
-     *
-     * @param element A DOM element to wrap in a jQuery object.
-     */
-    (element: Element): JQuery;
-
-    /**
-     * Accepts a string containing a CSS selector which is then used to match a set of elements.
-     *
-     * @param elementArray An array containing a set of DOM elements to wrap in a jQuery object.
-     */
-    (elementArray: Element[]): JQuery;
-
-    /**
-     * Binds a function to be executed when the DOM has finished loading.
-     *
-     * @param callback A function to execute after the DOM is ready.
-     */
-    (callback: (jQueryAlias?: JQueryStatic) => any): JQuery;
-
-    /**
-     * Accepts a string containing a CSS selector which is then used to match a set of elements.
-     *
-     * @param object A plain object to wrap in a jQuery object.
-     */
-    (object: {}): JQuery;
-
-    /**
-     * Accepts a string containing a CSS selector which is then used to match a set of elements.
-     *
-     * @param object An existing jQuery object to clone.
-     */
-    (object: JQuery): JQuery;
-
-    /**
-     * Specify a function to execute when the DOM is fully loaded.
-     */
-    (): JQuery;
-
-    /**
-     * Creates DOM elements on the fly from the provided string of raw HTML.
-     *
-     * @param html A string of HTML to create on the fly. Note that this parses HTML, not XML.
-     * @param ownerDocument A document in which the new elements will be created.
-     */
-    (html: string, ownerDocument?: Document): JQuery;
-
-    /**
-     * Creates DOM elements on the fly from the provided string of raw HTML.
-     *
-     * @param html A string defining a single, standalone, HTML element (e.g. <div/> or <div></div>).
-     * @param attributes An object of attributes, events, and methods to call on the newly-created element.
-     */
-    (html: string, attributes: Object): JQuery;
-
-    /**
-     * Relinquish jQuery's control of the $ variable.
-     *
-     * @param removeAll A Boolean indicating whether to remove all jQuery variables from the global scope (including jQuery itself).
-     */
-    noConflict(removeAll?: boolean): Object;
-
-    /**
-     * Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events.
-     *
-     * @param deferreds One or more Deferred objects, or plain JavaScript objects.
-     */
-    when<T>(...deferreds: Array<T|JQueryPromise<T>/* as JQueryDeferred<T> */>): JQueryPromise<T>;
-
-    /**
-     * Hook directly into jQuery to override how particular CSS properties are retrieved or set, normalize CSS property naming, or create custom properties.
-     */
-    cssHooks: { [key: string]: any; };
-    cssNumber: any;
-
-    /**
-     * Store arbitrary data associated with the specified element. Returns the value that was set.
-     *
-     * @param element The DOM element to associate with the data.
-     * @param key A string naming the piece of data to set.
-     * @param value The new data value.
-     */
-    data<T>(element: Element, key: string, value: T): T;
-    /**
-     * Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element.
-     *
-     * @param element The DOM element to associate with the data.
-     * @param key A string naming the piece of data to set.
-     */
-    data(element: Element, key: string): any;
-    /**
-     * Returns value at named data store for the element, as set by jQuery.data(element, name, value), or the full data store for the element.
-     *
-     * @param element The DOM element to associate with the data.
-     */
-    data(element: Element): any;
-
-    /**
-     * Execute the next function on the queue for the matched element.
-     *
-     * @param element A DOM element from which to remove and execute a queued function.
-     * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
-     */
-    dequeue(element: Element, queueName?: string): void;
-
-    /**
-     * Determine whether an element has any jQuery data associated with it.
-     *
-     * @param element A DOM element to be checked for data.
-     */
-    hasData(element: Element): boolean;
-
-    /**
-     * Show the queue of functions to be executed on the matched element.
-     *
-     * @param element A DOM element to inspect for an attached queue.
-     * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
-     */
-    queue(element: Element, queueName?: string): any[];
-    /**
-     * Manipulate the queue of functions to be executed on the matched element.
-     *
-     * @param element A DOM element where the array of queued functions is attached.
-     * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
-     * @param newQueue An array of functions to replace the current queue contents.
-     */
-    queue(element: Element, queueName: string, newQueue: Function[]): JQuery;
-    /**
-     * Manipulate the queue of functions to be executed on the matched element.
-     *
-     * @param element A DOM element on which to add a queued function.
-     * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
-     * @param callback The new function to add to the queue.
-     */
-    queue(element: Element, queueName: string, callback: Function): JQuery;
-
-    /**
-     * Remove a previously-stored piece of data.
-     *
-     * @param element A DOM element from which to remove data.
-     * @param name A string naming the piece of data to remove.
-     */
-    removeData(element: Element, name?: string): JQuery;
-
-    /**
-     * A constructor function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function.
-     *
-     * @param beforeStart A function that is called just before the constructor returns.
-     */
-    Deferred<T>(beforeStart?: (deferred: JQueryDeferred<T>) => any): JQueryDeferred<T>;
-
-    /**
-     * Effects
-     */
-    fx: {
-        tick: () => void;
-        /**
-         * The rate (in milliseconds) at which animations fire.
-         */
-        interval: number;
-        stop: () => void;
-        speeds: { slow: number; fast: number; };
-        /**
-         * Globally disable all animations.
-         */
-        off: boolean;
-        step: any;
-    };
-
-    /**
-     * Takes a function and returns a new one that will always have a particular context.
-     *
-     * @param fnction The function whose context will be changed.
-     * @param context The object to which the context (this) of the function should be set.
-     * @param additionalArguments Any number of arguments to be passed to the function referenced in the function argument.
-     */
-    proxy(fnction: (...args: any[]) => any, context: Object, ...additionalArguments: any[]): any;
-    /**
-     * Takes a function and returns a new one that will always have a particular context.
-     *
-     * @param context The object to which the context (this) of the function should be set.
-     * @param name The name of the function whose context will be changed (should be a property of the context object).
-     * @param additionalArguments Any number of arguments to be passed to the function named in the name argument.
-     */
-    proxy(context: Object, name: string, ...additionalArguments: any[]): any;
-
-    Event: JQueryEventConstructor;
-
-    /**
-     * Takes a string and throws an exception containing it.
-     *
-     * @param message The message to send out.
-     */
-    error(message: any): JQuery;
-
-    expr: any;
-    fn: any;  //TODO: Decide how we want to type this
-
-    isReady: boolean;
-
-    // Properties
-    support: JQuerySupport;
-
-    /**
-     * Check to see if a DOM element is a descendant of another DOM element.
-     * 
-     * @param container The DOM element that may contain the other element.
-     * @param contained The DOM element that may be contained by (a descendant of) the other element.
-     */
-    contains(container: Element, contained: Element): boolean;
-
-    /**
-     * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.
-     * 
-     * @param collection The object or array to iterate over.
-     * @param callback The function that will be executed on every object.
-     */
-    each<T>(
-        collection: T[],
-        callback: (indexInArray: number, valueOfElement: T) => any
-        ): any;
-
-    /**
-     * A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.
-     * 
-     * @param collection The object or array to iterate over.
-     * @param callback The function that will be executed on every object.
-     */
-    each(
-        collection: any,
-        callback: (indexInArray: any, valueOfElement: any) => any
-        ): any;
-
-    /**
-     * Merge the contents of two or more objects together into the first object.
-     *
-     * @param target An object that will receive the new properties if additional objects are passed in or that will extend the jQuery namespace if it is the sole argument.
-     * @param object1 An object containing additional properties to merge in.
-     * @param objectN Additional objects containing properties to merge in.
-     */
-    extend(target: any, object1?: any, ...objectN: any[]): any;
-    /**
-     * Merge the contents of two or more objects together into the first object.
-     *
-     * @param deep If true, the merge becomes recursive (aka. deep copy).
-     * @param target The object to extend. It will receive the new properties.
-     * @param object1 An object containing additional properties to merge in.
-     * @param objectN Additional objects containing properties to merge in.
-     */
-    extend(deep: boolean, target: any, object1?: any, ...objectN: any[]): any;
-
-    /**
-     * Execute some JavaScript code globally.
-     *
-     * @param code The JavaScript code to execute.
-     */
-    globalEval(code: string): any;
-
-    /**
-     * Finds the elements of an array which satisfy a filter function. The original array is not affected.
-     *
-     * @param array The array to search through.
-     * @param func The function to process each item against. The first argument to the function is the item, and the second argument is the index. The function should return a Boolean value.  this will be the global window object.
-     * @param invert If "invert" is false, or not provided, then the function returns an array consisting of all elements for which "callback" returns true. If "invert" is true, then the function returns an array consisting of all elements for which "callback" returns false.
-     */
-    grep<T>(array: T[], func: (elementOfArray: T, indexInArray: number) => boolean, invert?: boolean): T[];
-
-    /**
-     * Search for a specified value within an array and return its index (or -1 if not found).
-     *
-     * @param value The value to search for.
-     * @param array An array through which to search.
-     * @param fromIndex he index of the array at which to begin the search. The default is 0, which will search the whole array.
-     */
-    inArray<T>(value: T, array: T[], fromIndex?: number): number;
-
-    /**
-     * Determine whether the argument is an array.
-     *
-     * @param obj Object to test whether or not it is an array.
-     */
-    isArray(obj: any): boolean;
-    /**
-     * Check to see if an object is empty (contains no enumerable properties).
-     *
-     * @param obj The object that will be checked to see if it's empty.
-     */
-    isEmptyObject(obj: any): boolean;
-    /**
-     * Determine if the argument passed is a Javascript function object.
-     *
-     * @param obj Object to test whether or not it is a function.
-     */
-    isFunction(obj: any): boolean;
-    /**
-     * Determines whether its argument is a number.
-     *
-     * @param obj The value to be tested.
-     */
-    isNumeric(value: any): boolean;
-    /**
-     * Check to see if an object is a plain object (created using "{}" or "new Object").
-     *
-     * @param obj The object that will be checked to see if it's a plain object.
-     */
-    isPlainObject(obj: any): boolean;
-    /**
-     * Determine whether the argument is a window.
-     *
-     * @param obj Object to test whether or not it is a window.
-     */
-    isWindow(obj: any): boolean;
-    /**
-     * Check to see if a DOM node is within an XML document (or is an XML document).
-     *
-     * @param node he DOM node that will be checked to see if it's in an XML document.
-     */
-    isXMLDoc(node: Node): boolean;
-
-    /**
-     * Convert an array-like object into a true JavaScript array.
-     * 
-     * @param obj Any object to turn into a native Array.
-     */
-    makeArray(obj: any): any[];
-
-    /**
-     * Translate all items in an array or object to new array of items.
-     * 
-     * @param array The Array to translate.
-     * @param callback The function to process each item against. The first argument to the function is the array item, the second argument is the index in array The function can return any value. Within the function, this refers to the global (window) object.
-     */
-    map<T, U>(array: T[], callback: (elementOfArray: T, indexInArray: number) => U): U[];
-    /**
-     * Translate all items in an array or object to new array of items.
-     * 
-     * @param arrayOrObject The Array or Object to translate.
-     * @param callback The function to process each item against. The first argument to the function is the value; the second argument is the index or key of the array or object property. The function can return any value to add to the array. A returned array will be flattened into the resulting array. Within the function, this refers to the global (window) object.
-     */
-    map(arrayOrObject: any, callback: (value: any, indexOrKey: any) => any): any;
-
-    /**
-     * Merge the contents of two arrays together into the first array.
-     * 
-     * @param first The first array to merge, the elements of second added.
-     * @param second The second array to merge into the first, unaltered.
-     */
-    merge<T>(first: T[], second: T[]): T[];
-
-    /**
-     * An empty function.
-     */
-    noop(): any;
-
-    /**
-     * Return a number representing the current time.
-     */
-    now(): number;
-
-    /**
-     * Takes a well-formed JSON string and returns the resulting JavaScript object.
-     * 
-     * @param json The JSON string to parse.
-     */
-    parseJSON(json: string): any;
-
-    /**
-     * Parses a string into an XML document.
-     *
-     * @param data a well-formed XML string to be parsed
-     */
-    parseXML(data: string): XMLDocument;
-
-    /**
-     * Remove the whitespace from the beginning and end of a string.
-     * 
-     * @param str Remove the whitespace from the beginning and end of a string.
-     */
-    trim(str: string): string;
-
-    /**
-     * Determine the internal JavaScript [[Class]] of an object.
-     * 
-     * @param obj Object to get the internal JavaScript [[Class]] of.
-     */
-    type(obj: any): string;
-
-    /**
-     * Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers.
-     * 
-     * @param array The Array of DOM elements.
-     */
-    unique(array: Element[]): Element[];
-
-    /**
-     * Parses a string into an array of DOM nodes.
-     *
-     * @param data HTML string to be parsed
-     * @param context DOM element to serve as the context in which the HTML fragment will be created
-     * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string
-     */
-    parseHTML(data: string, context?: HTMLElement, keepScripts?: boolean): any[];
-
-    /**
-     * Parses a string into an array of DOM nodes.
-     *
-     * @param data HTML string to be parsed
-     * @param context DOM element to serve as the context in which the HTML fragment will be created
-     * @param keepScripts A Boolean indicating whether to include scripts passed in the HTML string
-     */
-    parseHTML(data: string, context?: Document, keepScripts?: boolean): any[];
-}
-
-/**
- * The jQuery instance members
- */
-interface JQuery {
-    /**
-     * Register a handler to be called when Ajax requests complete. This is an AjaxEvent.
-     *
-     * @param handler The function to be invoked.
-     */
-    ajaxComplete(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: any) => any): JQuery;
-    /**
-     * Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event.
-     *
-     * @param handler The function to be invoked.
-     */
-    ajaxError(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxSettings: JQueryAjaxSettings, thrownError: any) => any): JQuery;
-    /**
-     * Attach a function to be executed before an Ajax request is sent. This is an Ajax Event.
-     *
-     * @param handler The function to be invoked.
-     */
-    ajaxSend(handler: (event: JQueryEventObject, jqXHR: JQueryXHR, ajaxOptions: JQueryAjaxSettings) => any): JQuery;
-    /**
-     * Register a handler to be called when the first Ajax request begins. This is an Ajax Event.
-     *
-     * @param handler The function to be invoked.
-     */
-    ajaxStart(handler: () => any): JQuery;
-    /**
-     * Register a handler to be called when all Ajax requests have completed. This is an Ajax Event.
-     *
-     * @param handler The function to be invoked.
-     */
-    ajaxStop(handler: () => any): JQuery;
-    /**
-     * Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event.
-     *
-     * @param handler The function to be invoked.
-     */
-    ajaxSuccess(handler: (event: JQueryEventObject, XMLHttpRequest: XMLHttpRequest, ajaxOptions: JQueryAjaxSettings) => any): JQuery;
-
-    /**
-     * Load data from the server and place the returned HTML into the matched element.
-     *
-     * @param url A string containing the URL to which the request is sent.
-     * @param data A plain object or string that is sent to the server with the request.
-     * @param complete A callback function that is executed when the request completes.
-     */
-    load(url: string, data?: string|Object, complete?: (responseText: string, textStatus: string, XMLHttpRequest: XMLHttpRequest) => any): JQuery;
-
-    /**
-     * Encode a set of form elements as a string for submission.
-     */
-    serialize(): string;
-    /**
-     * Encode a set of form elements as an array of names and values.
-     */
-    serializeArray(): JQuerySerializeArrayElement[];
-
-    /**
-     * Adds the specified class(es) to each of the set of matched elements.
-     *
-     * @param className One or more space-separated classes to be added to the class attribute of each matched element.
-     */
-    addClass(className: string): JQuery;
-    /**
-     * Adds the specified class(es) to each of the set of matched elements.
-     *
-     * @param function A function returning one or more space-separated class names to be added to the existing class name(s). Receives the index position of the element in the set and the existing class name(s) as arguments. Within the function, this refers to the current element in the set.
-     */
-    addClass(func: (index: number, className: string) => string): JQuery;
-
-    /**
-     * Add the previous set of elements on the stack to the current set, optionally filtered by a selector.
-     */
-    addBack(selector?: string): JQuery;
-
-    /**
-     * Get the value of an attribute for the first element in the set of matched elements.
-     *
-     * @param attributeName The name of the attribute to get.
-     */
-    attr(attributeName: string): string;
-    /**
-     * Set one or more attributes for the set of matched elements.
-     *
-     * @param attributeName The name of the attribute to set.
-     * @param value A value to set for the attribute.
-     */
-    attr(attributeName: string, value: string|number): JQuery;
-    /**
-     * Set one or more attributes for the set of matched elements.
-     *
-     * @param attributeName The name of the attribute to set.
-     * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old attribute value as arguments.
-     */
-    attr(attributeName: string, func: (index: number, attr: string) => string|number): JQuery;
-    /**
-     * Set one or more attributes for the set of matched elements.
-     *
-     * @param attributes An object of attribute-value pairs to set.
-     */
-    attr(attributes: Object): JQuery;
-    
-    /**
-     * Determine whether any of the matched elements are assigned the given class.
-     *
-     * @param className The class name to search for.
-     */
-    hasClass(className: string): boolean;
-
-    /**
-     * Get the HTML contents of the first element in the set of matched elements.
-     */
-    html(): string;
-    /**
-     * Set the HTML contents of each element in the set of matched elements.
-     *
-     * @param htmlString A string of HTML to set as the content of each matched element.
-     */
-    html(htmlString: string): JQuery;
-    /**
-     * Set the HTML contents of each element in the set of matched elements.
-     *
-     * @param func A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set.
-     */
-    html(func: (index: number, oldhtml: string) => string): JQuery;
-    /**
-     * Set the HTML contents of each element in the set of matched elements.
-     *
-     * @param func A function returning the HTML content to set. Receives the index position of the element in the set and the old HTML value as arguments. jQuery empties the element before calling the function; use the oldhtml argument to reference the previous content. Within the function, this refers to the current element in the set.
-     */
-
-    /**
-     * Get the value of a property for the first element in the set of matched elements.
-     *
-     * @param propertyName The name of the property to get.
-     */
-    prop(propertyName: string): any;
-    /**
-     * Set one or more properties for the set of matched elements.
-     *
-     * @param propertyName The name of the property to set.
-     * @param value A value to set for the property.
-     */
-    prop(propertyName: string, value: string|number|boolean): JQuery;
-    /**
-     * Set one or more properties for the set of matched elements.
-     *
-     * @param properties An object of property-value pairs to set.
-     */
-    prop(properties: Object): JQuery;
-    /**
-     * Set one or more properties for the set of matched elements.
-     *
-     * @param propertyName The name of the property to set.
-     * @param func A function returning the value to set. Receives the index position of the element in the set and the old property value as arguments. Within the function, the keyword this refers to the current element.
-     */
-    prop(propertyName: string, func: (index: number, oldPropertyValue: any) => any): JQuery;
-
-    /**
-     * Remove an attribute from each element in the set of matched elements.
-     *
-     * @param attributeName An attribute to remove; as of version 1.7, it can be a space-separated list of attributes.
-     */
-    removeAttr(attributeName: string): JQuery;
-
-    /**
-     * Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
-     *
-     * @param className One or more space-separated classes to be removed from the class attribute of each matched element.
-     */
-    removeClass(className?: string): JQuery;
-    /**
-     * Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
-     *
-     * @param function A function returning one or more space-separated class names to be removed. Receives the index position of the element in the set and the old class value as arguments.
-     */
-    removeClass(func: (index: number, className: string) => string): JQuery;
-
-    /**
-     * Remove a property for the set of matched elements.
-     *
-     * @param propertyName The name of the property to remove.
-     */
-    removeProp(propertyName: string): JQuery;
-
-    /**
-     * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.
-     *
-     * @param className One or more class names (separated by spaces) to be toggled for each element in the matched set.
-     * @param swtch A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed.
-     */
-    toggleClass(className: string, swtch?: boolean): JQuery;
-    /**
-     * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.
-     *
-     * @param swtch A boolean value to determine whether the class should be added or removed.
-     */
-    toggleClass(swtch?: boolean): JQuery;
-    /**
-     * Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument.
-     *
-     * @param func A function that returns class names to be toggled in the class attribute of each element in the matched set. Receives the index position of the element in the set, the old class value, and the switch as arguments.
-     * @param swtch A boolean value to determine whether the class should be added or removed.
-     */
-    toggleClass(func: (index: number, className: string, swtch: boolean) => string, swtch?: boolean): JQuery;
-
-    /**
-     * Get the current value of the first element in the set of matched elements.
-     */
-    val(): any;
-    /**
-     * Set the value of each element in the set of matched elements.
-     *
-     * @param value A string of text, an array of strings or number corresponding to the value of each matched element to set as selected/checked.
-     */
-    val(value: string|string[]|number): JQuery;
-    /**
-     * Set the value of each element in the set of matched elements.
-     *
-     * @param func A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.
-     */
-    val(func: (index: number, value: string) => string): JQuery;
-
-
-    /**
-     * Get the value of style properties for the first element in the set of matched elements.
-     *
-     * @param propertyName A CSS property.
-     */
-    css(propertyName: string): string;
-    /**
-     * Set one or more CSS properties for the set of matched elements.
-     *
-     * @param propertyName A CSS property name.
-     * @param value A value to set for the property.
-     */
-    css(propertyName: string, value: string|number): JQuery;
-    /**
-     * Set one or more CSS properties for the set of matched elements.
-     *
-     * @param propertyName A CSS property name.
-     * @param value A function returning the value to set. this is the current element. Receives the index position of the element in the set and the old value as arguments.
-     */
-    css(propertyName: string, value: (index: number, value: string) => string|number): JQuery;
-    /**
-     * Set one or more CSS properties for the set of matched elements.
-     *
-     * @param properties An object of property-value pairs to set.
-     */
-    css(properties: Object): JQuery;
-
-    /**
-     * Get the current computed height for the first element in the set of matched elements.
-     */
-    height(): number;
-    /**
-     * Set the CSS height of every matched element.
-     *
-     * @param value An integer representing the number of pixels, or an integer with an optional unit of measure appended (as a string).
-     */
-    height(value: number|string): JQuery;
-    /**
-     * Set the CSS height of every matched element.
-     *
-     * @param func A function returning the height to set. Receives the index position of the element in the set and the old height as arguments. Within the function, this refers to the current element in the set.
-     */
-    height(func: (index: number, height: number) => number|string): JQuery;
-
-    /**
-     * Get the current computed height for the first element in the set of matched elements, including padding but not border.
-     */
-    innerHeight(): number;
-
-    /**
-     * Sets the inner height on elements in the set of matched elements, including padding but not border.
-     *
-     * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
-     */
-    innerHeight(height: number|string): JQuery;
-    
-    /**
-     * Get the current computed width for the first element in the set of matched elements, including padding but not border.
-     */
-    innerWidth(): number;
-
-    /**
-     * Sets the inner width on elements in the set of matched elements, including padding but not border.
-     *
-     * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
-     */
-    innerWidth(width: number|string): JQuery;
-    
-    /**
-     * Get the current coordinates of the first element in the set of matched elements, relative to the document.
-     */
-    offset(): JQueryCoordinates;
-    /**
-     * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
-     *
-     * @param coordinates An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
-     */
-    offset(coordinates: JQueryCoordinates): JQuery;
-    /**
-     * An object containing the properties top and left, which are integers indicating the new top and left coordinates for the elements.
-     *
-     * @param func A function to return the coordinates to set. Receives the index of the element in the collection as the first argument and the current coordinates as the second argument. The function should return an object with the new top and left properties.
-     */
-    offset(func: (index: number, coords: JQueryCoordinates) => JQueryCoordinates): JQuery;
-
-    /**
-     * Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns an integer (without "px") representation of the value or null if called on an empty set of elements.
-     *
-     * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation.
-     */
-    outerHeight(includeMargin?: boolean): number;
-
-    /**
-     * Sets the outer height on elements in the set of matched elements, including padding and border.
-     *
-     * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
-     */
-    outerHeight(height: number|string): JQuery;
-
-    /**
-     * Get the current computed width for the first element in the set of matched elements, including padding and border.
-     *
-     * @param includeMargin A Boolean indicating whether to include the element's margin in the calculation.
-     */
-    outerWidth(includeMargin?: boolean): number;
-
-    /**
-     * Sets the outer width on elements in the set of matched elements, including padding and border.
-     *
-     * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
-     */
-    outerWidth(width: number|string): JQuery;
-
-    /**
-     * Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.
-     */
-    position(): JQueryCoordinates;
-
-    /**
-     * Get the current horizontal position of the scroll bar for the first element in the set of matched elements or set the horizontal position of the scroll bar for every matched element.
-     */
-    scrollLeft(): number;
-    /**
-     * Set the current horizontal position of the scroll bar for each of the set of matched elements.
-     *
-     * @param value An integer indicating the new position to set the scroll bar to.
-     */
-    scrollLeft(value: number): JQuery;
-
-    /**
-     * Get the current vertical position of the scroll bar for the first element in the set of matched elements or set the vertical position of the scroll bar for every matched element.
-     */
-    scrollTop(): number;
-    /**
-     * Set the current vertical position of the scroll bar for each of the set of matched elements.
-     *
-     * @param value An integer indicating the new position to set the scroll bar to.
-     */
-    scrollTop(value: number): JQuery;
-
-    /**
-     * Get the current computed width for the first element in the set of matched elements.
-     */
-    width(): number;
-    /**
-     * Set the CSS width of each element in the set of matched elements.
-     *
-     * @param value An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string).
-     */
-    width(value: number|string): JQuery;
-    /**
-     * Set the CSS width of each element in the set of matched elements.
-     *
-     * @param func A function returning the width to set. Receives the index position of the element in the set and the old width as arguments. Within the function, this refers to the current element in the set.
-     */
-    width(func: (index: number, width: number) => number|string): JQuery;
-
-    /**
-     * Remove from the queue all items that have not yet been run.
-     *
-     * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
-     */
-    clearQueue(queueName?: string): JQuery;
-
-    /**
-     * Store arbitrary data associated with the matched elements.
-     *
-     * @param key A string naming the piece of data to set.
-     * @param value The new data value; it can be any Javascript type including Array or Object.
-     */
-    data(key: string, value: any): JQuery;
-    /**
-     * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute.
-     *
-     * @param key Name of the data stored.
-     */
-    data(key: string): any;
-    /**
-     * Store arbitrary data associated with the matched elements.
-     *
-     * @param obj An object of key-value pairs of data to update.
-     */
-    data(obj: { [key: string]: any; }): JQuery;
-    /**
-     * Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute.
-     */
-    data(): any;
-
-    /**
-     * Execute the next function on the queue for the matched elements.
-     *
-     * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
-     */
-    dequeue(queueName?: string): JQuery;
-
-    /**
-     * Remove a previously-stored piece of data.
-     *
-     * @param name A string naming the piece of data to delete or space-separated string naming the pieces of data to delete.
-     */
-    removeData(name: string): JQuery;
-    /**
-     * Remove a previously-stored piece of data.
-     *
-     * @param list An array of strings naming the pieces of data to delete.
-     */
-    removeData(list: string[]): JQuery;
-    /**
-     * Remove all previously-stored piece of data.
-     */
-    removeData(): JQuery;
-
-    /**
-     * Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished.
-     *
-     * @param type The type of queue that needs to be observed. (default: fx)
-     * @param target Object onto which the promise methods have to be attached
-     */
-    promise(type?: string, target?: Object): JQueryPromise<any>;
-
-    /**
-     * Perform a custom animation of a set of CSS properties.
-     *
-     * @param properties An object of CSS properties and values that the animation will move toward.
-     * @param duration A string or number determining how long the animation will run.
-     * @param complete A function to call once the animation is complete.
-     */
-    animate(properties: Object, duration?: string|number, complete?: Function): JQuery;
-    /**
-     * Perform a custom animation of a set of CSS properties.
-     *
-     * @param properties An object of CSS properties and values that the animation will move toward.
-     * @param duration A string or number determining how long the animation will run.
-     * @param easing A string indicating which easing function to use for the transition. (default: swing)
-     * @param complete A function to call once the animation is complete.
-     */
-    animate(properties: Object, duration?: string|number, easing?: string, complete?: Function): JQuery;
-    /**
-     * Perform a custom animation of a set of CSS properties.
-     *
-     * @param properties An object of CSS properties and values that the animation will move toward.
-     * @param options A map of additional options to pass to the method.
-     */
-    animate(properties: Object, options: JQueryAnimationOptions): JQuery;
-
-    /**
-     * Set a timer to delay execution of subsequent items in the queue.
-     *
-     * @param duration An integer indicating the number of milliseconds to delay execution of the next item in the queue.
-     * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
-     */
-    delay(duration: number, queueName?: string): JQuery;
-
-    /**
-     * Display the matched elements by fading them to opaque.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param complete A function to call once the animation is complete.
-     */
-    fadeIn(duration?: number|string, complete?: Function): JQuery;
-    /**
-     * Display the matched elements by fading them to opaque.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param easing A string indicating which easing function to use for the transition.
-     * @param complete A function to call once the animation is complete.
-     */
-    fadeIn(duration?: number|string, easing?: string, complete?: Function): JQuery;
-    /**
-     * Display the matched elements by fading them to opaque.
-     *
-     * @param options A map of additional options to pass to the method.
-     */
-    fadeIn(options: JQueryAnimationOptions): JQuery;
-
-    /**
-     * Hide the matched elements by fading them to transparent.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param complete A function to call once the animation is complete.
-     */
-    fadeOut(duration?: number|string, complete?: Function): JQuery;
-    /**
-     * Hide the matched elements by fading them to transparent.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param easing A string indicating which easing function to use for the transition.
-     * @param complete A function to call once the animation is complete.
-     */
-    fadeOut(duration?: number|string, easing?: string, complete?: Function): JQuery;
-    /**
-     * Hide the matched elements by fading them to transparent.
-     *
-     * @param options A map of additional options to pass to the method.
-     */
-    fadeOut(options: JQueryAnimationOptions): JQuery;
-
-    /**
-     * Adjust the opacity of the matched elements.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param opacity A number between 0 and 1 denoting the target opacity.
-     * @param complete A function to call once the animation is complete.
-     */
-    fadeTo(duration: string|number, opacity: number, complete?: Function): JQuery;
-    /**
-     * Adjust the opacity of the matched elements.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param opacity A number between 0 and 1 denoting the target opacity.
-     * @param easing A string indicating which easing function to use for the transition.
-     * @param complete A function to call once the animation is complete.
-     */
-    fadeTo(duration: string|number, opacity: number, easing?: string, complete?: Function): JQuery;
-
-    /**
-     * Display or hide the matched elements by animating their opacity.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param complete A function to call once the animation is complete.
-     */
-    fadeToggle(duration?: number|string, complete?: Function): JQuery;
-    /**
-     * Display or hide the matched elements by animating their opacity.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param easing A string indicating which easing function to use for the transition.
-     * @param complete A function to call once the animation is complete.
-     */
-    fadeToggle(duration?: number|string, easing?: string, complete?: Function): JQuery;
-    /**
-     * Display or hide the matched elements by animating their opacity.
-     *
-     * @param options A map of additional options to pass to the method.
-     */
-    fadeToggle(options: JQueryAnimationOptions): JQuery;
-
-    /**
-     * Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements.
-     *
-     * @param queue The name of the queue in which to stop animations.
-     */
-    finish(queue?: string): JQuery;
-
-    /**
-     * Hide the matched elements.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param complete A function to call once the animation is complete.
-     */
-    hide(duration?: number|string, complete?: Function): JQuery;
-    /**
-     * Hide the matched elements.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param easing A string indicating which easing function to use for the transition.
-     * @param complete A function to call once the animation is complete.
-     */
-    hide(duration?: number|string, easing?: string, complete?: Function): JQuery;
-    /**
-     * Hide the matched elements.
-     *
-     * @param options A map of additional options to pass to the method.
-     */
-    hide(options: JQueryAnimationOptions): JQuery;
-
-    /**
-     * Display the matched elements.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param complete A function to call once the animation is complete.
-     */
-    show(duration?: number|string, complete?: Function): JQuery;
-    /**
-     * Display the matched elements.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param easing A string indicating which easing function to use for the transition.
-     * @param complete A function to call once the animation is complete.
-     */
-    show(duration?: number|string, easing?: string, complete?: Function): JQuery;
-    /**
-     * Display the matched elements.
-     *
-     * @param options A map of additional options to pass to the method.
-     */
-    show(options: JQueryAnimationOptions): JQuery;
-
-    /**
-     * Display the matched elements with a sliding motion.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param complete A function to call once the animation is complete.
-     */
-    slideDown(duration?: number|string, complete?: Function): JQuery;
-    /**
-     * Display the matched elements with a sliding motion.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param easing A string indicating which easing function to use for the transition.
-     * @param complete A function to call once the animation is complete.
-     */
-    slideDown(duration?: number|string, easing?: string, complete?: Function): JQuery;
-    /**
-     * Display the matched elements with a sliding motion.
-     *
-     * @param options A map of additional options to pass to the method.
-     */
-    slideDown(options: JQueryAnimationOptions): JQuery;
-
-    /**
-     * Display or hide the matched elements with a sliding motion.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param complete A function to call once the animation is complete.
-     */
-    slideToggle(duration?: number|string, complete?: Function): JQuery;
-    /**
-     * Display or hide the matched elements with a sliding motion.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param easing A string indicating which easing function to use for the transition.
-     * @param complete A function to call once the animation is complete.
-     */
-    slideToggle(duration?: number|string, easing?: string, complete?: Function): JQuery;
-    /**
-     * Display or hide the matched elements with a sliding motion.
-     *
-     * @param options A map of additional options to pass to the method.
-     */
-    slideToggle(options: JQueryAnimationOptions): JQuery;
-
-    /**
-     * Hide the matched elements with a sliding motion.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param complete A function to call once the animation is complete.
-     */
-    slideUp(duration?: number|string, complete?: Function): JQuery;
-    /**
-     * Hide the matched elements with a sliding motion.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param easing A string indicating which easing function to use for the transition.
-     * @param complete A function to call once the animation is complete.
-     */
-    slideUp(duration?: number|string, easing?: string, complete?: Function): JQuery;
-    /**
-     * Hide the matched elements with a sliding motion.
-     *
-     * @param options A map of additional options to pass to the method.
-     */
-    slideUp(options: JQueryAnimationOptions): JQuery;
-
-    /**
-     * Stop the currently-running animation on the matched elements.
-     *
-     * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false.
-     * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false.
-     */
-    stop(clearQueue?: boolean, jumpToEnd?: boolean): JQuery;
-    /**
-     * Stop the currently-running animation on the matched elements.
-     *
-     * @param queue The name of the queue in which to stop animations.
-     * @param clearQueue A Boolean indicating whether to remove queued animation as well. Defaults to false.
-     * @param jumpToEnd A Boolean indicating whether to complete the current animation immediately. Defaults to false.
-     */
-    stop(queue?: string, clearQueue?: boolean, jumpToEnd?: boolean): JQuery;
-
-    /**
-     * Display or hide the matched elements.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param complete A function to call once the animation is complete.
-     */
-    toggle(duration?: number|string, complete?: Function): JQuery;
-    /**
-     * Display or hide the matched elements.
-     *
-     * @param duration A string or number determining how long the animation will run.
-     * @param easing A string indicating which easing function to use for the transition.
-     * @param complete A function to call once the animation is complete.
-     */
-    toggle(duration?: number|string, easing?: string, complete?: Function): JQuery;
-    /**
-     * Display or hide the matched elements.
-     *
-     * @param options A map of additional options to pass to the method.
-     */
-    toggle(options: JQueryAnimationOptions): JQuery;
-    /**
-     * Display or hide the matched elements.
-     *
-     * @param showOrHide A Boolean indicating whether to show or hide the elements.
-     */
-    toggle(showOrHide: boolean): JQuery;
-
-    /**
-     * Attach a handler to an event for the elements.
-     * 
-     * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute each time the event is triggered.
-     */
-    bind(eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Attach a handler to an event for the elements.
-     * 
-     * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
-     * @param handler A function to execute each time the event is triggered.
-     */
-    bind(eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Attach a handler to an event for the elements.
-     * 
-     * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true.
-     */
-    bind(eventType: string, eventData: any, preventBubble: boolean): JQuery;
-    /**
-     * Attach a handler to an event for the elements.
-     * 
-     * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
-     * @param preventBubble Setting the third argument to false will attach a function that prevents the default action from occurring and stops the event from bubbling. The default is true.
-     */
-    bind(eventType: string, preventBubble: boolean): JQuery;
-    /**
-     * Attach a handler to an event for the elements.
-     * 
-     * @param events An object containing one or more DOM event types and functions to execute for them.
-     */
-    bind(events: any): JQuery;
-
-    /**
-     * Trigger the "blur" event on an element
-     */
-    blur(): JQuery;
-    /**
-     * Bind an event handler to the "blur" JavaScript event
-     *
-     * @param handler A function to execute each time the event is triggered.
-     */
-    blur(handler: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "blur" JavaScript event
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute each time the event is triggered.
-     */
-    blur(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
-
-    /**
-     * Trigger the "change" event on an element.
-     */
-    change(): JQuery;
-    /**
-     * Bind an event handler to the "change" JavaScript event
-     *
-     * @param handler A function to execute each time the event is triggered.
-     */
-    change(handler: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "change" JavaScript event
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute each time the event is triggered.
-     */
-    change(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
-
-    /**
-     * Trigger the "click" event on an element.
-     */
-    click(): JQuery;
-    /**
-     * Bind an event handler to the "click" JavaScript event
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     */
-    click(handler: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "click" JavaScript event
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute each time the event is triggered.
-     */
-    click(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
-
-    /**
-     * Trigger the "dblclick" event on an element.
-     */
-    dblclick(): JQuery;
-    /**
-     * Bind an event handler to the "dblclick" JavaScript event
-     *
-     * @param handler A function to execute each time the event is triggered.
-     */
-    dblclick(handler: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "dblclick" JavaScript event
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute each time the event is triggered.
-     */
-    dblclick(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
-
-    delegate(selector: any, eventType: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
-    delegate(selector: any, eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
-
-    /**
-     * Trigger the "focus" event on an element.
-     */
-    focus(): JQuery;
-    /**
-     * Bind an event handler to the "focus" JavaScript event
-     *
-     * @param handler A function to execute each time the event is triggered.
-     */
-    focus(handler: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "focus" JavaScript event
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute each time the event is triggered.
-     */
-    focus(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
-
-    /**
-     * Trigger the "focusin" event on an element.
-     */
-    focusin(): JQuery;
-    /**
-     * Bind an event handler to the "focusin" JavaScript event
-     *
-     * @param handler A function to execute each time the event is triggered.
-     */
-    focusin(handler: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "focusin" JavaScript event
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute each time the event is triggered.
-     */
-    focusin(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
-
-    /**
-     * Trigger the "focusout" event on an element.
-     */
-    focusout(): JQuery;
-    /**
-     * Bind an event handler to the "focusout" JavaScript event
-     *
-     * @param handler A function to execute each time the event is triggered.
-     */
-    focusout(handler: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "focusout" JavaScript event
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute each time the event is triggered.
-     */
-    focusout(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
-
-    /**
-     * Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.
-     *
-     * @param handlerIn A function to execute when the mouse pointer enters the element.
-     * @param handlerOut A function to execute when the mouse pointer leaves the element.
-     */
-    hover(handlerIn: (eventObject: JQueryEventObject) => any, handlerOut: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements.
-     *
-     * @param handlerInOut A function to execute when the mouse pointer enters or leaves the element.
-     */
-    hover(handlerInOut: (eventObject: JQueryEventObject) => any): JQuery;
-
-    /**
-     * Trigger the "keydown" event on an element.
-     */
-    keydown(): JQuery;
-    /**
-     * Bind an event handler to the "keydown" JavaScript event
-     *
-     * @param handler A function to execute each time the event is triggered.
-     */
-    keydown(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "keydown" JavaScript event
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute each time the event is triggered.
-     */
-    keydown(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
-
-    /**
-     * Trigger the "keypress" event on an element.
-     */
-    keypress(): JQuery;
-    /**
-     * Bind an event handler to the "keypress" JavaScript event
-     *
-     * @param handler A function to execute each time the event is triggered.
-     */
-    keypress(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "keypress" JavaScript event
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute each time the event is triggered.
-     */
-    keypress(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
-
-    /**
-     * Trigger the "keyup" event on an element.
-     */
-    keyup(): JQuery;
-    /**
-     * Bind an event handler to the "keyup" JavaScript event
-     *
-     * @param handler A function to execute each time the event is triggered.
-     */
-    keyup(handler: (eventObject: JQueryKeyEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "keyup" JavaScript event
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute each time the event is triggered.
-     */
-    keyup(eventData?: any, handler?: (eventObject: JQueryKeyEventObject) => any): JQuery;
-
-    /**
-     * Bind an event handler to the "load" JavaScript event.
-     *
-     * @param handler A function to execute when the event is triggered.
-     */
-    load(handler: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "load" JavaScript event.
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute when the event is triggered.
-     */
-    load(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
-
-    /**
-     * Trigger the "mousedown" event on an element.
-     */
-    mousedown(): JQuery;
-    /**
-     * Bind an event handler to the "mousedown" JavaScript event.
-     *
-     * @param handler A function to execute when the event is triggered.
-     */
-    mousedown(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "mousedown" JavaScript event.
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute when the event is triggered.
-     */
-    mousedown(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
-
-    /**
-     * Trigger the "mouseenter" event on an element.
-     */
-    mouseenter(): JQuery;
-    /**
-     * Bind an event handler to be fired when the mouse enters an element.
-     *
-     * @param handler A function to execute when the event is triggered.
-     */
-    mouseenter(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to be fired when the mouse enters an element.
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute when the event is triggered.
-     */
-    mouseenter(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
-
-    /**
-     * Trigger the "mouseleave" event on an element.
-     */
-    mouseleave(): JQuery;
-    /**
-     * Bind an event handler to be fired when the mouse leaves an element.
-     *
-     * @param handler A function to execute when the event is triggered.
-     */
-    mouseleave(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to be fired when the mouse leaves an element.
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute when the event is triggered.
-     */
-    mouseleave(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
-
-    /**
-     * Trigger the "mousemove" event on an element.
-     */
-    mousemove(): JQuery;
-    /**
-     * Bind an event handler to the "mousemove" JavaScript event.
-     *
-     * @param handler A function to execute when the event is triggered.
-     */
-    mousemove(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "mousemove" JavaScript event.
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute when the event is triggered.
-     */
-    mousemove(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
-
-    /**
-     * Trigger the "mouseout" event on an element.
-     */
-    mouseout(): JQuery;
-    /**
-     * Bind an event handler to the "mouseout" JavaScript event.
-     *
-     * @param handler A function to execute when the event is triggered.
-     */
-    mouseout(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "mouseout" JavaScript event.
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute when the event is triggered.
-     */
-    mouseout(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
-
-    /**
-     * Trigger the "mouseover" event on an element.
-     */
-    mouseover(): JQuery;
-    /**
-     * Bind an event handler to the "mouseover" JavaScript event.
-     *
-     * @param handler A function to execute when the event is triggered.
-     */
-    mouseover(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "mouseover" JavaScript event.
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute when the event is triggered.
-     */
-    mouseover(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
-
-    /**
-     * Trigger the "mouseup" event on an element.
-     */
-    mouseup(): JQuery;
-    /**
-     * Bind an event handler to the "mouseup" JavaScript event.
-     *
-     * @param handler A function to execute when the event is triggered.
-     */
-    mouseup(handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "mouseup" JavaScript event.
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute when the event is triggered.
-     */
-    mouseup(eventData: Object, handler: (eventObject: JQueryMouseEventObject) => any): JQuery;
-
-    /**
-     * Remove an event handler.
-     */
-    off(): JQuery;
-    /**
-     * Remove an event handler.
-     *
-     * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
-     * @param selector A selector which should match the one originally passed to .on() when attaching event handlers.
-     * @param handler A handler function previously attached for the event(s), or the special value false.
-     */
-    off(events: string, selector?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Remove an event handler.
-     *
-     * @param events One or more space-separated event types and optional namespaces, or just namespaces, such as "click", "keydown.myPlugin", or ".myPlugin".
-     * @param handler A handler function previously attached for the event(s), or the special value false.
-     */
-    off(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Remove an event handler.
-     *
-     * @param events An object where the string keys represent one or more space-separated event types and optional namespaces, and the values represent handler functions previously attached for the event(s).
-     * @param selector A selector which should match the one originally passed to .on() when attaching event handlers.
-     */
-    off(events: { [key: string]: any; }, selector?: string): JQuery;
-
-    /**
-     * Attach an event handler function for one or more events to the selected elements.
-     *
-     * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
-     * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false. Rest parameter args is for optional parameters passed to jQuery.trigger(). Note that the actual parameters on the event handler function must be marked as optional (? syntax).
-     */
-    on(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
-    /**
-     * Attach an event handler function for one or more events to the selected elements.
-     *
-     * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
-     * @param data Data to be passed to the handler in event.data when an event is triggered.
-     * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
-    */
-    on(events: string, data : any, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
-    /**
-     * Attach an event handler function for one or more events to the selected elements.
-     *
-     * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
-     * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
-     * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
-     */
-    on(events: string, selector: string, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery;
-    /**
-     * Attach an event handler function for one or more events to the selected elements.
-     *
-     * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
-     * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
-     * @param data Data to be passed to the handler in event.data when an event is triggered.
-     * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
-     */
-    on(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery;
-    /**
-     * Attach an event handler function for one or more events to the selected elements.
-     *
-     * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
-     * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.
-     * @param data Data to be passed to the handler in event.data when an event occurs.
-     */
-    on(events: { [key: string]: any; }, selector?: string, data?: any): JQuery;
-    /**
-     * Attach an event handler function for one or more events to the selected elements.
-     *
-     * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
-     * @param data Data to be passed to the handler in event.data when an event occurs.
-     */
-    on(events: { [key: string]: any; }, data?: any): JQuery;
-
-    /**
-     * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
-     *
-     * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
-     * @param handler A function to execute at the time the event is triggered.
-     */
-    one(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
-     *
-     * @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
-     * @param data An object containing data that will be passed to the event handler.
-     * @param handler A function to execute at the time the event is triggered.
-     */
-    one(events: string, data: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
-
-    /**
-     * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
-     *
-     * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
-     * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
-     * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
-     */
-    one(events: string, selector: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
-     *
-     * @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
-     * @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
-     * @param data Data to be passed to the handler in event.data when an event is triggered.
-     * @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
-     */
-    one(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
-
-    /**
-     * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
-     *
-     * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
-     * @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.
-     * @param data Data to be passed to the handler in event.data when an event occurs.
-     */
-    one(events: { [key: string]: any; }, selector?: string, data?: any): JQuery;
-
-    /**
-     * Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
-     *
-     * @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
-     * @param data Data to be passed to the handler in event.data when an event occurs.
-     */
-    one(events: { [key: string]: any; }, data?: any): JQuery;
-
-
-    /**
-     * Specify a function to execute when the DOM is fully loaded.
-     *
-     * @param handler A function to execute after the DOM is ready.
-     */
-    ready(handler: (jQueryAlias?: JQueryStatic) => any): JQuery;
-
-    /**
-     * Trigger the "resize" event on an element.
-     */
-    resize(): JQuery;
-    /**
-     * Bind an event handler to the "resize" JavaScript event.
-     *
-     * @param handler A function to execute each time the event is triggered.
-     */
-    resize(handler: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "resize" JavaScript event.
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute each time the event is triggered.
-     */
-    resize(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
-
-    /**
-     * Trigger the "scroll" event on an element.
-     */
-    scroll(): JQuery;
-    /**
-     * Bind an event handler to the "scroll" JavaScript event.
-     *
-     * @param handler A function to execute each time the event is triggered.
-     */
-    scroll(handler: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "scroll" JavaScript event.
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute each time the event is triggered.
-     */
-    scroll(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
-
-    /**
-     * Trigger the "select" event on an element.
-     */
-    select(): JQuery;
-    /**
-     * Bind an event handler to the "select" JavaScript event.
-     *
-     * @param handler A function to execute each time the event is triggered.
-     */
-    select(handler: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "select" JavaScript event.
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute each time the event is triggered.
-     */
-    select(eventData: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
-
-    /**
-     * Trigger the "submit" event on an element.
-     */
-    submit(): JQuery;
-    /**
-     * Bind an event handler to the "submit" JavaScript event
-     *
-     * @param handler A function to execute each time the event is triggered.
-     */
-    submit(handler: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "submit" JavaScript event
-     *
-     * @param eventData An object containing data that will be passed to the event handler.
-     * @param handler A function to execute each time the event is triggered.
-     */
-    submit(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
-
-    /**
-     * Execute all handlers and behaviors attached to the matched elements for the given event type.
-     * 
-     * @param eventType A string containing a JavaScript event type, such as click or submit.
-     * @param extraParameters Additional parameters to pass along to the event handler.
-     */
-    trigger(eventType: string, extraParameters?: any[]|Object): JQuery;
-    /**
-     * Execute all handlers and behaviors attached to the matched elements for the given event type.
-     * 
-     * @param event A jQuery.Event object.
-     * @param extraParameters Additional parameters to pass along to the event handler.
-     */
-    trigger(event: JQueryEventObject, extraParameters?: any[]|Object): JQuery;
-
-    /**
-     * Execute all handlers attached to an element for an event.
-     * 
-     * @param eventType A string containing a JavaScript event type, such as click or submit.
-     * @param extraParameters An array of additional parameters to pass along to the event handler.
-     */
-    triggerHandler(eventType: string, ...extraParameters: any[]): Object;
-
-    /**
-     * Execute all handlers attached to an element for an event.
-     * 
-     * @param event A jQuery.Event object.
-     * @param extraParameters An array of additional parameters to pass along to the event handler.
-     */
-    triggerHandler(event: JQueryEventObject, ...extraParameters: any[]): Object;
-
-    /**
-     * Remove a previously-attached event handler from the elements.
-     * 
-     * @param eventType A string containing a JavaScript event type, such as click or submit.
-     * @param handler The function that is to be no longer executed.
-     */
-    unbind(eventType?: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Remove a previously-attached event handler from the elements.
-     * 
-     * @param eventType A string containing a JavaScript event type, such as click or submit.
-     * @param fls Unbinds the corresponding 'return false' function that was bound using .bind( eventType, false ).
-     */
-    unbind(eventType: string, fls: boolean): JQuery;
-    /**
-     * Remove a previously-attached event handler from the elements.
-     * 
-     * @param evt A JavaScript event object as passed to an event handler.
-     */
-    unbind(evt: any): JQuery;
-
-    /**
-     * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
-     */
-    undelegate(): JQuery;
-    /**
-     * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
-     * 
-     * @param selector A selector which will be used to filter the event results.
-     * @param eventType A string containing a JavaScript event type, such as "click" or "keydown"
-     * @param handler A function to execute at the time the event is triggered.
-     */
-    undelegate(selector: string, eventType: string, handler?: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
-     * 
-     * @param selector A selector which will be used to filter the event results.
-     * @param events An object of one or more event types and previously bound functions to unbind from them.
-     */
-    undelegate(selector: string, events: Object): JQuery;
-    /**
-     * Remove a handler from the event for all elements which match the current selector, based upon a specific set of root elements.
-     * 
-     * @param namespace A string containing a namespace to unbind all events from.
-     */
-    undelegate(namespace: string): JQuery;
-
-    /**
-     * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8)
-     * 
-     * @param handler A function to execute when the event is triggered.
-     */
-    unload(handler: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "unload" JavaScript event. (DEPRECATED from v1.8)
-     * 
-     * @param eventData A plain object of data that will be passed to the event handler.
-     * @param handler A function to execute when the event is triggered.
-     */
-    unload(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
-
-    /**
-     * The DOM node context originally passed to jQuery(); if none was passed then context will likely be the document. (DEPRECATED from v1.10)
-     */
-    context: Element;
-
-    jquery: string;
-
-    /**
-     * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8)
-     * 
-     * @param handler A function to execute when the event is triggered.
-     */
-    error(handler: (eventObject: JQueryEventObject) => any): JQuery;
-    /**
-     * Bind an event handler to the "error" JavaScript event. (DEPRECATED from v1.8)
-     * 
-     * @param eventData A plain object of data that will be passed to the event handler.
-     * @param handler A function to execute when the event is triggered.
-     */
-    error(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
-
-    /**
-     * Add a collection of DOM elements onto the jQuery stack.
-     * 
-     * @param elements An array of elements to push onto the stack and make into a new jQuery object.
-     */
-    pushStack(elements: any[]): JQuery;
-    /**
-     * Add a collection of DOM elements onto the jQuery stack.
-     * 
-     * @param elements An array of elements to push onto the stack and make into a new jQuery object.
-     * @param name The name of a jQuery method that generated the array of elements.
-     * @param arguments The arguments that were passed in to the jQuery method (for serialization).
-     */
-    pushStack(elements: any[], name: string, arguments: any[]): JQuery;
-
-    /**
-     * Insert content, specified by the parameter, after each element in the set of matched elements.
-     * 
-     * param content1 HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements.
-     * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert after each element in the set of matched elements.
-     */
-    after(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery;
-    /**
-     * Insert content, specified by the parameter, after each element in the set of matched elements.
-     * 
-     * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert after each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
-     */
-    after(func: (index: number, html: string) => string|Element|JQuery): JQuery;
-
-    /**
-     * Insert content, specified by the parameter, to the end of each element in the set of matched elements.
-     * 
-     * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the end of each element in the set of matched elements.
-     * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the end of each element in the set of matched elements.
-     */
-    append(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery;
-    /**
-     * Insert content, specified by the parameter, to the end of each element in the set of matched elements.
-     * 
-     * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the end of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
-     */
-    append(func: (index: number, html: string) => string|Element|JQuery): JQuery;
-
-    /**
-     * Insert every element in the set of matched elements to the end of the target.
-     * 
-     * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the end of the element(s) specified by this parameter.
-     */
-    appendTo(target: JQuery|any[]|Element|string): JQuery;
-
-    /**
-     * Insert content, specified by the parameter, before each element in the set of matched elements.
-     * 
-     * param content1 HTML string, DOM element, array of elements, or jQuery object to insert before each element in the set of matched elements.
-     * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert before each element in the set of matched elements.
-     */
-    before(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery;
-    /**
-     * Insert content, specified by the parameter, before each element in the set of matched elements.
-     * 
-     * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert before each element in the set of matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
-     */
-    before(func: (index: number, html: string) => string|Element|JQuery): JQuery;
-
-    /**
-     * Create a deep copy of the set of matched elements.
-     * 
-     * param withDataAndEvents A Boolean indicating whether event handlers and data should be copied along with the elements. The default value is false.
-     * param deepWithDataAndEvents A Boolean indicating whether event handlers and data for all children of the cloned element should be copied. By default its value matches the first argument's value (which defaults to false).
-     */
-    clone(withDataAndEvents?: boolean, deepWithDataAndEvents?: boolean): JQuery;
-
-    /**
-     * Remove the set of matched elements from the DOM.
-     * 
-     * param selector A selector expression that filters the set of matched elements to be removed.
-     */
-    detach(selector?: string): JQuery;
-
-    /**
-     * Remove all child nodes of the set of matched elements from the DOM.
-     */
-    empty(): JQuery;
-
-    /**
-     * Insert every element in the set of matched elements after the target.
-     * 
-     * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter.
-     */
-    insertAfter(target: JQuery|any[]|Element|Text|string): JQuery;
-
-    /**
-     * Insert every element in the set of matched elements before the target.
-     * 
-     * param target A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter.
-     */
-    insertBefore(target: JQuery|any[]|Element|Text|string): JQuery;
-
-    /**
-     * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
-     * 
-     * param content1 DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements.
-     * param content2 One or more additional DOM elements, arrays of elements, HTML strings, or jQuery objects to insert at the beginning of each element in the set of matched elements.
-     */
-    prepend(content1: JQuery|any[]|Element|Text|string, ...content2: any[]): JQuery;
-    /**
-     * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
-     * 
-     * param func A function that returns an HTML string, DOM element(s), or jQuery object to insert at the beginning of each element in the set of matched elements. Receives the index position of the element in the set and the old HTML value of the element as arguments. Within the function, this refers to the current element in the set.
-     */
-    prepend(func: (index: number, html: string) => string|Element|JQuery): JQuery;
-
-    /**
-     * Insert every element in the set of matched elements to the beginning of the target.
-     * 
-     * @param target A selector, element, HTML string, array of elements, or jQuery object; the matched set of elements will be inserted at the beginning of the element(s) specified by this parameter.
-     */
-    prependTo(target: JQuery|any[]|Element|string): JQuery;
-
-    /**
-     * Remove the set of matched elements from the DOM.
-     * 
-     * @param selector A selector expression that filters the set of matched elements to be removed.
-     */
-    remove(selector?: string): JQuery;
-
-    /**
-     * Replace each target element with the set of matched elements.
-     * 
-     * @param target A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace.
-     */
-    replaceAll(target: JQuery|any[]|Element|string): JQuery;
-
-    /**
-     * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
-     * 
-     * param newContent The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object.
-     */
-    replaceWith(newContent: JQuery|any[]|Element|Text|string): JQuery;
-    /**
-     * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
-     * 
-     * param func A function that returns content with which to replace the set of matched elements.
-     */
-    replaceWith(func: () => Element|JQuery): JQuery;
-
-    /**
-     * Get the combined text contents of each element in the set of matched elements, including their descendants.
-     */
-    text(): string;
-    /**
-     * Set the content of each element in the set of matched elements to the specified text.
-     * 
-     * @param text The text to set as the content of each matched element. When Number or Boolean is supplied, it will be converted to a String representation.
-     */
-    text(text: string|number|boolean): JQuery;
-    /**
-     * Set the content of each element in the set of matched elements to the specified text.
-     * 
-     * @param func A function returning the text content to set. Receives the index position of the element in the set and the old text value as arguments.
-     */
-    text(func: (index: number, text: string) => string): JQuery;
-
-    /**
-     * Retrieve all the elements contained in the jQuery set, as an array.
-     */
-    toArray(): any[];
-
-    /**
-     * Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
-     */
-    unwrap(): JQuery;
-
-    /**
-     * Wrap an HTML structure around each element in the set of matched elements.
-     * 
-     * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.
-     */
-    wrap(wrappingElement: JQuery|Element|string): JQuery;
-    /**
-     * Wrap an HTML structure around each element in the set of matched elements.
-     * 
-     * @param func A callback function returning the HTML content or jQuery object to wrap around the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
-     */
-    wrap(func: (index: number) => string|JQuery): JQuery;
-
-    /**
-     * Wrap an HTML structure around all elements in the set of matched elements.
-     * 
-     * @param wrappingElement A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements.
-     */
-    wrapAll(wrappingElement: JQuery|Element|string): JQuery;
-    wrapAll(func: (index: number) => string): JQuery;
-
-    /**
-     * Wrap an HTML structure around the content of each element in the set of matched elements.
-     * 
-     * @param wrappingElement An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements.
-     */
-    wrapInner(wrappingElement: JQuery|Element|string): JQuery;
-    /**
-     * Wrap an HTML structure around the content of each element in the set of matched elements.
-     * 
-     * @param func A callback function which generates a structure to wrap around the content of the matched elements. Receives the index position of the element in the set as an argument. Within the function, this refers to the current element in the set.
-     */
-    wrapInner(func: (index: number) => string): JQuery;
-
-    /**
-     * Iterate over a jQuery object, executing a function for each matched element.
-     * 
-     * @param func A function to execute for each matched element.
-     */
-    each(func: (index: number, elem: Element) => any): JQuery;
-
-    /**
-     * Retrieve one of the elements matched by the jQuery object.
-     * 
-     * @param index A zero-based integer indicating which element to retrieve.
-     */
-    get(index: number): HTMLElement;
-    /**
-     * Retrieve the elements matched by the jQuery object.
-     */
-    get(): any[];
-
-    /**
-     * Search for a given element from among the matched elements.
-     */
-    index(): number;
-    /**
-     * Search for a given element from among the matched elements.
-     * 
-     * @param selector A selector representing a jQuery collection in which to look for an element.
-     */
-    index(selector: string|JQuery|Element): number;
-
-    /**
-     * The number of elements in the jQuery object.
-     */
-    length: number;
-    /**
-     * A selector representing selector passed to jQuery(), if any, when creating the original set.
-     * version deprecated: 1.7, removed: 1.9
-     */
-    selector: string;
-    [index: string]: any;
-    [index: number]: HTMLElement;
-
-    /**
-     * Add elements to the set of matched elements.
-     * 
-     * @param selector A string representing a selector expression to find additional elements to add to the set of matched elements.
-     * @param context The point in the document at which the selector should begin matching; similar to the context argument of the $(selector, context) method.
-     */
-    add(selector: string, context?: Element): JQuery;
-    /**
-     * Add elements to the set of matched elements.
-     * 
-     * @param elements One or more elements to add to the set of matched elements.
-     */
-    add(...elements: Element[]): JQuery;
-    /**
-     * Add elements to the set of matched elements.
-     * 
-     * @param html An HTML fragment to add to the set of matched elements.
-     */
-    add(html: string): JQuery;
-    /**
-     * Add elements to the set of matched elements.
-     * 
-     * @param obj An existing jQuery object to add to the set of matched elements.
-     */
-    add(obj: JQuery): JQuery;
-
-    /**
-     * Get the children of each element in the set of matched elements, optionally filtered by a selector.
-     * 
-     * @param selector A string containing a selector expression to match elements against.
-     */
-    children(selector?: string): JQuery;
-
-    /**
-     * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
-     * 
-     * @param selector A string containing a selector expression to match elements against.
-     */
-    closest(selector: string): JQuery;
-    /**
-     * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
-     * 
-     * @param selector A string containing a selector expression to match elements against.
-     * @param context A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead.
-     */
-    closest(selector: string, context?: Element): JQuery;
-    /**
-     * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
-     * 
-     * @param obj A jQuery object to match elements against.
-     */
-    closest(obj: JQuery): JQuery;
-    /**
-     * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
-     * 
-     * @param element An element to match elements against.
-     */
-    closest(element: Element): JQuery;
-
-    /**
-     * Get an array of all the elements and selectors matched against the current element up through the DOM tree.
-     * 
-     * @param selectors An array or string containing a selector expression to match elements against (can also be a jQuery object).
-     * @param context A DOM element within which a matching element may be found. If no context is passed in then the context of the jQuery set will be used instead.
-     */
-    closest(selectors: any, context?: Element): any[];
-
-    /**
-     * Get the children of each element in the set of matched elements, including text and comment nodes.
-     */
-    contents(): JQuery;
-
-    /**
-     * End the most recent filtering operation in the current chain and return the set of matched elements to its previous state.
-     */
-    end(): JQuery;
-
-    /**
-     * Reduce the set of matched elements to the one at the specified index.
-     * 
-     * @param index An integer indicating the 0-based position of the element. OR An integer indicating the position of the element, counting backwards from the last element in the set.
-     *  
-     */
-    eq(index: number): JQuery;
-
-    /**
-     * Reduce the set of matched elements to those that match the selector or pass the function's test.
-     * 
-     * @param selector A string containing a selector expression to match the current set of elements against.
-     */
-    filter(selector: string): JQuery;
-    /**
-     * Reduce the set of matched elements to those that match the selector or pass the function's test.
-     * 
-     * @param func A function used as a test for each element in the set. this is the current DOM element.
-     */
-    filter(func: (index: number, element: Element) => any): JQuery;
-    /**
-     * Reduce the set of matched elements to those that match the selector or pass the function's test.
-     * 
-     * @param element An element to match the current set of elements against.
-     */
-    filter(element: Element): JQuery;
-    /**
-     * Reduce the set of matched elements to those that match the selector or pass the function's test.
-     * 
-     * @param obj An existing jQuery object to match the current set of elements against.
-     */
-    filter(obj: JQuery): JQuery;
-
-    /**
-     * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
-     * 
-     * @param selector A string containing a selector expression to match elements against.
-     */
-    find(selector: string): JQuery;
-    /**
-     * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
-     * 
-     * @param element An element to match elements against.
-     */
-    find(element: Element): JQuery;
-    /**
-     * Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.
-     * 
-     * @param obj A jQuery object to match elements against.
-     */
-    find(obj: JQuery): JQuery;
-
-    /**
-     * Reduce the set of matched elements to the first in the set.
-     */
-    first(): JQuery;
-
-    /**
-     * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
-     * 
-     * @param selector A string containing a selector expression to match elements against.
-     */
-    has(selector: string): JQuery;
-    /**
-     * Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
-     * 
-     * @param contained A DOM element to match elements against.
-     */
-    has(contained: Element): JQuery;
-
-    /**
-     * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.
-     * 
-     * @param selector A string containing a selector expression to match elements against.
-     */
-    is(selector: string): boolean;
-    /**
-     * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.
-     * 
-     * @param func A function used as a test for the set of elements. It accepts one argument, index, which is the element's index in the jQuery collection.Within the function, this refers to the current DOM element.
-     */
-    is(func: (index: number, element: Element) => boolean): boolean;
-    /**
-     * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.
-     * 
-     * @param obj An existing jQuery object to match the current set of elements against.
-     */
-    is(obj: JQuery): boolean;
-    /**
-     * Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.
-     * 
-     * @param elements One or more elements to match the current set of elements against.
-     */
-    is(elements: any): boolean;
-
-    /**
-     * Reduce the set of matched elements to the final one in the set.
-     */
-    last(): JQuery;
-
-    /**
-     * Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.
-     * 
-     * @param callback A function object that will be invoked for each element in the current set.
-     */
-    map(callback: (index: number, domElement: Element) => any): JQuery;
-
-    /**
-     * Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector.
-     * 
-     * @param selector A string containing a selector expression to match elements against.
-     */
-    next(selector?: string): JQuery;
-
-    /**
-     * Get all following siblings of each element in the set of matched elements, optionally filtered by a selector.
-     * 
-     * @param selector A string containing a selector expression to match elements against.
-     */
-    nextAll(selector?: string): JQuery;
-
-    /**
-     * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
-     * 
-     * @param selector A string containing a selector expression to indicate where to stop matching following sibling elements.
-     * @param filter A string containing a selector expression to match elements against.
-     */
-    nextUntil(selector?: string, filter?: string): JQuery;
-    /**
-     * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
-     * 
-     * @param element A DOM node or jQuery object indicating where to stop matching following sibling elements.
-     * @param filter A string containing a selector expression to match elements against.
-     */
-    nextUntil(element?: Element, filter?: string): JQuery;
-    /**
-     * Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.
-     * 
-     * @param obj A DOM node or jQuery object indicating where to stop matching following sibling elements.
-     * @param filter A string containing a selector expression to match elements against.
-     */
-    nextUntil(obj?: JQuery, filter?: string): JQuery;
-
-    /**
-     * Remove elements from the set of matched elements.
-     * 
-     * @param selector A string containing a selector expression to match elements against.
-     */
-    not(selector: string): JQuery;
-    /**
-     * Remove elements from the set of matched elements.
-     * 
-     * @param func A function used as a test for each element in the set. this is the current DOM element.
-     */
-    not(func: (index: number, element: Element) => boolean): JQuery;
-    /**
-     * Remove elements from the set of matched elements.
-     * 
-     * @param elements One or more DOM elements to remove from the matched set.
-     */
-    not(elements: Element|Element[]): JQuery;
-    /**
-     * Remove elements from the set of matched elements.
-     * 
-     * @param obj An existing jQuery object to match the current set of elements against.
-     */
-    not(obj: JQuery): JQuery;
-
-    /**
-     * Get the closest ancestor element that is positioned.
-     */
-    offsetParent(): JQuery;
-
-    /**
-     * Get the parent of each element in the current set of matched elements, optionally filtered by a selector.
-     * 
-     * @param selector A string containing a selector expression to match elements against.
-     */
-    parent(selector?: string): JQuery;
-
-    /**
-     * Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector.
-     * 
-     * @param selector A string containing a selector expression to match elements against.
-     */
-    parents(selector?: string): JQuery;
-
-    /**
-     * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.
-     * 
-     * @param selector A string containing a selector expression to indicate where to stop matching ancestor elements.
-     * @param filter A string containing a selector expression to match elements against.
-     */
-    parentsUntil(selector?: string, filter?: string): JQuery;
-    /**
-     * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.
-     * 
-     * @param element A DOM node or jQuery object indicating where to stop matching ancestor elements.
-     * @param filter A string containing a selector expression to match elements against.
-     */
-    parentsUntil(element?: Element, filter?: string): JQuery;
-    /**
-     * Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.
-     * 
-     * @param obj A DOM node or jQuery object indicating where to stop matching ancestor elements.
-     * @param filter A string containing a selector expression to match elements against.
-     */
-    parentsUntil(obj?: JQuery, filter?: string): JQuery;
-
-    /**
-     * Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector.
-     * 
-     * @param selector A string containing a selector expression to match elements against.
-     */
-    prev(selector?: string): JQuery;
-
-    /**
-     * Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector.
-     * 
-     * @param selector A string containing a selector expression to match elements against.
-     */
-    prevAll(selector?: string): JQuery;
-
-    /**
-     * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
-     * 
-     * @param selector A string containing a selector expression to indicate where to stop matching preceding sibling elements.
-     * @param filter A string containing a selector expression to match elements against.
-     */
-    prevUntil(selector?: string, filter?: string): JQuery;
-    /**
-     * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
-     * 
-     * @param element A DOM node or jQuery object indicating where to stop matching preceding sibling elements.
-     * @param filter A string containing a selector expression to match elements against.
-     */
-    prevUntil(element?: Element, filter?: string): JQuery;
-    /**
-     * Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.
-     * 
-     * @param obj A DOM node or jQuery object indicating where to stop matching preceding sibling elements.
-     * @param filter A string containing a selector expression to match elements against.
-     */
-    prevUntil(obj?: JQuery, filter?: string): JQuery;
-
-    /**
-     * Get the siblings of each element in the set of matched elements, optionally filtered by a selector.
-     * 
-     * @param selector A string containing a selector expression to match elements against.
-     */
-    siblings(selector?: string): JQuery;
-
-    /**
-     * Reduce the set of matched elements to a subset specified by a range of indices.
-     * 
-     * @param start An integer indicating the 0-based position at which the elements begin to be selected. If negative, it indicates an offset from the end of the set.
-     * @param end An integer indicating the 0-based position at which the elements stop being selected. If negative, it indicates an offset from the end of the set. If omitted, the range continues until the end of the set.
-     */
-    slice(start: number, end?: number): JQuery;
-
-    /**
-     * Show the queue of functions to be executed on the matched elements.
-     * 
-     * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
-     */
-    queue(queueName?: string): any[];
-    /**
-     * Manipulate the queue of functions to be executed, once for each matched element.
-     * 
-     * @param newQueue An array of functions to replace the current queue contents.
-     */
-    queue(newQueue: Function[]): JQuery;
-    /**
-     * Manipulate the queue of functions to be executed, once for each matched element.
-     * 
-     * @param callback The new function to add to the queue, with a function to call that will dequeue the next item.
-     */
-    queue(callback: Function): JQuery;
-    /**
-     * Manipulate the queue of functions to be executed, once for each matched element.
-     * 
-     * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
-     * @param newQueue An array of functions to replace the current queue contents.
-     */
-    queue(queueName: string, newQueue: Function[]): JQuery;
-    /**
-     * Manipulate the queue of functions to be executed, once for each matched element.
-     * 
-     * @param queueName A string containing the name of the queue. Defaults to fx, the standard effects queue.
-     * @param callback The new function to add to the queue, with a function to call that will dequeue the next item.
-     */
-    queue(queueName: string, callback: Function): JQuery;
-}
-declare module "jquery" {
-    export = $;
-}
-declare var jQuery: JQueryStatic;
-declare var $: JQueryStatic;
diff --git a/typings/globals/jquery/typings.json b/typings/globals/jquery/typings.json
deleted file mode 100644
index e235da4..0000000
--- a/typings/globals/jquery/typings.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "resolution": "main",
-  "tree": {
-    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/dc9dabe74a5be62613b17a3605309783a12ff28a/jquery/jquery.d.ts",
-    "raw": "github:DefinitelyTyped/DefinitelyTyped/jquery/jquery.d.ts#dc9dabe74a5be62613b17a3605309783a12ff28a",
-    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/dc9dabe74a5be62613b17a3605309783a12ff28a/jquery/jquery.d.ts"
-  }
-}
diff --git a/typings/globals/require/index.d.ts b/typings/globals/require/index.d.ts
deleted file mode 100644
index ca713f4..0000000
--- a/typings/globals/require/index.d.ts
+++ /dev/null
@@ -1,368 +0,0 @@
-// Generated by typings
-// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/56295f5058cac7ae458540423c50ac2dcf9fc711/requirejs/require.d.ts
-declare module 'module' {
-	var mod: {
-		config: () => any;
-		id: string;
-		uri: string;
-	}
-	export = mod;
-}
-
-interface RequireError extends Error {
-
-	/**
-	* The error ID that maps to an ID on a web page.
-	**/
-	requireType: string;
-
-	/**
-	* Required modules.
-	**/
-	requireModules: string[];
-
-	/**
-	* The original error, if there is one (might be null).
-	**/
-	originalError: Error;
-}
-
-interface RequireShim {
-
-	/**
-	* List of dependencies.
-	**/
-	deps?: string[];
-
-	/**
-	* Name the module will be exported as.
-	**/
-	exports?: string;
-
-	/**
-	* Initialize function with all dependcies passed in,
-	* if the function returns a value then that value is used
-	* as the module export value instead of the object
-	* found via the 'exports' string.
-	* @param dependencies
-	* @return
-	**/
-	init?: (...dependencies: any[]) => any;
-}
-
-interface RequireConfig {
-
-	// The root path to use for all module lookups.
-	baseUrl?: string;
-
-	// Path mappings for module names not found directly under
-	// baseUrl.
-	paths?: { [key: string]: any; };
-
-
-	// Dictionary of Shim's.
-	// does not cover case of key->string[]
-	shim?: { [key: string]: RequireShim; };
-
-	/**
-	* For the given module prefix, instead of loading the
-	* module with the given ID, substitude a different
-	* module ID.
-	*
-	* @example
-	* requirejs.config({
-	*	map: {
-	*		'some/newmodule': {
-	*			'foo': 'foo1.2'
-	*		},
-	*		'some/oldmodule': {
-	*			'foo': 'foo1.0'
-	*		}
-	*	}
-	* });
-	**/
-	map?: {
-		[id: string]: {
-			[id: string]: string;
-		};
-	};
-
-	/**
-	* Allows pointing multiple module IDs to a module ID that contains a bundle of modules.
-	*
-	* @example
-	* requirejs.config({
-	*	bundles: {
-	*		'primary': ['main', 'util', 'text', 'text!template.html'],
-	*		'secondary': ['text!secondary.html']
-	*	}
-	* });
-	**/
-	bundles?: { [key: string]: string[]; };
-
-	/**
-	* AMD configurations, use module.config() to access in
-	* define() functions
-	**/
-	config?: { [id: string]: {}; };
-
-	/**
-	* Configures loading modules from CommonJS packages.
-	**/
-	packages?: {};
-
-	/**
-	* The number of seconds to wait before giving up on loading
-	* a script.  The default is 7 seconds.
-	**/
-	waitSeconds?: number;
-
-	/**
-	* A name to give to a loading context.  This allows require.js
-	* to load multiple versions of modules in a page, as long as
-	* each top-level require call specifies a unique context string.
-	**/
-	context?: string;
-
-	/**
-	* An array of dependencies to load.
-	**/
-	deps?: string[];
-
-	/**
-	* A function to pass to require that should be require after
-	* deps have been loaded.
-	* @param modules
-	**/
-	callback?: (...modules: any[]) => void;
-
-	/**
-	* If set to true, an error will be thrown if a script loads
-	* that does not call define() or have shim exports string
-	* value that can be checked.
-	**/
-	enforceDefine?: boolean;
-
-	/**
-	* If set to true, document.createElementNS() will be used
-	* to create script elements.
-	**/
-	xhtml?: boolean;
-
-	/**
-	* Extra query string arguments appended to URLs that RequireJS
-	* uses to fetch resources.  Most useful to cache bust when
-	* the browser or server is not configured correctly.
-	*
-	* @example
-	* urlArgs: "bust= + (new Date()).getTime()
-	**/
-	urlArgs?: string;
-
-	/**
-	* Specify the value for the type="" attribute used for script
-	* tags inserted into the document by RequireJS.  Default is
-	* "text/javascript".  To use Firefox's JavasScript 1.8
-	* features, use "text/javascript;version=1.8".
-	**/
-	scriptType?: string;
-
-	/**
-	* If set to true, skips the data-main attribute scanning done
-	* to start module loading. Useful if RequireJS is embedded in
-	* a utility library that may interact with other RequireJS
-	* library on the page, and the embedded version should not do
-	* data-main loading.
-	**/
-	skipDataMain?: boolean;
-
-	/**
-	* Allow extending requirejs to support Subresource Integrity
-	* (SRI).
-	**/
-	onNodeCreated?: (node: HTMLScriptElement, config: RequireConfig, moduleName: string, url: string) => void;
-}
-
-// todo: not sure what to do with this guy
-interface RequireModule {
-
-	/**
-	*
-	**/
-	config(): {};
-
-}
-
-/**
-*
-**/
-interface RequireMap {
-
-	/**
-	*
-	**/
-	prefix: string;
-
-	/**
-	*
-	**/
-	name: string;
-
-	/**
-	*
-	**/
-	parentMap: RequireMap;
-
-	/**
-	*
-	**/
-	url: string;
-
-	/**
-	*
-	**/
-	originalName: string;
-
-	/**
-	*
-	**/
-	fullName: string;
-}
-
-interface Require {
-
-	/**
-	* Configure require.js
-	**/
-	config(config: RequireConfig): Require;
-
-	/**
-	* CommonJS require call
-	* @param module Module to load
-	* @return The loaded module
-	*/
-	(module: string): any;
-
-	/**
-	* Start the main app logic.
-	* Callback is optional.
-	* Can alternatively use deps and callback.
-	* @param modules Required modules to load.
-	**/
-	(modules: string[]): void;
-
-	/**
-	* @see Require()
-	* @param ready Called when required modules are ready.
-	**/
-	(modules: string[], ready: Function): void;
-
-	/**
-	* @see http://requirejs.org/docs/api.html#errbacks
-	* @param ready Called when required modules are ready.
-	**/
-	(modules: string[], ready: Function, errback: Function): void;
-
-	/**
-	* Generate URLs from require module
-	* @param module Module to URL
-	* @return URL string
-	**/
-	toUrl(module: string): string;
-
-	/**
-	* Returns true if the module has already been loaded and defined.
-	* @param module Module to check
-	**/
-	defined(module: string): boolean;
-
-	/**
-	* Returns true if the module has already been requested or is in the process of loading and should be available at some point.
-	* @param module Module to check
-	**/
-	specified(module: string): boolean;
-
-	/**
-	* On Error override
-	* @param err
-	**/
-	onError(err: RequireError, errback?: (err: RequireError) => void): void;
-
-	/**
-	* Undefine a module
-	* @param module Module to undefine.
-	**/
-	undef(module: string): void;
-
-	/**
-	* Semi-private function, overload in special instance of undef()
-	**/
-	onResourceLoad(context: Object, map: RequireMap, depArray: RequireMap[]): void;
-}
-
-interface RequireDefine {
-
-	/**
-	* Define Simple Name/Value Pairs
-	* @param config Dictionary of Named/Value pairs for the config.
-	**/
-	(config: { [key: string]: any; }): void;
-
-	/**
-	* Define function.
-	* @param func: The function module.
-	**/
-	(func: () => any): void;
-
-	/**
-	* Define function with dependencies.
-	* @param deps List of dependencies module IDs.
-	* @param ready Callback function when the dependencies are loaded.
-	*	callback param deps module dependencies
-	*	callback return module definition
-	**/
-    	(deps: string[], ready: Function): void;
-
-	/**
-	*  Define module with simplified CommonJS wrapper.
-	* @param ready
-	*	callback require requirejs instance
-	*	callback exports exports object
-	*	callback module module
-	*	callback return module definition
-	**/
-	(ready: (require: Require, exports: { [key: string]: any; }, module: RequireModule) => any): void;
-
-	/**
-	* Define a module with a name and dependencies.
-	* @param name The name of the module.
-	* @param deps List of dependencies module IDs.
-	* @param ready Callback function when the dependencies are loaded.
-	*	callback deps module dependencies
-	*	callback return module definition
-	**/
-	(name: string, deps: string[], ready: Function): void;
-
-	/**
-	* Define a module with a name.
-	* @param name The name of the module.
-	* @param ready Callback function when the dependencies are loaded.
-	*	callback return module definition
-	**/
-	(name: string, ready: Function): void;
-
-	/**
-	* Used to allow a clear indicator that a global define function (as needed for script src browser loading) conforms
-	* to the AMD API, any global define function SHOULD have a property called "amd" whose value is an object.
-	* This helps avoid conflict with any other existing JavaScript code that could have defined a define() function
-	* that does not conform to the AMD API.
-	* define.amd.jQuery is specific to jQuery and indicates that the loader is able to account for multiple version
-	* of jQuery being loaded simultaneously.
-	*/
-	amd: Object;
-}
-
-// Ambient declarations for 'require' and 'define'
-declare var requirejs: Require;
-declare var require: Require;
-declare var define: RequireDefine;
diff --git a/typings/globals/require/typings.json b/typings/globals/require/typings.json
deleted file mode 100644
index 446025f..0000000
--- a/typings/globals/require/typings.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "resolution": "main",
-  "tree": {
-    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/56295f5058cac7ae458540423c50ac2dcf9fc711/requirejs/require.d.ts",
-    "raw": "registry:dt/require#2.1.20+20160316155526",
-    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/56295f5058cac7ae458540423c50ac2dcf9fc711/requirejs/require.d.ts"
-  }
-}
diff --git a/typings/globals/socket.io-client/index.d.ts b/typings/globals/socket.io-client/index.d.ts
deleted file mode 100644
index db58959..0000000
--- a/typings/globals/socket.io-client/index.d.ts
+++ /dev/null
@@ -1,663 +0,0 @@
-// Generated by typings
-// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/socket.io-client/socket.io-client.d.ts
-declare var io: SocketIOClientStatic;
-
-declare module 'socket.io-client' {
-	export = io;
-}
-
-interface SocketIOClientStatic {
-
-	/**
-	 * Looks up an existing 'Manager' for multiplexing. If the user summons:
-	 * 	'io( 'http://localhost/a' );'
-	 * 	'io( 'http://localhost/b' );'
-	 *
-	 * We reuse the existing instance based on the same scheme/port/host, and
-	 * we initialize sockets for each namespace. If autoConnect isn't set to
-	 * false in the options, then we'll automatically connect
-	 * @param uri The uri that we'll connect to, including the namespace, where '/' is the default one (e.g. http://localhost:4000/somenamespace)
-	 * @opts Any connect options that we want to pass along
-	 * @return A Socket object
-	 */
-	( uri: string, opts?: SocketIOClient.ConnectOpts ): SocketIOClient.Socket;
-
-	/**
-	 * Auto-connects to the window location and defalt namespace.
-	 * E.g. window.protocol + '//' + window.host + ':80/'
-	 * @opts Any connect options that we want to pass along
-	 * @return A Socket object
-	 */
-	( opts?: SocketIOClient.ConnectOpts ): SocketIOClient.Socket;
-
-	/**
-	 * @see the default constructor (io(uri, opts))
-	 */
-	connect( uri: string, opts?: SocketIOClient.ConnectOpts ): SocketIOClient.Socket;
-
-	/**
-	 * @see the default constructor (io(opts))
-	 */
-	connect( opts?: SocketIOClient.ConnectOpts ): SocketIOClient.Socket;
-
-	/**
-	 * The socket.io protocol revision number this client works with
-	 * @default 4
-	 */
-	protocol: number;
-
-	/**
-	 * Socket constructor - exposed for the standalone build
-	 */
-	Socket: SocketIOClient.Socket;
-
-	/**
-	 * Manager constructor - exposed for the standalone build
-	 */
-	Manager: SocketIOClient.ManagerStatic;
-}
-
-declare namespace SocketIOClient {
-
-	/**
-	 * The base emiter class, used by Socket and Manager
-	 */
-	interface Emitter {
-		/**
-		 * Adds a listener for a particular event. Calling multiple times will add
-		 * multiple listeners
-		 * @param event The event that we're listening for
-		 * @param fn The function to call when we get the event. Parameters depend on the
-		 * event in question
-		 * @return This Emitter
-		 */
-		on( event: string, fn: Function ):Emitter;
-
-		/**
-		 * @see on( event, fn )
-		 */
-		addEventListener( event: string, fn: Function ):Emitter;
-
-		/**
-		 * Adds a listener for a particular event that will be invoked
-		 * a single time before being automatically removed
-		 * @param event The event that we're listening for
-		 * @param fn The function to call when we get the event. Parameters depend on
-		 * the event in question
-		 * @return This Emitter
-		 */
-		once( event: string, fn: Function ):Emitter;
-
-		/**
-		 * Removes a listener for a particular type of event. This will either
-		 * remove a specific listener, or all listeners for this type of event
-		 * @param event The event that we want to remove the listener of
-		 * @param fn The function to remove, or null if we want to remove all functions
-		 * @return This Emitter
-		 */
-		off( event: string, fn?: Function ):Emitter;
-
-		/**
-		 * @see off( event, fn )
-		 */
-		removeListener( event: string, fn?: Function ):Emitter;
-
-		/**
-		 * @see off( event, fn )
-		 */
-		removeEventListener( event: string, fn?: Function ):Emitter;
-
-		/**
-		 * Removes all event listeners on this object
-		 * @return This Emitter
-		 */
-		removeAllListeners():Emitter;
-
-		/**
-		 * Emits 'event' with the given args
-		 * @param event The event that we want to emit
-		 * @param args Optional arguments to emit with the event
-		 * @return Emitter
-		 */
-		emit( event: string, ...args: any[] ):Emitter;
-
-		/**
-		 * Returns all the callbacks for a particular event
-		 * @param event The event that we're looking for the callbacks of
-		 * @return An array of callback Functions, or an empty array if we don't have any
-		 */
-		listeners( event: string ):Function[];
-
-		/**
-		 * Returns if we have listeners for a particular event
-		 * @param event The event that we want to check if we've listeners for
-		 * @return True if we have listeners for this event, false otherwise
-		 */
-		hasListeners( event: string ):boolean;
-	}
-
-	/**
-	 * The Socket static interface
-	 */
-	interface SocketStatic {
-
-		/**
-		 * Creates a new Socket, used for communicating with a specific namespace
-		 * @param io The Manager that's controlling this socket
-		 * @param nsp The namespace that this socket is for (@default '/')
-		 * @return A new Socket
-		 */
-		( io: SocketIOClient.Manager, nsp: string ): Socket;
-
-		/**
-		 * Creates a new Socket, used for communicating with a specific namespace
-		 * @param io The Manager that's controlling this socket
-		 * @param nsp The namespace that this socket is for (@default '/')
-		 * @return A new Socket
-		 */
-		new ( url: string, opts: any ): SocketIOClient.Manager;
-	}
-
-	/**
-	 * The Socket that we use to connect to a Namespace on the server
-	 */
-	interface Socket extends Emitter {
-
-		/**
-		 * The Manager that's controller this socket
-		 */
-		io: SocketIOClient.Manager;
-
-		/**
-		 * The namespace that this socket is for
-		 * @default '/'
-		 */
-		nsp: string;
-
-		/**
-		 * The ID of the socket; matches the server ID and is set when we're connected, and cleared
-		 * when we're disconnected
-		 */
-		id: string;
-
-		/**
-		 * Are we currently connected?
-		 * @default false
-		 */
-		connected: boolean;
-
-		/**
-		 * Are we currently disconnected?
-		 * @default true
-		 */
-		disconnected: boolean;
-
-		/**
-		 * Opens our socket so that it connects. If the 'autoConnect' option for io is
-		 * true (default), then this is called automatically when the Socket is created
-		 */
-		open(): Socket;
-
-		/**
-		 * @see open();
-		 */
-		connect(): Socket;
-
-		/**
-		 * Sends a 'message' event
-		 * @param args Any optional arguments that we want to send
-		 * @see emit
-		 * @return This Socket
-		 */
-		send( ...args: any[] ):Socket;
-
-		/**
-		 * An override of the base emit. If the event is one of:
-		 * 	connect
-		 * 	connect_error
-		 * 	connect_timeout
-		 * 	connecting
-		 * 	disconnect
-		 * 	error
-		 * 	reconnect
-		 * 	reconnect_attempt
-		 * 	reconnect_failed
-		 * 	reconnect_error
-		 * 	reconnecting
-		 * 	ping
-		 * 	pong
-		 * then the event is emitted normally. Otherwise, if we're connected, the
-		 * event is sent. Otherwise, it's buffered.
-		 *
-		 * If the last argument is a function, then it will be called
-		 * as an 'ack' when the response is received. The parameter(s) of the
-		 * ack will be whatever data is returned from the event
-		 * @param event The event that we're emitting
-		 * @param args Optional arguments to send with the event
-		 * @return This Socket
-		 */
-		emit( event: string, ...args: any[] ):Socket;
-
-		/**
-		 * Disconnects the socket manually
-		 * @return This Socket
-		 */
-		close():Socket;
-
-		/**
-		 * @see close()
-		 */
-		disconnect():Socket;
-
-		/**
-		* Sets the compress flag.
-		* @param compress If `true`, compresses the sending data
-		* @return this Socket
-		*/
-		compress(compress: boolean):Socket;
-	}
-
-	/**
-	 * The Manager static interface
-	 */
-	interface ManagerStatic {
-		/**
-		 * Creates a new Manager
-		 * @param uri The URI that we're connecting to (e.g. http://localhost:4000)
-		 * @param opts Any connection options that we want to use (and pass to engine.io)
-		 * @return A Manager
-		 */
-		( uri: string, opts?: SocketIOClient.ConnectOpts ): SocketIOClient.Manager;
-
-		/**
-		 * Creates a new Manager with the default URI (window host)
-		 * @param opts Any connection options that we want to use (and pass to engine.io)
-		 */
-		( opts: SocketIOClient.ConnectOpts ):SocketIOClient.Manager;
-
-		/**
-		 * @see default constructor
-		 */
-		new ( uri: string, opts?: SocketIOClient.ConnectOpts ): SocketIOClient.Manager;
-
-		/**
-		 * @see default constructor
-		 */
-		new ( opts: SocketIOClient.ConnectOpts ):SocketIOClient.Manager;
-	}
-
-	/**
-	 * The Manager class handles all the Namespaces and Sockets that we're using
-	 */
-	interface Manager extends Emitter {
-
-		/**
-		 * All the namespaces currently controlled by this Manager, and the Sockets
-		 * that we're using to communicate with them
-		 */
-		nsps: { [namespace:string]: Socket };
-
-		/**
-		 * The connect options that we used when creating this Manager
-		 */
-		opts: SocketIOClient.ConnectOpts;
-
-		/**
-		 * The state of the Manager. Either 'closed', 'opening', or 'open'
-		 */
-		readyState: string;
-
-		/**
-		 * The URI that this manager is for (host + port), e.g. 'http://localhost:4000'
-		 */
-		uri: string;
-
-		/**
-		 * The currently connected sockets
-		 */
-		connecting: Socket[];
-
-		/**
-		 * If we should auto connect (also used when creating Sockets). Set via the
-		 * opts object
-		 */
-		autoConnect: boolean;
-
-		/**
-		 * Gets if we should reconnect automatically
-		 * @default true
-		 */
-		reconnection(): boolean;
-
-		/**
-		 * Sets if we should reconnect automatically
-		 * @param v True if we should reconnect automatically, false otherwise
-		 * @default true
-		 * @return This Manager
-		 */
-		reconnection( v: boolean ): Manager;
-
-		/**
-		 * Gets the number of reconnection attempts we should try before giving up
-		 * @default Infinity
-		 */
-		reconnectionAttempts(): number;
-
-		/**
-		 * Sets the number of reconnection attempts we should try before giving up
-		 * @param v The number of attempts we should do before giving up
-		 * @default Infinity
-		 * @return This Manager
-		 */
-		reconnectionAttempts( v: number ): Manager;
-
-		/**
-		 * Gets the delay in milliseconds between each reconnection attempt
-		 * @default 1000
-		 */
-		reconnectionDelay(): number;
-
-		/**
-		 * Sets the delay in milliseconds between each reconnection attempt
-		 * @param v The delay in milliseconds
-		 * @default 1000
-		 * @return This Manager
-		 */
-		reconnectionDelay( v: number ): Manager;
-
-		/**
-		 * Gets the max reconnection delay in milliseconds between each reconnection
-		 * attempt
-		 * @default 5000
-		 */
-		reconnectionDelayMax(): number;
-
-		/**
-		 * Sets the max reconnection delay in milliseconds between each reconnection
-		 * attempt
-		 * @param v The max reconnection dleay in milliseconds
-		 * @return This Manager
-		 */
-		reconnectionDelayMax( v: number ): Manager;
-
-		/**
-		 * Gets the randomisation factor used in the exponential backoff jitter
-		 * when reconnecting
-		 * @default 0.5
-		 */
-		randomizationFactor(): number;
-
-		/**
-		 * Sets the randomisation factor used in the exponential backoff jitter
-		 * when reconnecting
-		 * @param The reconnection randomisation factor
-		 * @default 0.5
-		 * @return This Manager
-		 */
-		randomizationFactor( v: number ): Manager;
-
-		/**
-		 * Gets the timeout in milliseconds for our connection attempts
-		 * @default 20000
-		 */
-		timeout(): number;
-
-		/**
-		 * Sets the timeout in milliseconds for our connection attempts
-		 * @param The connection timeout milliseconds
-		 * @return This Manager
-		 */
-		timeout(v: boolean): Manager;
-
-		/**
-		 * Sets the current transport socket and opens our connection
-		 * @param fn An optional callback to call when our socket has either opened, or
-		 * failed. It can take one optional parameter of type Error
-		 * @return This Manager
-		 */
-		open( fn?: (err?: any) => void ): Manager;
-
-		/**
-		 * @see open( fn );
-		 */
-		connect( fn?: (err?: any) => void ): Manager;
-
-		/**
-		 * Creates a new Socket for the given namespace
-		 * @param nsp The namespace that this Socket is for
-		 * @return A new Socket, or if one has already been created for this namespace,
-		 * an existing one
-		 */
-		socket( nsp: string ): Socket;
-	}
-
-	/**
-	 * Options we can pass to the socket when connecting
-	 */
-	interface ConnectOpts {
-
-		/**
-		 * Should we force a new Manager for this connection?
-		 * @default false
-		 */
-		forceNew?: boolean;
-
-		/**
-		 * Should we multiplex our connection (reuse existing Manager) ?
-		 * @default true
-		 */
-		multiplex?: boolean;
-
-		/**
-		 * The path to get our client file from, in the case of the server
-		 * serving it
-		 * @default '/socket.io'
-		 */
-		path?: string;
-
-		/**
-		 * Should we allow reconnections?
-		 * @default true
-		 */
-		reconnection?: boolean;
-
-		/**
-		 * How many reconnection attempts should we try?
-		 * @default Infinity
-		 */
-		reconnectionAttempts?: number;
-
-		/**
-		 * The time delay in milliseconds between reconnection attempts
-		 * @default 1000
-		 */
-		reconnectionDelay?: number;
-
-		/**
-		 * The max time delay in milliseconds between reconnection attempts
-		 * @default 5000
-		 */
-		reconnectionDelayMax?: number;
-
-		/**
-		 * Used in the exponential backoff jitter when reconnecting
-		 * @default 0.5
-		 */
-		randomizationFactor?: number;
-
-		/**
-		 * The timeout in milliseconds for our connection attempt
-		 * @default 20000
-		 */
-		timeout?: number;
-
-		/**
-		 * Should we automically connect?
-		 * @default true
-		 */
-		autoConnect?: boolean;
-
-		/**
-		 * The host that we're connecting to. Set from the URI passed when connecting
-		 */
-		host?: string;
-
-		/**
-		 * The hostname for our connection. Set from the URI passed when connecting
-		 */
-		hostname?: string;
-
-		/**
-		 * If this is a secure connection. Set from the URI passed when connecting
-		 */
-		secure?: boolean;
-
-		/**
-		 * The port for our connection. Set from the URI passed when connecting
-		 */
-		port?: string;
-
-		/**
-		 * Any query parameters in our uri. Set from the URI passed when connecting
-		 */
-		query?: Object;
-
-		/**
-		 * `http.Agent` to use, defaults to `false` (NodeJS only)
-		 */
-		agent?: string|boolean;
-
-		/**
-		 * Whether the client should try to upgrade the transport from
-		 * long-polling to something better.
-		 * @default true
-		 */
-		upgrade?: boolean;
-
-		/**
-		 * Forces JSONP for polling transport.
-		 */
-		forceJSONP?: boolean;
-
-		/**
-		 * Determines whether to use JSONP when necessary for polling. If
-		 * disabled (by settings to false) an error will be emitted (saying
-		 * "No transports available") if no other transports are available.
-		 * If another transport is available for opening a connection (e.g.
-		 * WebSocket) that transport will be used instead.
-		 * @default true
-		 */
-		jsonp?: boolean;
-
-		/**
-		 * Forces base 64 encoding for polling transport even when XHR2
-		 * responseType is available and WebSocket even if the used standard
-		 * supports binary.
-		 */
-		forceBase64?: boolean;
-
-		/**
-		 * Enables XDomainRequest for IE8 to avoid loading bar flashing with
-		 * click sound. default to `false` because XDomainRequest has a flaw
-		 * of not sending cookie.
-		 * @default false
-		 */
-		enablesXDR?: boolean;
-
-		/**
-		 * The param name to use as our timestamp key
-		 * @default 't'
-		 */
-		timestampParam?: string;
-
-		/**
-		 * Whether to add the timestamp with each transport request. Note: this
-		 * is ignored if the browser is IE or Android, in which case requests
-		 * are always stamped
-		 * @default false
-		 */
-		timestampRequests?: boolean;
-
-		/**
-		 * A list of transports to try (in order). Engine.io always attempts to
-		 * connect directly with the first one, provided the feature detection test
-		 * for it passes.
-		 * @default ['polling','websocket']
-		 */
-		transports?: string[];
-
-		/**
-		 * The port the policy server listens on
-		 * @default 843
-		 */
-		policyPost?: number;
-
-		/**
-		 * If true and if the previous websocket connection to the server succeeded,
-		 * the connection attempt will bypass the normal upgrade process and will
-		 * initially try websocket. A connection attempt following a transport error
-		 * will use the normal upgrade process. It is recommended you turn this on
-		 * only when using SSL/TLS connections, or if you know that your network does
-		 * not block websockets.
-		 * @default false
-		 */
-		rememberUpgrade?: boolean;
-
-		/**
-		 * Are we only interested in transports that support binary?
-		 */
-		onlyBinaryUpgrades?: boolean;
-
-		/**
-		 * (SSL) Certificate, Private key and CA certificates to use for SSL.
-		 * Can be used in Node.js client environment to manually specify
-		 * certificate information.
-		 */
-		pfx?: string;
-
-		/**
-		 * (SSL) Private key to use for SSL. Can be used in Node.js client
-		 * environment to manually specify certificate information.
-		 */
-		key?: string;
-
-		/**
-		 * (SSL) A string or passphrase for the private key or pfx. Can be
-		 * used in Node.js client environment to manually specify certificate
-		 * information.
-		 */
-		passphrase?: string
-
-		/**
-		 * (SSL) Public x509 certificate to use. Can be used in Node.js client
-		 * environment to manually specify certificate information.
-		 */
-		cert?: string;
-
-		/**
-		 * (SSL) An authority certificate or array of authority certificates to
-		 * check the remote host against.. Can be used in Node.js client
-		 * environment to manually specify certificate information.
-		 */
-		ca?: string|string[];
-
-		/**
-		 * (SSL) A string describing the ciphers to use or exclude. Consult the
-		 * [cipher format list]
-		 * (http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT) for
-		 * details on the format.. Can be used in Node.js client environment to
-		 * manually specify certificate information.
-		 */
-		ciphers?: string;
-
-		/**
-		 * (SSL) If true, the server certificate is verified against the list of
-		 * supplied CAs. An 'error' event is emitted if verification fails.
-		 * Verification happens at the connection level, before the HTTP request
-		 * is sent. Can be used in Node.js client environment to manually specify
-		 * certificate information.
-		 */
-		rejectUnauthorized?: boolean;
-
-	}
-}
diff --git a/typings/globals/socket.io-client/typings.json b/typings/globals/socket.io-client/typings.json
deleted file mode 100644
index f29e7a2..0000000
--- a/typings/globals/socket.io-client/typings.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "resolution": "main",
-  "tree": {
-    "src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/socket.io-client/socket.io-client.d.ts",
-    "raw": "registry:dt/socket.io-client#1.4.4+20160317120654",
-    "typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7de6c3dd94feaeb21f20054b9f30d5dabc5efabd/socket.io-client/socket.io-client.d.ts"
-  }
-}
diff --git a/typings/index.d.ts b/typings/index.d.ts
deleted file mode 100644
index b0a5fb0..0000000
--- a/typings/index.d.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-/// <reference path="globals/angular-cookies/index.d.ts" />
-/// <reference path="globals/angular-mocks/index.d.ts" />
-/// <reference path="globals/angular-resource/index.d.ts" />
-/// <reference path="globals/angular-ui-router/index.d.ts" />
-/// <reference path="globals/angular/index.d.ts" />
-/// <reference path="globals/es6-shim/index.d.ts" />
-/// <reference path="globals/jasmine/index.d.ts" />
-/// <reference path="globals/jquery/index.d.ts" />
-/// <reference path="globals/require/index.d.ts" />
-/// <reference path="globals/socket.io-client/index.d.ts" />
