diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 532e0404e2..801a1d07ac 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -270,6 +270,7 @@ All definitions files include a header with the author and editors, so at some p
* [Raphael](http://raphaeljs.com/) (by [CheCoxshall](https://github.com/CheCoxshall))
* [Restangular](https://github.com/mgonto/restangular/) (by [Boris Yankov](https://github.com/borisyankov))
* [require.js](http://requirejs.org/) (by [Josh Baldwin](https://github.com/jbaldwin/))
+* [rtree.js] (https://github.com/leaflet-extras/RTree) (by [Omede Firouz](https://github.com/oefirouz))
* [Sammy.js](http://sammyjs.org/) (by [Boris Yankov](https://github.com/borisyankov))
* [Select2](http://ivaynberg.github.com/select2/) (by [Boris Yankov](https://github.com/borisyankov))
* [Selenium WebDriverJS](https://code.google.com/p/selenium/) (by [Bill Armstrong](https://github.com/BillArmstrong))
diff --git a/amplifyjs/amplifyjs-tests.ts b/amplifyjs/amplifyjs-tests.ts
index c26955348b..a104d4a7cc 100644
--- a/amplifyjs/amplifyjs-tests.ts
+++ b/amplifyjs/amplifyjs-tests.ts
@@ -176,8 +176,7 @@ amplify.request("twitter-mentions", { user: "amplifyjs" });
//Example:
-amplify.request.decoders.appEnvelope =
-function (data, status, xhr, success, error) {
+var appEnvelopeDecoder: amplifyDecoder = function (data, status, xhr, success, error) {
if (data.status === "success") {
success(data.data);
} else if (data.status === "fail" || data.status === "error") {
@@ -187,6 +186,17 @@ function (data, status, xhr, success, error) {
}
};
+//a new decoder can be added to the amplifyDecoders interface
+interface amplifyDecoders {
+ appEnvelope: amplifyDecoder;
+}
+
+amplify.request.decoders.appEnvelope = appEnvelopeDecoder;
+
+//but you can also just add it via an index
+amplify.request.decoders['appEnvelopeStr'] = appEnvelopeDecoder;
+
+
amplify.request.define("decoderExample", "ajax", {
url: "/myAjaxUrl",
type: "POST",
diff --git a/amplifyjs/amplifyjs.d.ts b/amplifyjs/amplifyjs.d.ts
index c8de7260ae..a918b7c73f 100644
--- a/amplifyjs/amplifyjs.d.ts
+++ b/amplifyjs/amplifyjs.d.ts
@@ -1,3 +1,5 @@
+///
+
// Type definitions for AmplifyJs 1.1.0
// Project: http://amplifyjs.com/
// Definitions by: Jonas Eriksson
@@ -6,8 +8,28 @@
interface amplifyRequestSettings {
resourceId: string;
data?: any;
- success?: Function;
- error?: Function;
+ success?: (...args: any[]) => void;
+ error?: (...args: any[]) => void;
+}
+
+interface amplifyDecoder {
+ (
+ data?: any,
+ status?: string,
+ xhr?: JQueryXHR,
+ success?: (...args: any[]) => void,
+ error?: (...args: any[]) => void
+ ): void
+}
+
+interface amplifyDecoders {
+ [decoderName: string]: amplifyDecoder;
+ jsSend: amplifyDecoder;
+}
+
+interface amplifyAjaxSettings extends JQueryAjaxSettings {
+ cache?: any;
+ decoder?: any /* string or amplifyDecoder */;
}
interface amplifyRequest {
@@ -39,7 +61,7 @@ interface amplifyRequest {
* cache: See the cache section for more details.
* decoder: See the decoder section for more details.
*/
- define(resourceId: string, requestType: string, settings?: any): void;
+ define(resourceId: string, requestType: string, settings?: amplifyAjaxSettings): void;
/***
* Define a custom request.
@@ -50,9 +72,9 @@ interface amplifyRequest {
* success: Callback to invoke on success.
* error: Callback to invoke on error.
*/
- define(resourceId: string, resource: Function): void;
-
- decoders: any;
+ define(resourceId: string, resource: (settings: amplifyRequestSettings) => void): void;
+
+ decoders: amplifyDecoders;
cache: any;
}
diff --git a/angular-ui/angular-ui-router-tests.ts b/angular-ui/angular-ui-router-tests.ts
index 4804ad297a..5b0dec0ffb 100644
--- a/angular-ui/angular-ui-router-tests.ts
+++ b/angular-ui/angular-ui-router-tests.ts
@@ -78,12 +78,13 @@ interface IUrlLocatorTestService {
// Service for determining who the currently logged on user is.
class UrlLocatorTestService implements IUrlLocatorTestService {
- static $inject = ["$http", "$rootScope", "$urlRouter"];
+ static $inject = ["$http", "$rootScope", "$urlRouter", "$state"];
constructor(
private $http: ng.IHttpService,
private $rootScope: ng.IRootScopeService,
- private $urlRouter: ng.ui.IUrlRouterService
+ private $urlRouter: ng.ui.IUrlRouterService,
+ private $state: ng.ui.IStateService
) {
$rootScope.$on("$locationChangeSuccess", (event: ng.IAngularEvent) => this.onLocationChangeSuccess(event));
}
@@ -107,6 +108,23 @@ class UrlLocatorTestService implements IUrlLocatorTestService {
});
}
}
+
+ private stateServiceTest() {
+ this.$state.go("myState");
+ this.$state.transitionTo("myState");
+ if (this.$state.includes("myState") === true) {
+ //
+ }
+ if (this.$state.is("myState") === true) {
+ //
+ }
+ if (this.$state.href("myState") === "/myState") {
+ //
+ }
+ this.$state.get("myState");
+ this.$state.get();
+ this.$state.reload();
+ }
}
myApp.service("urlLocatorTest", UrlLocatorTestService);
@@ -124,4 +142,3 @@ module UiViewScrollProviderTests {
$uiViewScrollProvider.useAnchorScroll();
}]);
}
-
diff --git a/angular-ui/angular-ui-router.d.ts b/angular-ui/angular-ui-router.d.ts
index 499f1c474a..3b233c86a1 100644
--- a/angular-ui/angular-ui-router.d.ts
+++ b/angular-ui/angular-ui-router.d.ts
@@ -86,6 +86,7 @@ declare module ng.ui {
get(): IState[];
current: IState;
params: IStateParamsService;
+ reload(): void;
}
interface IStateParamsService {
diff --git a/angularjs/angular-route-tests.ts b/angularjs/angular-route-tests.ts
index 2ebe16a21e..3b35a97bbc 100644
--- a/angularjs/angular-route-tests.ts
+++ b/angularjs/angular-route-tests.ts
@@ -9,6 +9,9 @@
declare var $routeProvider: ng.route.IRouteProvider;
$routeProvider
.when('/projects/:projectId/dashboard',{
- controller: ''
+ controller: '',
+ templateUrl: '',
+ caseInsensitiveMatch: true,
+ reloadOnSearch: false
})
.otherwise({redirectTo: '/'});
diff --git a/angularjs/angular-route.d.ts b/angularjs/angular-route.d.ts
index 025c5da227..4e2aa7607d 100644
--- a/angularjs/angular-route.d.ts
+++ b/angularjs/angular-route.d.ts
@@ -30,17 +30,73 @@ declare module ng.route {
// to a controller that was not initialized as a result of a route maching.
current?: ICurrentRoute;
}
-
- // see http://docs.angularjs.org/api/ngRoute.$routeProvider#when for options explanations
+
+
+ /**
+ * see http://docs.angularjs.org/api/ngRoute/provider/$routeProvider#when for API documentation
+ */
interface IRoute {
+ /**
+ * {(string|function()=}
+ * Controller fn that should be associated with newly created scope or the name of a registered controller if passed as a string.
+ */
controller?: any;
- controllerAs?: any;
+ /**
+ * A controller alias name. If present the controller will be published to scope under the controllerAs name.
+ */
+ controllerAs?: string;
+ /**
+ * Undocumented?
+ */
name?: string;
+ /**
+ * {string=|function()=}
+ * Html template as a string or a function that returns an html template as a string which should be used by ngView or ngInclude directives. This property takes precedence over templateUrl.
+ *
+ * If template is a function, it will be called with the following parameters:
+ *
+ * {Array.