# Class InvalidOperationError

An error that is thrown when a method call is invalid for the object's current state.

#### Hierarchy

- Error
  - InvalidOperationError

#####
Index

### Constructors

constructor

##
Constructors

### constructor

- new InvalidOperationError(message?): InvalidOperationError

- Initializes a new instance of the InvalidOperationError class.

  #### Parameters

  - `Optional` message: string

    The error message. If not specified, a default one will be used.

  #### Returns InvalidOperationError

  Overrides Error.constructor