Skip to main content

# ModuleCloseListener

    type ModuleCloseListener = (params: {
      eventName: string;
      eventOptions?: Record<string, unknown>;
      eventParams: ModuleCloseInfo;
      obj: IModule;
    }) => boolean;

event handler that handles module close event

## Parameters​

### params​

event parameters

#### eventName​

`string`

event name

#### eventOptions?​

`Record`<`string`, `unknown`>

additional options related to the event

#### eventParams​

`ModuleCloseInfo`

Module close info

#### obj​

`IModule`

module object reference

## Returns​

`boolean`

true to allow module unload, false otherwise