Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Workspace

A workspace.

Hierarchy

  • Disposable
  • EventEmitter
    • Workspace

Implemented by

Index

Constructors

constructor

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

    Parameters

    • callOnDispose: Function

      Function that disposes something.

    Returns Workspace

Properties

configSource

configSource: WorkspaceConfigSource

Gets the config source of that workspace.

folder

folder: vscode.WorkspaceFolder

The underlying folder.

onDidChangeConfiguration

onDidChangeConfiguration: function

Is invoked when the configuration for that workspace changed.

Type declaration

    • (e: vscode.ConfigurationChangeEvent): void | PromiseLike<void>
    • Parameters

      • e: vscode.ConfigurationChangeEvent

      Returns void | PromiseLike<void>

rootPath

rootPath: string

Gets the root path of that workspace.

Methods

addListener

  • addListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

dispose

  • dispose(): any
  • Dispose this object.

    Returns any

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

getMaxListeners

  • getMaxListeners(): number
  • Returns number

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

on

  • on(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

once

  • once(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

Static from

  • from(...disposableLikes: object[]): 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: object[]

      Objects that have at least a dispose-function member.

    Returns Disposable

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

Generated using TypeDoc