mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Added definitions for ocLazyLoad (https://github.com/ocombe/ocLazyLoad)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/// <reference path="oclazyload.d.ts" />
|
||||
|
||||
var lazyloader:Function = ()=>{};
|
||||
|
||||
var config1: oc.ILazyLoadConfig = {
|
||||
asyncLoader: lazyloader
|
||||
};
|
||||
|
||||
var config2:oc.ILazyLoadConfig = {
|
||||
asyncLoader: lazyloader,
|
||||
loadedModules: ['module1', 'module2']
|
||||
};
|
||||
|
||||
var moduleConfig:oc.ILazyLoadModuleConfig = {
|
||||
name:'testmodule',
|
||||
files:['testmodule']
|
||||
}
|
||||
|
||||
var config2:oc.ILazyLoadConfig = {
|
||||
asyncLoader: lazyloader,
|
||||
loadedModules: ['module1', 'module2'],
|
||||
modules: [moduleConfig]
|
||||
};
|
||||
Vendored
+34
@@ -0,0 +1,34 @@
|
||||
// Type definitions for oc.LazyLoad
|
||||
// Project: https://github.com/ocombe/ocLazyLoad
|
||||
// Definitions by: Roland Zwaga <https://github.com/rolandzwaga>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../angularjs/angular.d.ts" />
|
||||
|
||||
declare module oc {
|
||||
|
||||
interface ILazyLoadConfig {
|
||||
asyncLoader:any;
|
||||
loadedModules?:string[];
|
||||
modules?:ILazyLoadModuleConfig[];
|
||||
}
|
||||
|
||||
interface ILazyLoadModuleConfig {
|
||||
name:string;
|
||||
files:string[];
|
||||
}
|
||||
|
||||
interface ILazyLoad {
|
||||
load(module:any):ng.IPromise<any>;
|
||||
loadTemplateFile(url:string, config:ILazyLoadModuleConfig):ng.IPromise<any>;
|
||||
loadTemplateFile(urls:string[], config:ILazyLoadModuleConfig):ng.IPromise<any>;
|
||||
getModuleName(moduleName:string):string;
|
||||
getModules():string[];
|
||||
getModuleConfig(name:string):ILazyLoadModuleConfig;
|
||||
setModuleConfig(config:ILazyLoadModuleConfig):void;
|
||||
}
|
||||
|
||||
interface ILazyLoadProvider {
|
||||
config(config:ILazyLoadConfig):void;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user