Back to Trilium

Class TaskContext

docs/Script API/classes/Backend_Script_API._internal_.TaskContext.html

0.102.22.0 KB
Original Source

Class TaskContext

Index

Constructors

constructor

Properties

datanoteDeletionHandlerTriggered

Methods

increaseProgressCountreportErrortaskSucceededgetInstance

Constructors

constructor

new TaskContext(
taskId: string,
taskType?: null | string,
data?: null | {},
): TaskContext

Parameters

  • taskId: string
  • taskType: null | string = null
  • data: null | {} = {}

Returns TaskContext

Properties

data

data: null | TaskData

noteDeletionHandlerTriggered

noteDeletionHandlerTriggered: boolean

Methods

increaseProgressCount

increaseProgressCount(): void

Returns void

reportError

reportError(message: string): void

Parameters

  • message: string

Returns void

taskSucceeded

taskSucceeded(result?: string | Record<string, undefined | string>): void

Parameters

  • Optionalresult: string | Record<string, undefined | string>

Returns void

StaticgetInstance

getInstance(taskId: string, taskType: string, data?: null | {}): TaskContext

Parameters

  • taskId: string
  • taskType: string
  • data: null | {} = null

Returns TaskContext

Settings

Member Visibility

  • Protected
  • Inherited
  • External

ThemeOSLightDark

On This Page

Constructors constructor Properties datanoteDeletionHandlerTriggered Methods increaseProgressCountreportErrortaskSucceededgetInstance