@empathyco/x-components
Version:
Empathy X Components
57 lines (27 loc) • 1.29 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [XInstaller](./x-components.xinstaller.md) > [init](./x-components.xinstaller.init.md)
## XInstaller.init() method
Receives the [snippet config](./x-components.snippetconfig.md) or retrieves it from window.initX and installs the plugin and initializes the Vue application.
**Signature:**
```typescript
init(snippetConfig: SnippetConfig): Promise<InitWrapper>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
snippetConfig
</td><td>
[SnippetConfig](./x-components.snippetconfig.md)
</td><td>
The [SnippetConfig](./x-components.snippetconfig.md) that receives from snippet integration.
</td></tr>
</tbody></table>
**Returns:**
Promise<[InitWrapper](./x-components.initwrapper.md)<!-- -->>
If [snippet config](./x-components.snippetconfig.md) is passed or configured in window.initX, returns an object with the [XAPI](./x-components.xapi.md)<!-- -->, the XBus, the [XPlugin](./x-components.xplugin.md) and the Vue application instance. Else, a rejected promise is returned.