mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add reference path to test file
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
/// <reference path="di-lite.d.ts" />
|
||||
|
||||
interface Dependency {
|
||||
dependencies?: string;
|
||||
}
|
||||
|
||||
function doTest(test: (ctx: DiCreateContext, ...obj: Dependency[]) => void) {
|
||||
function doTest(test: (ctx, ...obj: Dependency[]) => void) {
|
||||
// create di context
|
||||
var ctx = di.createContext(),
|
||||
A: Dependency = () => {
|
||||
@@ -92,11 +94,11 @@ module CyclicalDependency {
|
||||
|
||||
module FunctionalObject {
|
||||
doTest(ctx => {
|
||||
var FuncObject = spec => {
|
||||
var FuncObject = (spec: any) => {
|
||||
var that = {};
|
||||
return that;
|
||||
},
|
||||
spec = [];
|
||||
spec: any = [];
|
||||
|
||||
ctx.register("funcObjSingleton", FuncObject, spec).factory(di.factory.func);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user