ttfiles
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Mock
Worker
constructor
onerror
onmessage
add
Event
Listener
dispatch
Event
post
Message
remove
Event
Listener
terminate
TestFS
on
Process
Exit
Hierarchy
MockWorker
Implements
Worker
Index
Constructors
constructor
Properties
onerror
onmessage
Methods
add
Event
Listener
dispatch
Event
post
Message
remove
Event
Listener
terminate
Constructors
constructor
new
Mock
Worker
(
url
:
string
)
:
MockWorker
Parameters
url:
string
Returns
MockWorker
Properties
onerror
onerror
:
function
|
null
= null
onmessage
onmessage
:
function
|
null
= null
Methods
add
Event
Listener
add
Event
Listener<K>
(
type
:
K
, listener
:
function
, options
:
boolean
|
AddEventListenerOptions
)
:
void
Type parameters
K
:
keyof WorkerEventMap
Parameters
type:
K
listener:
function
(
this
:
Worker
, ev
:
WorkerEventMap[K]
)
:
any
Parameters
this:
Worker
ev:
WorkerEventMap[K]
Returns
any
Optional
options:
boolean
|
AddEventListenerOptions
Returns
void
dispatch
Event
dispatch
Event
(
event
:
Event
)
:
boolean
Parameters
event:
Event
Returns
boolean
post
Message
post
Message
(
message
:
any
)
:
void
Parameters
message:
any
Returns
void
remove
Event
Listener
remove
Event
Listener<K>
(
type
:
K
, listener
:
function
, options
:
boolean
|
EventListenerOptions
)
:
void
Type parameters
K
:
keyof WorkerEventMap
Parameters
type:
K
listener:
function
(
this
:
Worker
, ev
:
WorkerEventMap[K]
)
:
any
Parameters
this:
Worker
ev:
WorkerEventMap[K]
Returns
any
Optional
options:
boolean
|
EventListenerOptions
Returns
void
terminate
terminate
(
)
:
void
Returns
void
Generated using
TypeDoc