Skip to main content

Namespace: ghostly

ghostly-runtime.ghostly

Functions​

destroy​

▸ destroy(impl): void

Deactivates the Template implementation.

Parameters​

NameTypeDescription
implTemplateThe 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​

NameTypeDescription
implTemplateThe 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​

NameTypeDescription
messagenull | objectThe message to send, or null for 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​

NameType
Textends object | Document

Parameters​

NameTypeDescription
modelModelA model received by ghostlyInit.

Returns​

T

Defined in​

ghostly-runtime/src/runtime.ts:181