Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a type which can release resources, such as event listening or a timer.

层级

索引

Methods(2)

Constructors(1)

Methods(2)

Static from

  • from(...disposableLikes: { dispose: any }[]): Disposable
  • Combine many disposable-likes into one. Use this method when having objects with a dispose function which are not instances of Disposable.

    Parameters

    • Rest ...disposableLikes: { dispose: any }[]

      Objects that have at least a dispose-function member.

    Returns Disposable

    Returns a new disposable which, upon dispose, will dispose all provided disposables.

dispose

  • dispose(): any

Constructors(1)

constructor

  • new Disposable(callOnDispose: Function): Disposable
  • Creates a new Disposable calling the provided function on dispose.

    Parameters

    • callOnDispose: Function

      Function that disposes something.

    Returns Disposable

VS Code 插件开发中文文档 | VS Code 中文文档 | VS Code 官网文档 | VS Code 扩展市场

Generated by TypeDoc | 站长统计