This should only take a moment.',50);
+dialogs.notify('Something Happened','Something happened at this point in the application that I wish to let you know about');
+dialogs.create('url/to/a/template','ctrlrToUse',{},{});
diff --git a/angular-dialog-service/angular-dialog-service.d.ts b/angular-dialog-service/angular-dialog-service.d.ts
new file mode 100644
index 0000000000..38ce8589e4
--- /dev/null
+++ b/angular-dialog-service/angular-dialog-service.d.ts
@@ -0,0 +1,82 @@
+// Type definitions for Angular Dialog Service 5.2.8
+// Project: https://github.com/m-e-conroy/angular-dialog-service
+// Definitions by: William Comartin
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+///
+///
+
+declare module angular.dialogservice {
+
+ interface IDialogOptions {
+ /**
+ * Set to false to disable animations on new modal/backdrop. Does not toggle animations for modals/backdrops that are already displayed.
+ *
+ * @default false
+ */
+ animation?: boolean;
+
+ /**
+ * controls the presence of a backdrop
+ * Allowed values:
+ * - true (default)
+ * - false (no backdrop)
+ * - 'static' backdrop is present but modal window is not closed when clicking outside of the modal window
+ *
+ * @default true
+ */
+ backdrop?: boolean | string;
+
+ /**
+ * indicates whether the dialog should be closable by hitting the ESC key
+ *
+ * @default true
+ */
+ keyboard?: boolean;
+
+ /**
+ * additional CSS class(es) to be added to a modal backdrop template
+ *
+ * @default 'dialogs-backdrop-default'
+ */
+ backdropClass?: string;
+
+ /**
+ * additional CSS class(es) to be added to a modal window template
+ *
+ * @default 'dialogs-default'
+ */
+ windowClass?: string;
+
+ /**
+ * Optional suffix of modal window class. The value used is appended to the `modal-` class, i.e. a value of `sm` gives `modal-sm`.
+ *
+ * @default 'lg'
+ */
+ size?: string;
+ }
+
+ interface IDialogService {
+ /**
+ * Opens a new error modal instance.
+ */
+ error(header: string, msg: string, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance
+ /**
+ * Opens a new wait modal instance.
+ */
+ wait(header: string, msg: string, progress: number, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance
+ /**
+ * Opens a new notify modal instance.
+ */
+ notify(header: string, msg: string, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance
+ /**
+ * Opens a new confirm modal instance.
+ */
+ confirm(header: string, msg: string, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance
+ /**
+ * Opens a new custom modal instance.
+ */
+ create(url: string, ctrlr: string, data: any, opts?: IDialogOptions): ng.ui.bootstrap.IModalServiceInstance
+ }
+
+}
diff --git a/angular-formly/angular-formly.d.ts b/angular-formly/angular-formly.d.ts
index 8f76b3ccf9..9917d217f4 100644
--- a/angular-formly/angular-formly.d.ts
+++ b/angular-formly/angular-formly.d.ts
@@ -297,6 +297,7 @@ declare module AngularFormly {
bound?: any;
expression?: any;
value?: any;
+ [key: string]: any;
};
diff --git a/angular-gettext/angular-gettext-tests.ts b/angular-gettext/angular-gettext-tests.ts
index 9a10f1062f..0b0532fc4f 100644
--- a/angular-gettext/angular-gettext-tests.ts
+++ b/angular-gettext/angular-gettext-tests.ts
@@ -1,61 +1,61 @@
-///
-
-module angular_gettext_tests {
-
-
- // Configuring angular-gettext
- // https://angular-gettext.rocketeer.be/dev-guide/configure/
- //Setting the language
- angular.module('myApp').run(function (gettextCatalog: angular.gettext.gettextCatalog) {
- gettextCatalog.setCurrentLanguage('nl');
- });
-
- //Highlighting untranslated strings
- angular.module('myApp').run(function (gettextCatalog: angular.gettext.gettextCatalog) {
- gettextCatalog.debug = true;
- });
-
-
- // Marking strings in JavaScript code as translatable.
- // https://angular-gettext.rocketeer.be/dev-guide/annotate-js/
- angular.module("myApp").controller("helloController", function (gettext: angular.gettext.gettextFunction) {
- var myString = gettext("Hello");
- });
-
- //Translating directly in JavaScript.
- angular.module("myApp").controller("helloController", function (gettextCatalog: angular.gettext.gettextCatalog) {
- var translated: string = gettextCatalog.getString("Hello");
- });
-
- angular.module("myApp").controller("helloController", function (gettextCatalog: angular.gettext.gettextCatalog) {
- var myString2: string = gettextCatalog.getPlural(3, "Bird", "Birds");
- });
-
- angular.module("myApp").controller("helloController", function (gettextCatalog: angular.gettext.gettextCatalog) {
- var translated: string = gettextCatalog.getString("Hello {{name}}", { name: "Ruben" });
- });
-
- // Setting strings manually
- // https://angular-gettext.rocketeer.be/dev-guide/manual-setstrings/
-
- angular.module("myApp").run(function (gettextCatalog: angular.gettext.gettextCatalog) {
- // Load the strings automatically during initialization.
- gettextCatalog.setStrings("nl", {
- "Hello": "Hallo",
- "One boat": ["Een boot", "{{$count}} boats"]
- });
- });
-
-
- interface helloControllerScope extends ng.IScope {
- switchLanguage: (lang: string) => void;
- }
- // Lazy-loading languages
- // https://angular-gettext.rocketeer.be/dev-guide/lazy-loading/
- angular.module("myApp").controller("helloController", function ($scope: helloControllerScope, gettextCatalog: angular.gettext.gettextCatalog) {
- $scope.switchLanguage = function (lang: string) {
- gettextCatalog.setCurrentLanguage(lang);
- gettextCatalog.loadRemote("/languages/" + lang + ".json");
- };
- });
+///
+
+module angular_gettext_tests {
+
+
+ // Configuring angular-gettext
+ // https://angular-gettext.rocketeer.be/dev-guide/configure/
+ //Setting the language
+ angular.module('myApp').run(function (gettextCatalog: angular.gettext.gettextCatalog) {
+ gettextCatalog.setCurrentLanguage('nl');
+ });
+
+ //Highlighting untranslated strings
+ angular.module('myApp').run(function (gettextCatalog: angular.gettext.gettextCatalog) {
+ gettextCatalog.debug = true;
+ });
+
+
+ // Marking strings in JavaScript code as translatable.
+ // https://angular-gettext.rocketeer.be/dev-guide/annotate-js/
+ angular.module("myApp").controller("helloController", function (gettext: angular.gettext.gettextFunction) {
+ var myString = gettext("Hello");
+ });
+
+ //Translating directly in JavaScript.
+ angular.module("myApp").controller("helloController", function (gettextCatalog: angular.gettext.gettextCatalog) {
+ var translated: string = gettextCatalog.getString("Hello");
+ });
+
+ angular.module("myApp").controller("helloController", function (gettextCatalog: angular.gettext.gettextCatalog) {
+ var myString2: string = gettextCatalog.getPlural(3, "Bird", "Birds");
+ });
+
+ angular.module("myApp").controller("helloController", function (gettextCatalog: angular.gettext.gettextCatalog) {
+ var translated: string = gettextCatalog.getString("Hello {{name}}", { name: "Ruben" });
+ });
+
+ // Setting strings manually
+ // https://angular-gettext.rocketeer.be/dev-guide/manual-setstrings/
+
+ angular.module("myApp").run(function (gettextCatalog: angular.gettext.gettextCatalog) {
+ // Load the strings automatically during initialization.
+ gettextCatalog.setStrings("nl", {
+ "Hello": "Hallo",
+ "One boat": ["Een boot", "{{$count}} boats"]
+ });
+ });
+
+
+ interface helloControllerScope extends ng.IScope {
+ switchLanguage: (lang: string) => void;
+ }
+ // Lazy-loading languages
+ // https://angular-gettext.rocketeer.be/dev-guide/lazy-loading/
+ angular.module("myApp").controller("helloController", function ($scope: helloControllerScope, gettextCatalog: angular.gettext.gettextCatalog) {
+ $scope.switchLanguage = function (lang: string) {
+ gettextCatalog.setCurrentLanguage(lang);
+ gettextCatalog.loadRemote("/languages/" + lang + ".json");
+ };
+ });
}
\ No newline at end of file
diff --git a/angular-gettext/angular-gettext.d.ts b/angular-gettext/angular-gettext.d.ts
index 1a88ef1641..dc1de2bf6c 100644
--- a/angular-gettext/angular-gettext.d.ts
+++ b/angular-gettext/angular-gettext.d.ts
@@ -1,73 +1,73 @@
-// Type definitions for angular-gettext v2.1.0
-// Project: https://angular-gettext.rocketeer.be/
-// Definitions by: Ákos Lukács
-// Definitions: https://github.com/borisyankov/DefinitelyTyped
-
-///
-
-declare module angular.gettext {
- interface gettextCatalog {
-
- //////////////
- /// Fields ///
- //////////////
-
- /** (default: false): Whether or not to prefix untranslated strings with [MISSING]: or a custom prefix. */
- debug: boolean;
- /** (default: [MISSING]:): Custom prefix for untranslated strings. */
- debugPrefix: string;
- /** (default: false): Whether or not to wrap all processed text with markers.Example output: [Welcome] */
- showTranslatedMarkers: boolean;
- /** (default: [): Custom prefix to mark strings that have been run through angular-gettext. */
- translatedMarkerPrefix: string;
- /** (default: ]): Custom suffix to mark strings that have been run through angular-gettext. */
- translatedMarkerSuffix: string;
- /** An object of loaded translation strings.Shouldn't be used directly. */
- strings: {};
- /** The default language, in which you're application is written. This defaults to English and it's generally a bad idea to use anything else: if your language has different pluralization rules you'll end up with incorrect translations. Deprecated
- * @deprecreated
- */
- baseLanguage: string;
-
-
- ///////////////
- /// Methods ///
- ///////////////
-
- /** Sets the current language and makes sure that all translations get updated correctly. */
- setCurrentLanguage(lang: string): void;
-
- /** Returns the current language. */
- getCurrentLanguage(): string;
-
- /** Processes an object of string definitions. More details https://angular-gettext.rocketeer.be/dev-guide/manual-setstrings/
- * @param language A language code.
- * @param strings A dictionary of strings. The format of this dictionary is:
- * - Keys: Singular English strings (as defined in the source files)
- * - Values: Either a single string for signular-only strings or an array of plural forms.
- */
- setStrings(language: string, strings: { [key: string]: string|string[] }): void;
-
- /** Get the correct pluralized (but untranslated) string for the value of n. */
- getStringForm(string: string, n: number): string;
-
- /** Translate a string with the given context. Uses Angular.JS interpolation, so something like this will do what you expect:
- * var hello = gettextCatalog.getString("Hello {{name}}!", { name: "Ruben" });
- * // var hello will be "Hallo Ruben!" in Dutch.
- * The context parameter is optional: pass null (or don't pass anything) if you're not using it: this skips interpolation and is a lot faster.
- */
- getString(string: string, context?: any): string;
-
- /** Translate a plural string with the given context. */
- getPlural(n: number, string: string, stringPlural: string, context?: any): string;
-
- /** Load a set of translation strings from a given URL.This should be a JSON catalog generated with grunt-angular-gettext. More details https://angular-gettext.rocketeer.be/dev-guide/lazy-loading/ */
- loadRemote(url: string): ng.IHttpPromise;
- }
-
- /** If you have text that should be translated in your JavaScript code, wrap it with a call to a function named gettext. This module provides an injectable function to do so */
- interface gettextFunction {
- (dummyString: string): string;
- }
-}
-
+// Type definitions for angular-gettext v2.1.0
+// Project: https://angular-gettext.rocketeer.be/
+// Definitions by: Ákos Lukács
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+///
+
+declare module angular.gettext {
+ interface gettextCatalog {
+
+ //////////////
+ /// Fields ///
+ //////////////
+
+ /** (default: false): Whether or not to prefix untranslated strings with [MISSING]: or a custom prefix. */
+ debug: boolean;
+ /** (default: [MISSING]:): Custom prefix for untranslated strings. */
+ debugPrefix: string;
+ /** (default: false): Whether or not to wrap all processed text with markers.Example output: [Welcome] */
+ showTranslatedMarkers: boolean;
+ /** (default: [): Custom prefix to mark strings that have been run through angular-gettext. */
+ translatedMarkerPrefix: string;
+ /** (default: ]): Custom suffix to mark strings that have been run through angular-gettext. */
+ translatedMarkerSuffix: string;
+ /** An object of loaded translation strings.Shouldn't be used directly. */
+ strings: {};
+ /** The default language, in which you're application is written. This defaults to English and it's generally a bad idea to use anything else: if your language has different pluralization rules you'll end up with incorrect translations. Deprecated
+ * @deprecreated
+ */
+ baseLanguage: string;
+
+
+ ///////////////
+ /// Methods ///
+ ///////////////
+
+ /** Sets the current language and makes sure that all translations get updated correctly. */
+ setCurrentLanguage(lang: string): void;
+
+ /** Returns the current language. */
+ getCurrentLanguage(): string;
+
+ /** Processes an object of string definitions. More details https://angular-gettext.rocketeer.be/dev-guide/manual-setstrings/
+ * @param language A language code.
+ * @param strings A dictionary of strings. The format of this dictionary is:
+ * - Keys: Singular English strings (as defined in the source files)
+ * - Values: Either a single string for signular-only strings or an array of plural forms.
+ */
+ setStrings(language: string, strings: { [key: string]: string|string[] }): void;
+
+ /** Get the correct pluralized (but untranslated) string for the value of n. */
+ getStringForm(string: string, n: number): string;
+
+ /** Translate a string with the given context. Uses Angular.JS interpolation, so something like this will do what you expect:
+ * var hello = gettextCatalog.getString("Hello {{name}}!", { name: "Ruben" });
+ * // var hello will be "Hallo Ruben!" in Dutch.
+ * The context parameter is optional: pass null (or don't pass anything) if you're not using it: this skips interpolation and is a lot faster.
+ */
+ getString(string: string, context?: any): string;
+
+ /** Translate a plural string with the given context. */
+ getPlural(n: number, string: string, stringPlural: string, context?: any): string;
+
+ /** Load a set of translation strings from a given URL.This should be a JSON catalog generated with grunt-angular-gettext. More details https://angular-gettext.rocketeer.be/dev-guide/lazy-loading/ */
+ loadRemote(url: string): ng.IHttpPromise;
+ }
+
+ /** If you have text that should be translated in your JavaScript code, wrap it with a call to a function named gettext. This module provides an injectable function to do so */
+ interface gettextFunction {
+ (dummyString: string): string;
+ }
+}
+
diff --git a/angular-growl-v2/angular-growl-v2-test.ts b/angular-growl-v2/angular-growl-v2-tests.ts
similarity index 100%
rename from angular-growl-v2/angular-growl-v2-test.ts
rename to angular-growl-v2/angular-growl-v2-tests.ts
diff --git a/angular-httpi/httpi-tests.ts b/angular-httpi/httpi-tests.ts
new file mode 100644
index 0000000000..2d8ffa84ff
--- /dev/null
+++ b/angular-httpi/httpi-tests.ts
@@ -0,0 +1,64 @@
+///
+
+(function() {
+ 'use strict';
+ var app = angular.module("Demo", ["httpi"]);
+ // -------------------------------------------------- //
+ // -------------------------------------------------- //
+ // I control the main demo.
+ app.controller(
+ "DemoController",
+ function($scope: ng.IScope, httpi: Httpi.HttpiFactory) {
+
+ console.warn("None of the API endpoints exist - they will all throw 404.");
+ // NOTE: The (.|.) notation will be stripped out automatically; it's only
+ // here to improve readability of the "happy paths" for interpolation
+ // labels. The following urls are pre-processed to be identical:
+ // --
+ // api/friends/( :listCommand | :id/:itemCommand )
+ // api/friends/:listCommand:id/:itemCommand
+ var resource = httpi.resource("api/friends/( :listCommand | :id/:itemCommand )");
+ // Clear list of friends - matching listCommand.
+ resource.post({
+ data: {
+ listCommand: "reset"
+ }
+ });
+ // Create a new friend - no matching URL parameters.
+ resource.post({
+ data: {
+ name: "Tricia"
+ }
+ });
+ // Get a given friend - ID matching.
+ resource.get({
+ data: {
+ id: 4
+ }
+ });
+ // Make best friend - ID, itemCommand matching.
+ resource.post({
+ data: {
+ id: 4,
+ itemCommand: "make-best-friend"
+ }
+ });
+ // Get gets friends - no matching URL parameters.
+ resource.get({
+ params: {
+ limit: "besties"
+ }
+ });
+ // Get a friend as a JSONP request.
+ // --
+ // NOTE: The "resource" will auto-inject the "JSON_CALLBACK" marker that
+ // AngularJS will automatically replace with an internal callback name.
+ resource.jsonp({
+ data: {
+ id: 43
+ }
+ });
+ }
+ );
+
+})();
\ No newline at end of file
diff --git a/angular-httpi/httpi.d.ts b/angular-httpi/httpi.d.ts
new file mode 100644
index 0000000000..eb4a16106b
--- /dev/null
+++ b/angular-httpi/httpi.d.ts
@@ -0,0 +1,42 @@
+// Type definitions for angular-httpi
+// Project: https://github.com/bennadel/httpi
+// Definitions by: Andrew Camilleri
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+///
+
+declare module Httpi {
+ export interface HttpiPayload extends ng.IRequestShortcutConfig {
+ method?: string;
+ url?: string;
+ params?: {};
+ data?: {};
+ keepTrailingSlash?: boolean;
+ }
+
+ export interface HttpiFactory {
+
+ (config: HttpiPayload): ng.IHttpPromise<{}>;
+
+ resource(url: string): HttpiResource;
+ }
+
+ export class HttpiResource {
+
+ constructor(http: ng.IHttpService, url: string);
+
+ delete(config: HttpiPayload): ng.IHttpPromise;
+
+ get(config: HttpiPayload): ng.IHttpPromise;
+
+ head(config: HttpiPayload): ng.IHttpPromise;
+
+ jsonp(config: HttpiPayload): ng.IHttpPromise;
+
+ post(config: HttpiPayload): ng.IHttpPromise;
+
+ put(config: HttpiPayload): ng.IHttpPromise;
+
+ setKeepTrailingSlash(newKeepTrailingSlash: boolean): HttpiResource;
+ }
+}
\ No newline at end of file
diff --git a/angular-loading-bar/angular-loading-bar-tests.ts b/angular-loading-bar/angular-loading-bar-tests.ts
new file mode 100644
index 0000000000..b7ca2894ea
--- /dev/null
+++ b/angular-loading-bar/angular-loading-bar-tests.ts
@@ -0,0 +1,15 @@
+///
+
+var app = angular.module('testModule', ['angular-loading-bar']);
+
+class TestController {
+
+ constructor($http: ng.IHttpService) {
+
+ $http.get("http://xyz.com", { ignoreLoadingBar: true })
+
+ }
+
+}
+
+app.controller('TestController', TestController);
diff --git a/angular-loading-bar/angular-loading-bar.d.ts b/angular-loading-bar/angular-loading-bar.d.ts
new file mode 100644
index 0000000000..b1a8cd55df
--- /dev/null
+++ b/angular-loading-bar/angular-loading-bar.d.ts
@@ -0,0 +1,18 @@
+// Type definitions for angular-loading-bar
+// Project: https://github.com/chieffancypants/angular-loading-bar
+// Definitions by: Stephen Lautier
+// Definitions: https://github.com/borisyankov/DefinitelyTyped
+
+///
+
+
+declare module angular {
+
+ interface IRequestShortcutConfig {
+ /**
+ * Indicates that the loading bar should be hidden.
+ */
+ ignoreLoadingBar?: boolean;
+ }
+
+}
\ No newline at end of file
diff --git a/angular-material/angular-material.d.ts b/angular-material/angular-material.d.ts
index ee932f0218..3b9a896c90 100644
--- a/angular-material/angular-material.d.ts
+++ b/angular-material/angular-material.d.ts
@@ -221,4 +221,19 @@ declare module angular.material {
setDefaultTheme(theme: string): void;
alwaysWatchTheme(alwaysWatch: boolean): void;
}
+
+ interface IDateLocaleProvider {
+ months: string[];
+ shortMonths: string[];
+ days: string[];
+ shortDays: string[];
+ dates: string[];
+ firstDayOfWeek: number;
+ parseDate(dateString: string): Date;
+ formatDate(date: Date): string;
+ monthHeaderFormatter(date: Date): string;
+ weekNumberFormatter(weekNumber: number): string;
+ msgCalendar: string;
+ msgOpenCalendar: string;
+ }
}
diff --git a/angular-ui-router/angular-ui-router.d.ts b/angular-ui-router/angular-ui-router.d.ts
index 3ec31968cd..014baf5ac4 100644
--- a/angular-ui-router/angular-ui-router.d.ts
+++ b/angular-ui-router/angular-ui-router.d.ts
@@ -71,10 +71,16 @@ declare module angular.ui {
* 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 IStateProvider extends angular.IServiceProvider {
@@ -229,10 +235,10 @@ declare module angular.ui {
*/
go(to: string, params?: {}, options?: IStateOptions): angular.IPromise;
go(to: IState, params?: {}, options?: IStateOptions): angular.IPromise;
- transitionTo(state: string, params?: {}, updateLocation?: boolean): void;
- transitionTo(state: IState, params?: {}, updateLocation?: boolean): void;
- transitionTo(state: string, params?: {}, options?: IStateOptions): void;
- transitionTo(state: IState, params?: {}, options?: IStateOptions): void;
+ transitionTo(state: string, params?: {}, updateLocation?: boolean): angular.IPromise;
+ transitionTo(state: IState, params?: {}, updateLocation?: boolean): angular.IPromise;
+ transitionTo(state: string, params?: {}, options?: IStateOptions): angular.IPromise;
+ transitionTo(state: IState, params?: {}, options?: IStateOptions): angular.IPromise;
includes(state: string, params?: {}): boolean;
is(state:string, params?: {}): boolean;
is(state: IState, params?: {}): boolean;
@@ -244,10 +250,10 @@ declare module angular.ui {
current: IState;
/** A param object, e.g. {sectionId: section.id)}, that you'd like to test against the current active state. */
params: IStateParamsService;
- reload(): void;
+ reload(): angular.IPromise;
/** Currently pending transition. A promise that'll resolve or reject. */
- transition: ng.IPromise<{}>;
+ transition: angular.IPromise<{}>;
$current: IResolvedState;
}
diff --git a/angular2/angular2-tests.ts b/angular2/angular2-tests.ts
index a39cdcf79f..1c64de9d74 100644
--- a/angular2/angular2-tests.ts
+++ b/angular2/angular2-tests.ts
@@ -1,43 +1,3 @@
///
-///
-import {Component, View, Directive, bootstrap, bind, NgFor, NgIf} from "angular2/angular2";
-
-class Service {
-
-}
-class Service2 {
-
-}
-
-class Cmp {
- static annotations: any[];
-}
-Cmp.annotations = [
- Component({
- selector: 'cmp',
- bindings: [Service, bind(Service2).toValue(null)]
- }),
- View({
- template: '{{greeting}} world!',
- directives: [NgFor, NgIf]
- }),
- Directive({
- selector: '[tooltip]',
- inputs: [
- 'text: tooltip'
- ],
- outputs: [
- '(mouseenter):onMouseEnter()',
- '(mouseleave):onMouseLeave()'
- ]
- })
-];
-
-@Component({selector: 'cmp2'})
-@View({templateUrl: '/index.html'})
-class Cmp2 {
-
-}
-
-bootstrap(Cmp);
+// No tests, because angular 2 typings are not in DefinitelyTyped.
\ No newline at end of file
diff --git a/angular2/angular2-tests.ts.tscparams b/angular2/angular2-tests.ts.tscparams
deleted file mode 100644
index 3f0863ac67..0000000000
--- a/angular2/angular2-tests.ts.tscparams
+++ /dev/null
@@ -1 +0,0 @@
---experimentalDecorators --noImplicitAny --target ES5
diff --git a/angular2/angular2.d.ts b/angular2/angular2.d.ts
index 616157aaf6..3560809982 100644
--- a/angular2/angular2.d.ts
+++ b/angular2/angular2.d.ts
@@ -1,17105 +1,13 @@
-// Type definitions for Angular v2.0.0-39
+// Type definitions for Angular 2
// Project: http://angular.io/
// Definitions by: angular team
// Definitions: https://github.com/borisyankov/DefinitelyTyped
-// ***********************************************************
-// This file is generated by the Angular build process.
-// Please do not create manual edits or send pull requests
-// modifying this file.
-// ***********************************************************
-
-// angular2/angular2 depends transitively on these libraries.
-// If you don't have them installed you can install them using TSD
-// https://github.com/DefinitelyTyped/tsd
-
-///
-// angular2/web_worker/worker depends transitively on these libraries.
-// If you don't have them installed you can install them using TSD
-// https://github.com/DefinitelyTyped/tsd
-
-///
-// angular2/web_worker/ui depends transitively on these libraries.
-// If you don't have them installed you can install them using TSD
-// https://github.com/DefinitelyTyped/tsd
-
-///
-
-
-interface Map {}
-
-
-declare module ng {
- // See https://github.com/Microsoft/TypeScript/issues/1168
- class BaseException /* extends Error */ {
- message: string;
- stack: string;
- toString(): string;
- }
- interface InjectableReference {}
-}
-
-declare module ngWorker {
- // See https://github.com/Microsoft/TypeScript/issues/1168
- class BaseException /* extends Error */ {
- message: string;
- stack: string;
- toString(): string;
- }
- interface InjectableReference {}
-}
-
-declare module ngUi {
- // See https://github.com/Microsoft/TypeScript/issues/1168
- class BaseException /* extends Error */ {
- message: string;
- stack: string;
- toString(): string;
- }
- interface InjectableReference {}
-}
-
-
-
-
-declare module ng {
- /**
- * Declares an injectable parameter to be a live list of directives or variable
- * bindings from the content children of a directive.
- *
- * ### Example ([live demo](http://plnkr.co/edit/lY9m8HLy7z06vDoUaSN2?p=preview))
- *
- * Assume that `` component would like to get a list its children ``
- * components as shown in this example:
- *
- * ```html
- *
- * ...
- * {{o.text}}
- *
- * ```
- *
- * The preferred solution is to query for `Pane` directives using this decorator.
- *
- * ```javascript
- * @Component({
- * selector: 'pane',
- * inputs: ['title']
- * })
- * @View(...)
- * class Pane {
- * title:string;
- * }
- *
- * @Component({
- * selector: 'tabs'
- * })
- * @View({
- * template: `
- *
- *
{{pane.title}}
- *
- *
- * `
- * })
- * class Tabs {
- * panes: QueryList;
- * constructor(@Query(Pane) panes:QueryList) {
- * this.panes = panes;
- * }
- * }
- * ```
- *
- * A query can look for variable bindings by passing in a string with desired binding symbol.
- *
- * ### Example ([live demo](http://plnkr.co/edit/sT2j25cH1dURAyBRCKx1?p=preview))
- * ```html
- *
- *
...
- *
- *
- * @Component({
- * selector: 'foo'
- * })
- * @View(...)
- * class seeker {
- * constructor(@Query('findme') elList: QueryList) {...}
- * }
- * ```
- *
- * In this case the object that is injected depend on the type of the variable
- * binding. It can be an ElementRef, a directive or a component.
- *
- * Passing in a comma separated list of variable bindings will query for all of them.
- *
- * ```html
- *
- *
...
- *
...
- *
- *
- * @Component({
- * selector: 'foo'
- * })
- * @View(...)
- * class Seeker {
- * constructor(@Query('findMe, findMeToo') elList: QueryList) {...}
- * }
- * ```
- *
- * Configure whether query looks for direct children or all descendants
- * of the querying element, by using the `descendants` parameter.
- * It is set to `false` by default.
- *
- * ### Example ([live demo](http://plnkr.co/edit/wtGeB977bv7qvA5FTYl9?p=preview))
- * ```html
- *
- * a
- * b
- *
- * c
- *
- *
- * ```
- *
- * When querying for items, the first container will see only `a` and `b` by default,
- * but with `Query(TextDirective, {descendants: true})` it will see `c` too.
- *
- * The queried directives are kept in a depth-first pre-order with respect to their
- * positions in the DOM.
- *
- * Query does not look deep into any subcomponent views.
- *
- * Query is updated as part of the change-detection cycle. Since change detection
- * happens after construction of a directive, QueryList will always be empty when observed in the
- * constructor.
- *
- * The injected object is an unmodifiable live list.
- * See {@link QueryList} for more details.
- */
- class QueryMetadata extends DependencyMetadata {
-
- constructor(_selector: Type | string, {descendants, first}?: {descendants?: boolean, first?: boolean});
-
- /**
- * whether we want to query only direct children (false) or all
- * children (true).
- */
- descendants: boolean;
-
- first: boolean;
-
- /**
- * always `false` to differentiate it with {@link ViewQueryMetadata}.
- */
- isViewQuery: boolean;
-
- /**
- * what this is querying for.
- */
- selector: any;
-
- /**
- * whether this is querying for a variable binding or a directive.
- */
- isVarBindingQuery: boolean;
-
- /**
- * returns a list of variable bindings this is querying for.
- * Only applicable if this is a variable bindings query.
- */
- varBindings: string[];
-
- toString(): string;
-
- }
-
-
- /**
- * Configures a content query.
- *
- * Content queries are set before the `afterContentInit` callback is called.
- *
- * ### Example
- *
- * ```
- * @Directive({
- * selector: 'someDir'
- * })
- * class SomeDir {
- * @ContentChildren(ChildDirective) contentChildren: QueryList;
- *
- * afterContentInit() {
- * // contentChildren is set
- * }
- * }
- * ```
- */
- class ContentChildrenMetadata extends QueryMetadata {
-
- constructor(_selector: Type | string, {descendants}?: {descendants?: boolean});
-
- }
-
-
- /**
- * Configures a content query.
- *
- * Content queries are set before the `afterContentInit` callback is called.
- *
- * ### Example
- *
- * ```
- * @Directive({
- * selector: 'someDir'
- * })
- * class SomeDir {
- * @ContentChild(ChildDirective) contentChild;
- *
- * afterContentInit() {
- * // contentChild is set
- * }
- * }
- * ```
- */
- class ContentChildMetadata extends QueryMetadata {
-
- constructor(_selector: Type | string);
-
- }
-
-
- /**
- * Configures a view query.
- *
- * View queries are set before the `afterViewInit` callback is called.
- *
- * ### Example
- *
- * ```
- * @Component({
- * selector: 'someDir'
- * })
- * @View({templateUrl: 'someTemplate', directives: [ItemDirective]})
- * class SomeDir {
- * @ViewChildren(ItemDirective) viewChildren: QueryList;
- *
- * afterViewInit() {
- * // viewChildren is set
- * }
- * }
- * ```
- */
- class ViewChildrenMetadata extends ViewQueryMetadata {
-
- constructor(_selector: Type | string);
-
- }
-
-
- /**
- * Similar to {@link QueryMetadata}, but querying the component view, instead of
- * the content children.
- *
- * ### Example ([live demo](http://plnkr.co/edit/eNsFHDf7YjyM6IzKxM1j?p=preview))
- *
- * ```javascript
- * @Component({...})
- * @View({
- * template: `
- * a
- * b
- * c
- * `
- * })
- * class MyComponent {
- * shown: boolean;
- *
- * constructor(private @Query(Item) items:QueryList) {
- * items.onChange(() => console.log(items.length));
- * }
- * }
- * ```
- *
- * Supports the same querying parameters as {@link QueryMetadata}, except
- * `descendants`. This always queries the whole view.
- *
- * As `shown` is flipped between true and false, items will contain zero of one
- * items.
- *
- * Specifies that a {@link QueryList} should be injected.
- *
- * The injected object is an iterable and observable live list.
- * See {@link QueryList} for more details.
- */
- class ViewQueryMetadata extends QueryMetadata {
-
- constructor(_selector: Type | string, {descendants, first}?: {descendants?: boolean, first?: boolean});
-
- /**
- * always `true` to differentiate it with {@link QueryMetadata}.
- */
- isViewQuery: any;
-
- toString(): string;
-
- }
-
-
- /**
- * Configures a view query.
- *
- * View queries are set before the `afterViewInit` callback is called.
- *
- * ### Example
- *
- * ```
- * @Component({
- * selector: 'someDir'
- * })
- * @View({templateUrl: 'someTemplate', directives: [ItemDirective]})
- * class SomeDir {
- * @ViewChild(ItemDirective) viewChild:ItemDirective;
- *
- * afterViewInit() {
- * // viewChild is set
- * }
- * }
- * ```
- */
- class ViewChildMetadata extends ViewQueryMetadata {
-
- constructor(_selector: Type | string);
-
- }
-
-
- /**
- * Specifies that a constant attribute value should be injected.
- *
- * The directive can inject constant string literals of host element attributes.
- *
- * ## Example
- *
- * Suppose we have an `` element and want to know its `type`.
- *
- * ```html
- *
- * ```
- *
- * A decorator can inject string literal `text` like so:
- *
- * ```javascript
- * @Directive({
- * selector: `input'
- * })
- * class InputDirective {
- * constructor(@Attribute('type') type) {
- * // type would be `text` in this example
- * }
- * }
- * ```
- */
- class AttributeMetadata extends DependencyMetadata {
-
- constructor(attributeName: string);
-
- attributeName: string;
-
- token: any;
-
- toString(): string;
-
- }
-
-
- /**
- * Declare reusable UI building blocks for an application.
- *
- * Each Angular component requires a single `@Component` and at least one `@View` annotation. The
- * `@Component`
- * annotation specifies when a component is instantiated, and which properties and hostListeners it
- * binds to.
- *
- * When a component is instantiated, Angular
- * - creates a shadow DOM for the component.
- * - loads the selected template into the shadow DOM.
- * - creates all the injectable objects configured with `bindings` and `viewBindings`.
- *
- * All template expressions and statements are then evaluated against the component instance.
- *
- * For details on the `@View` annotation, see {@link ViewMetadata}.
- *
- * ## Lifecycle hooks
- *
- * When the component class implements some {@link angular2/lifecycle_hooks} the callbacks are
- * called by the change detection at defined points in time during the life of the component.
- *
- * ## Example
- *
- * ```
- * @Component({
- * selector: 'greet'
- * })
- * @View({
- * template: 'Hello {{name}}!'
- * })
- * class Greet {
- * name: string;
- *
- * constructor() {
- * this.name = 'World';
- * }
- * }
- * ```
- */
- class ComponentMetadata extends DirectiveMetadata {
-
- constructor({selector, inputs, outputs, properties, events, host, exportAs, moduleId, bindings,
- viewBindings, changeDetection, queries}?: {
- selector?: string,
- inputs?: string[],
- outputs?: string[],
- properties?: string[],
- events?: string[],
- host?: {[key: string]: string},
- bindings?: any[],
- exportAs?: string,
- moduleId?: string,
- viewBindings?: any[],
- queries?: {[key: string]: any},
- changeDetection?: ChangeDetectionStrategy,
- });
-
- /**
- * Defines the used change detection strategy.
- *
- * When a component is instantiated, Angular creates a change detector, which is responsible for
- * propagating the component's bindings.
- *
- * The `changeDetection` property defines, whether the change detection will be checked every time
- * or only when the component tells it to do so.
- */
- changeDetection: ChangeDetectionStrategy;
-
- /**
- * Defines the set of injectable objects that are visible to its view DOM children.
- *
- * ## Simple Example
- *
- * Here is an example of a class that can be injected:
- *
- * ```
- * class Greeter {
- * greet(name:string) {
- * return 'Hello ' + name + '!';
- * }
- * }
- *
- * @Directive({
- * selector: 'needs-greeter'
- * })
- * class NeedsGreeter {
- * greeter:Greeter;
- *
- * constructor(greeter:Greeter) {
- * this.greeter = greeter;
- * }
- * }
- *
- * @Component({
- * selector: 'greet',
- * viewBindings: [
- * Greeter
- * ]
- * })
- * @View({
- * template: ``,
- * directives: [NeedsGreeter]
- * })
- * class HelloWorld {
- * }
- *
- * ```
- */
- viewBindings: any[];
-
- }
-
-
- /**
- * Directives allow you to attach behavior to elements in the DOM.
- *
- * {@link DirectiveMetadata}s with an embedded view are called {@link ComponentMetadata}s.
- *
- * A directive consists of a single directive annotation and a controller class. When the
- * directive's `selector` matches
- * elements in the DOM, the following steps occur:
- *
- * 1. For each directive, the `ElementInjector` attempts to resolve the directive's constructor
- * arguments.
- * 2. Angular instantiates directives for each matched element using `ElementInjector` in a
- * depth-first order,
- * as declared in the HTML.
- *
- * ## Understanding How Injection Works
- *
- * There are three stages of injection resolution.
- * - *Pre-existing Injectors*:
- * - The terminal {@link Injector} cannot resolve dependencies. It either throws an error or, if
- * the dependency was
- * specified as `@Optional`, returns `null`.
- * - The platform injector resolves browser singleton resources, such as: cookies, title,
- * location, and others.
- * - *Component Injectors*: Each component instance has its own {@link Injector}, and they follow
- * the same parent-child hierarchy
- * as the component instances in the DOM.
- * - *Element Injectors*: Each component instance has a Shadow DOM. Within the Shadow DOM each
- * element has an `ElementInjector`
- * which follow the same parent-child hierarchy as the DOM elements themselves.
- *
- * When a template is instantiated, it also must instantiate the corresponding directives in a
- * depth-first order. The
- * current `ElementInjector` resolves the constructor dependencies for each directive.
- *
- * Angular then resolves dependencies as follows, according to the order in which they appear in the
- * {@link ViewMetadata}:
- *
- * 1. Dependencies on the current element
- * 2. Dependencies on element injectors and their parents until it encounters a Shadow DOM boundary
- * 3. Dependencies on component injectors and their parents until it encounters the root component
- * 4. Dependencies on pre-existing injectors
- *
- *
- * The `ElementInjector` can inject other directives, element-specific special objects, or it can
- * delegate to the parent
- * injector.
- *
- * To inject other directives, declare the constructor parameter as:
- * - `directive:DirectiveType`: a directive on the current element only
- * - `@Host() directive:DirectiveType`: any directive that matches the type between the current
- * element and the
- * Shadow DOM root.
- * - `@Query(DirectiveType) query:QueryList`: A live collection of direct child
- * directives.
- * - `@QueryDescendants(DirectiveType) query:QueryList`: A live collection of any
- * child directives.
- *
- * To inject element-specific special objects, declare the constructor parameter as:
- * - `element: ElementRef` to obtain a reference to logical element in the view.
- * - `viewContainer: ViewContainerRef` to control child template instantiation, for
- * {@link DirectiveMetadata} directives only
- * - `bindingPropagation: BindingPropagation` to control change detection in a more granular way.
- *
- * ## Example
- *
- * The following example demonstrates how dependency injection resolves constructor arguments in
- * practice.
- *
- *
- * Assume this HTML template:
- *
- * ```
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- * ```
- *
- * With the following `dependency` decorator and `SomeService` injectable class.
- *
- * ```
- * @Injectable()
- * class SomeService {
- * }
- *
- * @Directive({
- * selector: '[dependency]',
- * inputs: [
- * 'id: dependency'
- * ]
- * })
- * class Dependency {
- * id:string;
- * }
- * ```
- *
- * Let's step through the different ways in which `MyDirective` could be declared...
- *
- *
- * ### No injection
- *
- * Here the constructor is declared with no arguments, therefore nothing is injected into
- * `MyDirective`.
- *
- * ```
- * @Directive({ selector: '[my-directive]' })
- * class MyDirective {
- * constructor() {
- * }
- * }
- * ```
- *
- * This directive would be instantiated with no dependencies.
- *
- *
- * ### Component-level injection
- *
- * Directives can inject any injectable instance from the closest component injector or any of its
- * parents.
- *
- * Here, the constructor declares a parameter, `someService`, and injects the `SomeService` type
- * from the parent
- * component's injector.
- * ```
- * @Directive({ selector: '[my-directive]' })
- * class MyDirective {
- * constructor(someService: SomeService) {
- * }
- * }
- * ```
- *
- * This directive would be instantiated with a dependency on `SomeService`.
- *
- *
- * ### Injecting a directive from the current element
- *
- * Directives can inject other directives declared on the current element.
- *
- * ```
- * @Directive({ selector: '[my-directive]' })
- * class MyDirective {
- * constructor(dependency: Dependency) {
- * expect(dependency.id).toEqual(3);
- * }
- * }
- * ```
- * This directive would be instantiated with `Dependency` declared at the same element, in this case
- * `dependency="3"`.
- *
- * ### Injecting a directive from any ancestor elements
- *
- * Directives can inject other directives declared on any ancestor element (in the current Shadow
- * DOM), i.e. on the current element, the
- * parent element, or its parents.
- * ```
- * @Directive({ selector: '[my-directive]' })
- * class MyDirective {
- * constructor(@Host() dependency: Dependency) {
- * expect(dependency.id).toEqual(2);
- * }
- * }
- * ```
- *
- * `@Host` checks the current element, the parent, as well as its parents recursively. If
- * `dependency="2"` didn't
- * exist on the direct parent, this injection would
- * have returned
- * `dependency="1"`.
- *
- *
- * ### Injecting a live collection of direct child directives
- *
- *
- * A directive can also query for other child directives. Since parent directives are instantiated
- * before child directives, a directive can't simply inject the list of child directives. Instead,
- * the directive injects a {@link QueryList}, which updates its contents as children are added,
- * removed, or moved by a directive that uses a {@link ViewContainerRef} such as a `ng-for`, an
- * `ng-if`, or an `ng-switch`.
- *
- * ```
- * @Directive({ selector: '[my-directive]' })
- * class MyDirective {
- * constructor(@Query(Dependency) dependencies:QueryList) {
- * }
- * }
- * ```
- *
- * This directive would be instantiated with a {@link QueryList} which contains `Dependency` 4 and
- * 6. Here, `Dependency` 5 would not be included, because it is not a direct child.
- *
- * ### Injecting a live collection of descendant directives
- *
- * By passing the descendant flag to `@Query` above, we can include the children of the child
- * elements.
- *
- * ```
- * @Directive({ selector: '[my-directive]' })
- * class MyDirective {
- * constructor(@Query(Dependency, {descendants: true}) dependencies:QueryList) {
- * }
- * }
- * ```
- *
- * This directive would be instantiated with a Query which would contain `Dependency` 4, 5 and 6.
- *
- * ### Optional injection
- *
- * The normal behavior of directives is to return an error when a specified dependency cannot be
- * resolved. If you
- * would like to inject `null` on unresolved dependency instead, you can annotate that dependency
- * with `@Optional()`.
- * This explicitly permits the author of a template to treat some of the surrounding directives as
- * optional.
- *
- * ```
- * @Directive({ selector: '[my-directive]' })
- * class MyDirective {
- * constructor(@Optional() dependency:Dependency) {
- * }
- * }
- * ```
- *
- * This directive would be instantiated with a `Dependency` directive found on the current element.
- * If none can be
- * found, the injector supplies `null` instead of throwing an error.
- *
- * ## Example
- *
- * Here we use a decorator directive to simply define basic tool-tip behavior.
- *
- * ```
- * @Directive({
- * selector: '[tooltip]',
- * inputs: [
- * 'text: tooltip'
- * ],
- * host: {
- * '(mouseenter)': 'onMouseEnter()',
- * '(mouseleave)': 'onMouseLeave()'
- * }
- * })
- * class Tooltip{
- * text:string;
- * overlay:Overlay; // NOT YET IMPLEMENTED
- * overlayManager:OverlayManager; // NOT YET IMPLEMENTED
- *
- * constructor(overlayManager:OverlayManager) {
- * this.overlay = overlay;
- * }
- *
- * onMouseEnter() {
- * // exact signature to be determined
- * this.overlay = this.overlayManager.open(text, ...);
- * }
- *
- * onMouseLeave() {
- * this.overlay.close();
- * this.overlay = null;
- * }
- * }
- * ```
- * In our HTML template, we can then add this behavior to a `
` or any other element with the
- * `tooltip` selector,
- * like so:
- *
- * ```
- *
- * ```
- *
- * Directives can also control the instantiation, destruction, and positioning of inline template
- * elements:
- *
- * A directive uses a {@link ViewContainerRef} to instantiate, insert, move, and destroy views at
- * runtime.
- * The {@link ViewContainerRef} is created as a result of `` element, and represents a
- * location in the current view
- * where these actions are performed.
- *
- * Views are always created as children of the current {@link ViewMetadata}, and as siblings of the
- * `` element. Thus a
- * directive in a child view cannot inject the directive that created it.
- *
- * Since directives that create views via ViewContainers are common in Angular, and using the full
- * `` element syntax is wordy, Angular
- * also supports a shorthand notation: `
- * ```
- *
- * Expands in use to:
- *
- * ```
- *
- *
- *
- *
- *
- * ```
- *
- * Notice that although the shorthand places `*foo="bar"` within the `
` element, the binding for
- * the directive
- * controller is correctly instantiated on the `` element rather than the `
` element.
- *
- * ## Lifecycle hooks
- *
- * When the directive class implements some {@link angular2/lifecycle_hooks} the callbacks are
- * called by the change detection at defined points in time during the life of the directive.
- *
- * ## Example
- *
- * Let's suppose we want to implement the `unless` behavior, to conditionally include a template.
- *
- * Here is a simple directive that triggers on an `unless` selector:
- *
- * ```
- * @Directive({
- * selector: '[unless]',
- * inputs: ['unless']
- * })
- * export class Unless {
- * viewContainer: ViewContainerRef;
- * templateRef: TemplateRef;
- * prevCondition: boolean;
- *
- * constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef) {
- * this.viewContainer = viewContainer;
- * this.templateRef = templateRef;
- * this.prevCondition = null;
- * }
- *
- * set unless(newCondition) {
- * if (newCondition && (isBlank(this.prevCondition) || !this.prevCondition)) {
- * this.prevCondition = true;
- * this.viewContainer.clear();
- * } else if (!newCondition && (isBlank(this.prevCondition) || this.prevCondition)) {
- * this.prevCondition = false;
- * this.viewContainer.create(this.templateRef);
- * }
- * }
- * }
- * ```
- *
- * We can then use this `unless` selector in a template:
- * ```
- *
- *
- *
- * ```
- *
- * Once the directive instantiates the child view, the shorthand notation for the template expands
- * and the result is:
- *
- * ```
- *
- *
- *
- *
- *
- *
- * ```
- *
- * Note also that although the `
` template still exists inside the ``,
- * the instantiated
- * view occurs on the second `` which is a sibling to the `` element.
- */
- class DirectiveMetadata extends InjectableMetadata {
-
- constructor({selector, inputs, outputs, properties, events, host, bindings, exportAs, moduleId,
- queries}?: {
- selector?: string,
- inputs?: string[],
- outputs?: string[],
- properties?: string[],
- events?: string[],
- host?: {[key: string]: string},
- bindings?: any[],
- exportAs?: string,
- moduleId?: string,
- queries?: {[key: string]: any}
- });
-
- /**
- * The CSS selector that triggers the instantiation of a directive.
- *
- * Angular only allows directives to trigger on CSS selectors that do not cross element
- * boundaries.
- *
- * `selector` may be declared as one of the following:
- *
- * - `element-name`: select by element name.
- * - `.class`: select by class name.
- * - `[attribute]`: select by attribute name.
- * - `[attribute=value]`: select by attribute name and value.
- * - `:not(sub_selector)`: select only if the element does not match the `sub_selector`.
- * - `selector1, selector2`: select if either `selector1` or `selector2` matches.
- *
- *
- * ## Example
- *
- * Suppose we have a directive with an `input[type=text]` selector.
- *
- * And the following HTML:
- *
- * ```html
- *