### Hierarchy

- Ha4usScript

## Index

### Constructors

- constructor

### Properties

- $log
- _running
- _source
- autostart
- domain
- event$
- name
- opts
- path
- result
- sandbox
- script
- topic

### Accessors

- running
- source

### Methods

- compile
- destroy
- emit
- enterDomain
- init
- prepareStack
- restart
- start
- stop
- toHa4usObject

## Constructors

### constructor

- new Ha4usScript(scriptObject: Ha4usObject, opts: ScriptOptions): Ha4usScript

- - Defined in ha4us-script.ts:77

  #### Parameters

  - ##### scriptObject: Ha4usObject

  - ##### opts: ScriptOptions

  #### Returns Ha4usScript

## Properties

### $log

$log: Ha4usLogger

- Defined in ha4us-script.ts:77

### _running

_running: boolean = false

- Defined in ha4us-script.ts:64

### _source

_source: string

- Defined in ha4us-script.ts:53

### autostart

autostart: boolean = false

- Defined in ha4us-script.ts:51

### domain

domain: Domain

- Defined in ha4us-script.ts:60

### event$

event$: Subject<ScriptEvent> = new Subject<ScriptEvent>()

- Defined in ha4us-script.ts:75

### name

name: string

- Defined in ha4us-script.ts:47

### opts

opts: ScriptOptions

- Defined in ha4us-script.ts:79

### path

path: string

- Defined in ha4us-script.ts:49

### result

result: any

- Defined in ha4us-script.ts:62

### sandbox

sandbox: Sandbox

- Defined in ha4us-script.ts:59

### script

script: Script

- Defined in ha4us-script.ts:61

### topic

topic: string

- Defined in ha4us-script.ts:48

## Accessors

### running

running:

- Defined in ha4us-script.ts:66
- Defined in ha4us-script.ts:71

### source

source:

- Defined in ha4us-script.ts:54

## Methods

### compile

- compile(): Promise<Ha4usScript>

- - Defined in ha4us-script.ts:122

  #### Returns Promise<Ha4usScript>

### destroy

- destroy(): Promise<Ha4usScript>

- - Defined in ha4us-script.ts:219

  #### Returns Promise<Ha4usScript>

### emit

- emit(type: ScriptEventType, data?: any): void

- - Defined in ha4us-script.ts:239

  #### Parameters

  - ##### type: ScriptEventType

  - ##### Optional data: any

  #### Returns void

### enterDomain

- enterDomain(): void

- - Defined in ha4us-script.ts:147

  #### Returns void

### init

- init(): Promise<Ha4usScript>

- - Defined in ha4us-script.ts:107

  #### Returns Promise<Ha4usScript>

### prepareStack

- prepareStack(e: Error, match: RegExp): string

- - Defined in ha4us-script.ts:91

  #### Parameters

  - ##### e: Error

  - ##### match: RegExp

  #### Returns string

### restart

- restart(): Promise<this>

- - Defined in ha4us-script.ts:209

  #### Returns Promise<this>

### start

- start(): Promise<Ha4usScript>

- - Defined in ha4us-script.ts:154

  #### Returns Promise<Ha4usScript>

### stop

- stop(): Promise<Ha4usScript>

- - Defined in ha4us-script.ts:186

  #### Returns Promise<Ha4usScript>

### toHa4usObject

- toHa4usObject(): Partial<Ha4usObject>

- - Defined in ha4us-script.ts:230

  #### Returns Partial<Ha4usObject>

Generated using TypeDoc