# Class: Overload

## Overload

#### new Overload(nameopt, def) → {function}

Allows a method to accept overloaded calls with different parameters controlling which passed overload function is called.

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`name` | String | <optional> | A name to provide this overload to help identify it if any errors occur during the resolving phase of the overload. This is purely for debug purposes and serves no functional purpose.
`def` | Object |  | The overload definition.

Source:
  - Overload.js, line 13

##### Returns:

Type
  function

### Methods

- generateSignaturePermutations(str) → {Array}

#### generateSignaturePermutations(str) → {Array}

Generates an array of all the different definition signatures that can be created from the passed string with a catch-all wildcard *. E.g. it will convert the signature: string,*,string to all potentials: string,string,string string,number,string string,object,string, string,function,string, string,undefined,string

##### Parameters:

Name | Type | Description
--- | --- | ---
`str` | String | Signature string with a wildcard in it.

Source:
  - Overload.js, line 133

##### Returns:

An array of signature strings that are generated.

Type
  Array