Namespace: ghostly
ghostly-runtime.ghostly
Functions
destroy
▸ destroy(impl): void
Deactivates the Template implementation.
Parameters
| Name | Type | Description | 
|---|---|---|
| impl | Template | The implementation that was previously installed by the init method. | 
Returns
void
Defined in
ghostly-runtime/src/runtime.ts:171
init
▸ init(impl): void
Initializes Ghostly and activates a Template implementation.
Parameters
| Name | Type | Description | 
|---|---|---|
| impl | Template | The Ghostly interface implementation to use for this template. | 
Returns
void
Defined in
ghostly-runtime/src/runtime.ts:109
notify
▸ notify(message): void
Send a custom message to the controlling application/driver.
Note: This method is only valid any of the Template implementation methods is executing.
Parameters
| Name | Type | Description | 
|---|---|---|
| message | null|object | The message to send, or nullfor just letting the driver know you're still alive. | 
Returns
void
Defined in
ghostly-runtime/src/runtime.ts:154
parse
▸ parse<T>(model): T
Helper method that can be used to parse a Model object as JSON, HTML or XML.
Type parameters
| Name | Type | 
|---|---|
| T | extends object|Document | 
Parameters
| Name | Type | Description | 
|---|---|---|
| model | Model | A model received by ghostlyInit. | 
Returns
T