@empathyco/x-components
Version:
Empathy X Components
27 lines (15 loc) • 1.16 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
| Parameter | Type | Description |
| --- | --- | --- |
| snippetConfig | [SnippetConfig](./x-components.snippetconfig.md) | The [SnippetConfig](./x-components.snippetconfig.md) that receives from snippet integration. |
**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.