### Hierarchy

- Spy

### Callable

- __call(): SpyFunc0Proxy<void>
- __call<R>(fn: SpyFunc0<R>): SpyFunc0Proxy<R>
- __call<A1, R>(fn: SpyFunc1<A1, R>): SpyFunc1Proxy<A1, R>
- __call<A1, A2, R>(fn: SpyFunc2<A1, A2, R>): SpyFunc2Proxy<A1, A2, R>
- __call<A1, A2, A3, R>(fn: SpyFunc3<A1, A2, A3, R>): SpyFunc3Proxy<A1, A2, A3, R>
- __call<A1, A2, A3, A4, R>(fn: SpyFunc4<A1, A2, A3, A4, R>): SpyFunc4Proxy<A1, A2, A3, A4, R>
- __call<A1, A2, A3, A4, A5, R>(fn: SpyFunc5<A1, A2, A3, A4, A5, R>): SpyFunc5Proxy<A1, A2, A3, A4, A5, R>
- __call<A1, A2, A3, A4, A5, A6, R>(fn: SpyFunc6<A1, A2, A3, A4, A5, A6, R>): SpyFunc6Proxy<A1, A2, A3, A4, A5, A6, R>
- __call<A1, A2, A3, A4, A5, A6, A7, R>(fn: SpyFunc7<A1, A2, A3, A4, A5, A6, A7, R>): SpyFunc7Proxy<A1, A2, A3, A4, A5, A6, A7, R>
- __call<A1, A2, A3, A4, A5, A6, A7, A8, R>(fn: SpyFunc8<A1, A2, A3, A4, A5, A6, A7, A8, R>): SpyFunc8Proxy<A1, A2, A3, A4, A5, A6, A7, A8, R>
- __call<A1, A2, A3, A4, A5, A6, A7, A8, A9, R>(fn: SpyFunc9<A1, A2, A3, A4, A5, A6, A7, A8, A9, R>): SpyFunc9Proxy<A1, A2, A3, A4, A5, A6, A7, A8, A9, R>
- __call<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R>(fn: SpyFunc10<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R>): SpyFunc10Proxy<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R>
- __call<R>(name: string, fn: SpyFunc0<R>): SpyFunc0Proxy<R>
- __call<A1, R>(name: string, fn: SpyFunc1<A1, R>): SpyFunc1Proxy<A1, R>
- __call<A1, A2, R>(name: string, fn: SpyFunc2<A1, A2, R>): SpyFunc2Proxy<A1, A2, R>
- __call<A1, A2, A3, R>(name: string, fn: SpyFunc3<A1, A2, A3, R>): SpyFunc3Proxy<A1, A2, A3, R>
- __call<A1, A2, A3, A4, R>(name: string, fn: SpyFunc4<A1, A2, A3, A4, R>): SpyFunc4Proxy<A1, A2, A3, A4, R>
- __call<A1, A2, A3, A4, A5, R>(name: string, fn: SpyFunc5<A1, A2, A3, A4, A5, R>): SpyFunc5Proxy<A1, A2, A3, A4, A5, R>
- __call<A1, A2, A3, A4, A5, A6, R>(name: string, fn: SpyFunc6<A1, A2, A3, A4, A5, A6, R>): SpyFunc6Proxy<A1, A2, A3, A4, A5, A6, R>
- __call<A1, A2, A3, A4, A5, A6, A7, R>(name: string, fn: SpyFunc7<A1, A2, A3, A4, A5, A6, A7, R>): SpyFunc7Proxy<A1, A2, A3, A4, A5, A6, A7, R>
- __call<A1, A2, A3, A4, A5, A6, A7, A8, R>(name: string, fn: SpyFunc8<A1, A2, A3, A4, A5, A6, A7, A8, R>): SpyFunc8Proxy<A1, A2, A3, A4, A5, A6, A7, A8, R>
- __call<A1, A2, A3, A4, A5, A6, A7, A8, A9, R>(name: string, fn: SpyFunc9<A1, A2, A3, A4, A5, A6, A7, A8, A9, R>): SpyFunc9Proxy<A1, A2, A3, A4, A5, A6, A7, A8, A9, R>
- __call<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R>(name: string, fn: SpyFunc10<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R>): SpyFunc10Proxy<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:92

  #### chai.spy (function)

  Wraps a function in a proxy function. All calls will pass through to the original function.

      function original() {}
      var spy = chai.spy(original)
        , e_spy = chai.spy();

  #### Returns SpyFunc0Proxy<void>

  function to actually call

- - Defined in node_modules/@types/chai-spies/index.d.ts:105

  #### Type parameters

  - #### R

  #### Parameters

  - ##### fn: SpyFunc0<R>

  #### Returns SpyFunc0Proxy<R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:106

  #### Type parameters

  - #### A1

  - #### R

  #### Parameters

  - ##### fn: SpyFunc1<A1, R>

  #### Returns SpyFunc1Proxy<A1, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:107

  #### Type parameters

  - #### A1

  - #### A2

  - #### R

  #### Parameters

  - ##### fn: SpyFunc2<A1, A2, R>

  #### Returns SpyFunc2Proxy<A1, A2, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:108

  #### Type parameters

  - #### A1

  - #### A2

  - #### A3

  - #### R

  #### Parameters

  - ##### fn: SpyFunc3<A1, A2, A3, R>

  #### Returns SpyFunc3Proxy<A1, A2, A3, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:109

  #### Type parameters

  - #### A1

  - #### A2

  - #### A3

  - #### A4

  - #### R

  #### Parameters

  - ##### fn: SpyFunc4<A1, A2, A3, A4, R>

  #### Returns SpyFunc4Proxy<A1, A2, A3, A4, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:110

  #### Type parameters

  - #### A1

  - #### A2

  - #### A3

  - #### A4

  - #### A5

  - #### R

  #### Parameters

  - ##### fn: SpyFunc5<A1, A2, A3, A4, A5, R>

  #### Returns SpyFunc5Proxy<A1, A2, A3, A4, A5, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:111

  #### Type parameters

  - #### A1

  - #### A2

  - #### A3

  - #### A4

  - #### A5

  - #### A6

  - #### R

  #### Parameters

  - ##### fn: SpyFunc6<A1, A2, A3, A4, A5, A6, R>

  #### Returns SpyFunc6Proxy<A1, A2, A3, A4, A5, A6, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:112

  #### Type parameters

  - #### A1

  - #### A2

  - #### A3

  - #### A4

  - #### A5

  - #### A6

  - #### A7

  - #### R

  #### Parameters

  - ##### fn: SpyFunc7<A1, A2, A3, A4, A5, A6, A7, R>

  #### Returns SpyFunc7Proxy<A1, A2, A3, A4, A5, A6, A7, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:113

  #### Type parameters

  - #### A1

  - #### A2

  - #### A3

  - #### A4

  - #### A5

  - #### A6

  - #### A7

  - #### A8

  - #### R

  #### Parameters

  - ##### fn: SpyFunc8<A1, A2, A3, A4, A5, A6, A7, A8, R>

  #### Returns SpyFunc8Proxy<A1, A2, A3, A4, A5, A6, A7, A8, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:114

  #### Type parameters

  - #### A1

  - #### A2

  - #### A3

  - #### A4

  - #### A5

  - #### A6

  - #### A7

  - #### A8

  - #### A9

  - #### R

  #### Parameters

  - ##### fn: SpyFunc9<A1, A2, A3, A4, A5, A6, A7, A8, A9, R>

  #### Returns SpyFunc9Proxy<A1, A2, A3, A4, A5, A6, A7, A8, A9, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:115

  #### Type parameters

  - #### A1

  - #### A2

  - #### A3

  - #### A4

  - #### A5

  - #### A6

  - #### A7

  - #### A8

  - #### A9

  - #### A10

  - #### R

  #### Parameters

  - ##### fn: SpyFunc10<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R>

  #### Returns SpyFunc10Proxy<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:116

  #### Type parameters

  - #### R

  #### Parameters

  - ##### name: string

  - ##### fn: SpyFunc0<R>

  #### Returns SpyFunc0Proxy<R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:117

  #### Type parameters

  - #### A1

  - #### R

  #### Parameters

  - ##### name: string

  - ##### fn: SpyFunc1<A1, R>

  #### Returns SpyFunc1Proxy<A1, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:118

  #### Type parameters

  - #### A1

  - #### A2

  - #### R

  #### Parameters

  - ##### name: string

  - ##### fn: SpyFunc2<A1, A2, R>

  #### Returns SpyFunc2Proxy<A1, A2, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:119

  #### Type parameters

  - #### A1

  - #### A2

  - #### A3

  - #### R

  #### Parameters

  - ##### name: string

  - ##### fn: SpyFunc3<A1, A2, A3, R>

  #### Returns SpyFunc3Proxy<A1, A2, A3, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:120

  #### Type parameters

  - #### A1

  - #### A2

  - #### A3

  - #### A4

  - #### R

  #### Parameters

  - ##### name: string

  - ##### fn: SpyFunc4<A1, A2, A3, A4, R>

  #### Returns SpyFunc4Proxy<A1, A2, A3, A4, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:121

  #### Type parameters

  - #### A1

  - #### A2

  - #### A3

  - #### A4

  - #### A5

  - #### R

  #### Parameters

  - ##### name: string

  - ##### fn: SpyFunc5<A1, A2, A3, A4, A5, R>

  #### Returns SpyFunc5Proxy<A1, A2, A3, A4, A5, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:122

  #### Type parameters

  - #### A1

  - #### A2

  - #### A3

  - #### A4

  - #### A5

  - #### A6

  - #### R

  #### Parameters

  - ##### name: string

  - ##### fn: SpyFunc6<A1, A2, A3, A4, A5, A6, R>

  #### Returns SpyFunc6Proxy<A1, A2, A3, A4, A5, A6, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:123

  #### Type parameters

  - #### A1

  - #### A2

  - #### A3

  - #### A4

  - #### A5

  - #### A6

  - #### A7

  - #### R

  #### Parameters

  - ##### name: string

  - ##### fn: SpyFunc7<A1, A2, A3, A4, A5, A6, A7, R>

  #### Returns SpyFunc7Proxy<A1, A2, A3, A4, A5, A6, A7, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:124

  #### Type parameters

  - #### A1

  - #### A2

  - #### A3

  - #### A4

  - #### A5

  - #### A6

  - #### A7

  - #### A8

  - #### R

  #### Parameters

  - ##### name: string

  - ##### fn: SpyFunc8<A1, A2, A3, A4, A5, A6, A7, A8, R>

  #### Returns SpyFunc8Proxy<A1, A2, A3, A4, A5, A6, A7, A8, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:125

  #### Type parameters

  - #### A1

  - #### A2

  - #### A3

  - #### A4

  - #### A5

  - #### A6

  - #### A7

  - #### A8

  - #### A9

  - #### R

  #### Parameters

  - ##### name: string

  - ##### fn: SpyFunc9<A1, A2, A3, A4, A5, A6, A7, A8, A9, R>

  #### Returns SpyFunc9Proxy<A1, A2, A3, A4, A5, A6, A7, A8, A9, R>

- - Defined in node_modules/@types/chai-spies/index.d.ts:126

  #### Type parameters

  - #### A1

  - #### A2

  - #### A3

  - #### A4

  - #### A5

  - #### A6

  - #### A7

  - #### A8

  - #### A9

  - #### A10

  - #### R

  #### Parameters

  - ##### name: string

  - ##### fn: SpyFunc10<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R>

  #### Returns SpyFunc10Proxy<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, R>

## Index

### Methods

- object
- on
- restore
- returns
- sandbox

## Methods

### object

- object(name: string, methods: string[]): any
- object(methods: string[]): any
- object<T>(name: string, methods: T): T
- object<T>(methods: T): T

- - Defined in node_modules/@types/chai-spies/index.d.ts:154

  #### chai.spy.object (function)

  Creates an object with spied methods.

      var object = chai.spy.object('Array', [ 'push', 'pop' ]);

  #### Parameters

  - ##### name: string

  - ##### methods: string[]

  #### Returns any

  object with spied methods

- - Defined in node_modules/@types/chai-spies/index.d.ts:155

  #### Parameters

  - ##### methods: string[]

  #### Returns any

- - Defined in node_modules/@types/chai-spies/index.d.ts:156

  #### Type parameters

  - #### T

  #### Parameters

  - ##### name: string

  - ##### methods: T

  #### Returns T

- - Defined in node_modules/@types/chai-spies/index.d.ts:157

  #### Type parameters

  - #### T

  #### Parameters

  - ##### methods: T

  #### Returns T

### on

- on(object: Object, methodNames: string | string[], fn?: undefined | function): any

- - Defined in node_modules/@types/chai-spies/index.d.ts:141

  #### chai.spy.on (function)

  Wraps an object method into spy. All calls will pass through to the original function.

      var spy = chai.spy.on(Array, 'isArray');

  #### Parameters

  - ##### object: Object

  - ##### methodNames: string | string[]

  - ##### Optional fn: undefined | function

    replacement function

  #### Returns any

  function to actually call

### restore

- restore(object?: Object, methodNames?: string | string[]): void

- - Defined in node_modules/@types/chai-spies/index.d.ts:171

  #### chai.spy.restore (function)

  Restores spy assigned to DEFAULT sandbox

  Restores previously wrapped object's method. Restores all spied objects of a sandbox if called without parameters.

  #### Parameters

  - ##### Optional object: Object

  - ##### Optional methodNames: string | string[]

  #### Returns void

  Sandbox instance

### returns

- returns<T>(value: T): SpyFunc0Proxy<T>

- - Defined in node_modules/@types/chai-spies/index.d.ts:185

  #### chai.spy.returns (function)

  Creates a spy which returns static value.

           var method = chai.spy.returns(true);

  api

    public

  #### Type parameters

  - #### T

  #### Parameters

  - ##### value: T

    static value which is returned by spy

  #### Returns SpyFunc0Proxy<T>

  new spy function which returns static value

### sandbox

- sandbox(): Sandbox

- - Defined in node_modules/@types/chai-spies/index.d.ts:197

  ### chai.spy.sandbox

  Creates a sandbox.

  Sandbox is a set of spies. Sandbox allows to track methods on objects and restore original methods with on restore call.

  #### Returns Sandbox

Generated using TypeDoc