Merge pull request #2152 from rolandzwaga/oclazyload

Added definitions for ocLazyLoad (https://github.com/ocombe/ocLazyLoad)
This commit is contained in:
Masahiro Wakame
2014-05-12 23:03:29 +09:00
3 changed files with 58 additions and 0 deletions
+1
View File
@@ -231,6 +231,7 @@ All definitions files include a header with the author and editors, so at some p
* [notify.js](https://github.com/alexgibson/notify.js) (by [soundTricker](https://github.com/soundTricker))
* [NProgress](https://github.com/rstacruz/nprogress) (by [Judah Gabriel Himango](https://github.com/judahgabriel))
* [Numeral.js](https://github.com/adamwdraper/Numeral-js) (by [Vincent Bortone](https://github.com/vbortone/))
* [ocLazyLoad](https://github.com/ocombe/ocLazyLoad) (by [Roland Zwaga](https://github.com/rolandzwaga/))
* [OpenLayers](https://github.com/openlayers/openlayers) (by [Ilya Bolkhovsky](https://github.com/bolhovsky/))
* [Optimist](https://github.com/substack/node-optimist) (by [Carlos Ballesteros Velasco](https://github.com/soywiz))
* [Passport](http://passportjs.org/) (by [Hiroki Horiuchi](https://github.com/horiuchi/))
+23
View File
@@ -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]
};
+34
View File
@@ -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;
}
}