UNPKG

power-di

Version:

A lightweight Dependency Injection library. Using es6 and other features, remove unnecessary concepts, easy and convenient to use.

5 lines (4 loc) 116 B
export declare function guard<T>(f: () => T, opt?: { defaultValue?: T; onError?: (e: Error) => void; }): T;