UNPKG

@empathyco/x-components

Version:
57 lines (27 loc) 1.29 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [XInstaller](./x-components.xinstaller.md) &gt; [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&lt;[InitWrapper](./x-components.initwrapper.md)<!-- -->&gt; 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.