Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ICodeRunner<T>

An object that runs code, which may be registered with the Run menu.

Type parameters

  • T: Widget

Hierarchy

Index

Properties

Optional isEnabled

isEnabled: (widget: T) => boolean

An additional function that determines whether the extender is enabled. By default it is considered enabled if the application active widget is contained in the tracker. If this is also provided, the criterion is equivalent to tracker.has(widget) && extender.isEnabled(widget)

Type declaration

    • (widget: T): boolean
    • An additional function that determines whether the extender is enabled. By default it is considered enabled if the application active widget is contained in the tracker. If this is also provided, the criterion is equivalent to tracker.has(widget) && extender.isEnabled(widget)

      Parameters

      • widget: T

      Returns boolean

Optional restartAndRunAll

restartAndRunAll: (widget: T) => Promise<boolean>

Type declaration

    • (widget: T): Promise<boolean>
    • A function to restart and run all the code hosted by the widget, which returns a promise of whether the action was performed.

      Parameters

      • widget: T

      Returns Promise<boolean>

Optional restartAndRunAllCaption

restartAndRunAllCaption: (n: number) => string

Type declaration

    • (n: number): string
    • Return the caption associated to the restartAndRunAll function.

      This function receives the number of items n to be able to provided correct pluralized forms of translations.

      Parameters

      • n: number

      Returns string

Optional restartAndRunAllLabel

restartAndRunAllLabel: (n: number) => string

Type declaration

    • (n: number): string
    • Return the label associated to the restartAndRunAll function.

      This function receives the number of items n to be able to provided correct pluralized forms of translations.

      Parameters

      • n: number

      Returns string

Optional run

run: (widget: T) => Promise<void>

Type declaration

    • (widget: T): Promise<void>
    • A function to run a chunk of code.

      Parameters

      • widget: T

      Returns Promise<void>

Optional runAll

runAll: (widget: T) => Promise<void>

Type declaration

    • (widget: T): Promise<void>
    • A function to run the entirety of the code hosted by the widget.

      Parameters

      • widget: T

      Returns Promise<void>

Optional runAllCaption

runAllCaption: (n: number) => string

Type declaration

    • (n: number): string
    • Return the caption associated to the runAll function.

      This function receives the number of items n to be able to provided correct pluralized forms of translations.

      Parameters

      • n: number

      Returns string

Optional runAllLabel

runAllLabel: (n: number) => string

Type declaration

    • (n: number): string
    • Return the label associated to the runAll function.

      This function receives the number of items n to be able to provided correct pluralized forms of translations.

      Parameters

      • n: number

      Returns string

Optional runCaption

runCaption: (n: number) => string

Type declaration

    • (n: number): string
    • Return the caption associated to the run function.

      This function receives the number of items n to be able to provided correct pluralized forms of translations.

      Parameters

      • n: number

      Returns string

Optional runLabel

runLabel: (n: number) => string

Type declaration

    • (n: number): string
    • Return the label associated to the run function.

      This function receives the number of items n to be able to provided correct pluralized forms of translations.

      Parameters

      • n: number

      Returns string

tracker

tracker: IWidgetTracker<T>

A widget tracker for identifying the appropriate extender.

Generated using TypeDoc