Skip to main content

# Listener<SO, Params, Options, ReturnType>

    type Listener<SO, Params, Options, ReturnType> = ({
      obj,
      eventName,
      eventParams,
      eventOptions,
    }: {
      eventName: string;
      eventOptions?: Options;
      eventParams: Params;
      obj: SO;
    }) => ReturnType;

callback for event

## Type Parameters​

### SO​

`SO` extends `IScriptingObjectProxy`

### Params​

`Params` extends `Record`<`string`, `unknown`>

### Options​

`Options` extends `Record`<`string`, `unknown`>

### ReturnType​

`ReturnType`

## Parameters​

### {

obj, eventName, eventParams, eventOptions, }

#### eventName​

`string`

#### eventOptions?​

`Options`

#### eventParams​

`Params`

#### obj​

`SO`

## Returns​

`ReturnType`