# Type Alias Hook<K>

type Hook<K extends keyof HookEvents = keyof HookEvents> = {
callback: (data: HookEvents[K]) => void;
name: K;
}

#### Type Parameters

- K extends keyof HookEvents = keyof HookEvents

- Defined in jslib/src/lib/types/types.ts:2852

##### Index

### Properties

callback
name

## Properties

### callback

callback: (data: HookEvents[K]) => void

- Defined in jslib/src/lib/types/types.ts:2854

### name

name: K

- Defined in jslib/src/lib/types/types.ts:2853