WorkspacesAPI
Defined in: namespaces.ts:1271
Methods
Section titled “Methods”register()
Section titled “register()”register(
template):Promise<string>
Defined in: namespaces.ts:1273
Registers an ephemeral workspace template.
Parameters
Section titled “Parameters”template
Section titled “template”Partial<WorkspaceTemplate> & object
Returns
Section titled “Returns”Promise<string>
list()
Section titled “list()”list():
Promise<WorkspaceTemplate[]>
Defined in: namespaces.ts:1275
Lists all available workspace templates (all sources).
Returns
Section titled “Returns”Promise<WorkspaceTemplate[]>
apply()
Section titled “apply()”apply(
workspaceId):Promise<boolean>
Defined in: namespaces.ts:1277
Applies a workspace template to the current window.
Parameters
Section titled “Parameters”workspaceId
Section titled “workspaceId”string
Returns
Section titled “Returns”Promise<boolean>
getActive()
Section titled “getActive()”getActive():
Promise<string|null>
Defined in: namespaces.ts:1279
Returns the active workspace ID for the current window.
Returns
Section titled “Returns”Promise<string | null>
onChange()
Section titled “onChange()”onChange(
callback):Promise<string>
Defined in: namespaces.ts:1281
Subscribes to workspace change events for the current window.
Parameters
Section titled “Parameters”callback
Section titled “callback”(workspaceId) => void
Returns
Section titled “Returns”Promise<string>