填写这份《一分钟调查》,帮我们(开发组)做得更好!去填写Home

StaticClassSansProvider

配置 Injector 以返回 useClass 的令牌实例。这是 StaticClassProvider 装饰器的基接口。

Configures the Injector to return an instance of useClass for a token. Base for StaticClassProvider decorator.

      
      interface StaticClassSansProvider {
  useClass: Type<any>
  deps: any[]
}
    

属性

属性说明
useClass: Type<any>

token 实例化的可选类。默认情况下,会把 provide 类实例化。

An optional class to instantiate for the token. By default, the provide class is instantiated.

deps: any[]

由注入器解析的 token 列表。将这个值列表用作 useClass 构造函数的参数。

A list of tokens to be resolved by the injector. The list of values is then used as arguments to the useClass constructor.