# ObserverHistory

Class · extends [`Events`](https://api.playcanvas.com/observer/classes/Events.md)

Source: https://github.com/playcanvas/playcanvas-observer/blob/7b88674dee207b87954eabfb61685546418ad536/src/observer-history.ts#L15

The ObserverHistory module provides a mechanism for tracking changes to an Observer object and
storing them in a history stack.

## Constructors

### constructor

```ts
new ObserverHistory<T extends object>(args?: object)
```

**Parameters**

- `args` (`object`, optional, default `{}`): Arguments
    - `args.combine` (`boolean`, optional)
    - `args.enabled` (`boolean`, optional)
    - `args.history` (`History`, optional)
    - `args.item` ([`Observer`](https://api.playcanvas.com/observer/classes/Observer.md)`<`[`T`](https://api.playcanvas.com/observer/classes/ObserverHistory.md#t)`>`, optional)
    - `args.prefix` (`string`, optional)

## Inherited from [Events](https://api.playcanvas.com/observer/classes/Events.md)

- `get suspendEvents(): boolean` · `set suspendEvents(value: boolean)`
- `addEmitter(emitter: Events): void`
- `emit(name: string, arg0?: any, arg1?: any, arg2?: any, arg3?: any, arg4?: any, arg5?: any, arg6?: any, arg7?: any): ObserverHistory<T>`
- `on(name: string, fn: HandleEvent): EventHandle`
- `once(name: string, fn: HandleEvent): EventHandle`
- `removeEmitter(emitter: Events): void`
- `unbind(name?: string, fn?: HandleEvent): ObserverHistory<T>`
