UNPKG

simpleitjs

Version:
36 lines (35 loc) 1.25 kB
/// <reference path="module.d.ts" /> /// <reference path="ajax.d.ts" /> /// <reference path="module-scope.d.ts" /> declare let ModuleScopeParent: typeof ModuleScope; declare class RouterLoaderAttributes { basePath?: string; rootElemSelector?: string; } declare class Router extends ModuleScopeParent { private Ajax; configs: any; basePath: string; rootElemSelector: string; /** * Loads state by state object * @param {Object} state State object to load. * @param {boolean} updateURL Optional, should update URL after loading the state. Default false */ loadState(state: any, updateURL: boolean): void; loadProperState(): void; getCurrentState(): any; /** * Loads configs and starts routing. */ load(config: any, attr: RouterLoaderAttributes): void; getDefaultState(): any; /** * Loads given state. * @param {string} stateName Name of state to load. * @param {boolean} updateURL Optional, should update URL after loading the state. Default false */ goTo(stateName: string, updateURL: boolean): void; static invoke(model: Router, Ajax: Ajax): Router; } declare var require: (...args: any[]) => any;