# 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:2832

##### Index

### Properties

callback
name

## Properties

### callback

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

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

### name

name: K

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