Merge pull request #411 from maroy1986/master

Add missing/change definition in durandal/durandal.d.ts
This commit is contained in:
Diullei Gomes
2013-03-22 13:27:03 -07:00
2 changed files with 20 additions and 4 deletions
+15 -3
View File
@@ -64,7 +64,7 @@ declare module "durandal/app" {
* @param transition If you have a splash screen, you may want to specify an optional transition to animate from the splash to your main shell.
* @param applicationHost parameter is optional. If provided it should be an element id for the node into which the UI should be composed. If it is not provided the default is to look for an element with an id of "applicationHost".
*/
export var setRoot: (root: any, transition: string, applicationHost: string) => void;
export var setRoot: (root: any, transition: string, applicationHost?: string) => void;
/**
* If you intend to run on mobile, you should also call app.adaptToDevice() before setting the root.
*/
@@ -368,6 +368,10 @@ declare module "durandal/plugins/router" {
* An observable whose value is the currently active item/module/page.
*/
export var activeItem: IDurandalViewModelActiveItem;
/**
* An observable whose value is the currently active route.
*/
export var activeRoute: KnockoutObservableAny;
/**
* called after an a new module is composed
*/
@@ -376,6 +380,10 @@ declare module "durandal/plugins/router" {
* Causes the router to move backwards in page history.
*/
export var navigateBack: () => void;
/**
* Use router default convention.
*/
export var useConvention: () => void;
/**
* Causes the router to navigate to a specific url.
*/
@@ -400,6 +408,10 @@ declare module "durandal/plugins/router" {
* This should not normally be overwritten. But advanced users can override this to completely transform the developer's routeInfo input into the final version used to configure the router.
*/
export var prepareRouteInfo: (info: routeInfo) => void;
/**
* This should not normally be overwritten. But advanced users can override this to completely transform the developer's routeInfo input into the final version used to configure the router.
*/
export var handleInvalidRoute: (route: routeInfo, parameters: any) => void;
/**
* Once the router is required, you can call router.mapAuto(). This is the most basic configuration option. When you call this function (with no parameters) it tells the router to directly correlate route parameters to module names in the viewmodels folder.
*/
@@ -411,7 +423,7 @@ declare module "durandal/plugins/router" {
/**
* You can pass a single routeInfo to this function, or you can pass the basic configuration parameters. url is your url pattern, moduleId is the module path this pattern will map to, name is used as the document title and visible determines whether or not to include it in the router's visibleRoutes array for easy navigation UI binding.
*/
export var mapRoute: (url: string, moduleId: string, name: string, visible: bool) => routeInfo;
export var mapRoute: (urlOrRouteInfo: any, moduleId?: string, name?: string, visible?: bool) => routeInfo;
/**
* This function takes an array of routeInfo objects or a single routeInfo object and uses it to configure the router. The finalized routeInfo (or array of infos) is returned.
*/
@@ -423,4 +435,4 @@ declare module "durandal/plugins/router" {
* After you've configured the router, you need to activate it. This is usually done in your shell. The activate function of the router returns a promise that resolves when the router is ready to start. To use the router, you should add an activate function to your shell and return the result from that. The application startup infrastructure of Durandal will detect your shell's activate function and call it at the appropriate time, waiting for it's promise to resolve. This allows Durandal to properly orchestrate the timing of composition and databinding along with animations and splash screen display.
*/
export var activate: (defaultRoute: string) => JQueryPromise;
}
}
+5 -1
View File
@@ -62,6 +62,10 @@ interface ToastrOptions {
*/
positionClass?: string;
/**
* Where toast should be displayed - background
*/
backgroundpositionClass?: string;
/**
* Time in milliseconds that the toast should be displayed
*/
timeOut?: number;
@@ -146,4 +150,4 @@ interface Toastr {
version: string;
}
declare var toastr: Toastr;
declare var toastr: Toastr;