Skip to content

Class: MockConnectErrorCb ​

Implements ​

  • connect_error_cb

Constructors ​

Constructor ​

ts
new MockConnectErrorCb(object?: object, cb?: (this: object, code: number, description: string) => void): MockConnectErrorCb;

Parameters ​

ParameterType
objectobject
cb(this: object, code: number, description: string) => void

Returns ​

MockConnectErrorCb

Methods ​

create() ​

ts
static create(object?: object, cb?: (this: object, code: number, description: string) => void): MockConnectErrorCb;

Parameters ​

ParameterType
objectobject
cb(this: object, code: number, description: string) => void

Returns ​

MockConnectErrorCb


mock() ​

ts
static mock(object?: object, cb?: (this: object, code: number, description: string) => void): connect_error_cb;

Parameters ​

ParameterType
objectobject
cb(this: object, code: number, description: string) => void

Returns ​

connect_error_cb

Properties ​

bind ​

ts
bind: Mock<(object: object, cb: (this: object, code: number, description: string) => void) => void>;

Replace the bound callback.

Param ​

object

Lua object used as callback this.

Param ​

cb

Called with error code and status description.

Implementation of ​

ts
connect_error_cb.bind

cb ​

ts
cb: 
  | ((this: object, code: number, description: string) => void)
  | null;

clear ​

ts
clear: Mock<() => void>;

Clear the bound callback.

Remarks ​

After clearing, native connection errors have no Lua function to call.

Implementation of ​

ts
connect_error_cb.clear

object ​

ts
object: object | null;