mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-27 12:21:19 +08:00
Add reference path to test file
This commit is contained in:
1 parent
b33ff5f0e0
commit
ba80717c78
1 file changed
+5
-3
@@ -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