Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CodeBlock

Hierarchy

Implements

Index

Constructors

constructor

Events

pinChanged

pinChanged: VoidSyncEvent = new VoidSyncEvent()

Properties

Protected _code

_code: string = `function onStart() {return ExecutionStatus.Continue;}function onUpdate() {return ExecutionStatus.Finish;}`

Protected _pins

_pins: ReferenceArray<BasePin> = new ReferenceArray(BasePin)

deleted

deleted: AsyncEvent<string> = new AsyncEvent<string>()

id

id: string

isPersistent

isPersistent: boolean = false

name

name: string

Optional templatePath

templatePath: undefined | string

Accessors

code

  • get code(): string
  • set code(code: string): void

functions

  • get functions(): object

hasCompileErrors

  • get hasCompileErrors(): boolean

isLoading

  • get isLoading(): boolean

pins

program

  • get program(): any

runtimeError

  • get runtimeError(): undefined | [string, number]

version

  • get version(): number

Methods

clearRuntimeErrors

  • clearRuntimeErrors(): void

copy

deserialize

destroy

  • destroy(): void

isA

  • isA<T>(type: object): boolean

isLoaded

  • isLoaded(): boolean

logCompileError

  • logCompileError(message: string): void

logRuntimeError

  • logRuntimeError(message: string): void

save

  • save(folderPath?: undefined | string): void

serialize

setProperty

  • setProperty(property: string, value: any): void

setState

upgrade