<!-- Do not edit this file. It is automatically generated by API Documenter. --> [`Component`](Component) › [`register`](Component/register) ## Component.register() method Registers a callback to be called when unloading **Signature:** ```typescript register(cb: () => any): void; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | <code>cb</code> | <code>() =&gt; any</code> | | **Returns:** `void`