repositories
/
poolifier.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
build(deps): bump fastify
[poolifier.git]
/
examples
/
typescript
/
websocket-server-pool
/
ws-cluster
/
src
/
types.ts
1
export enum
MessageType
{
2
echo
=
'echo'
,
3
factorial
=
'factorial'
4
}
5
6
export interface
MessagePayload
<
T
=
unknown
> {
7
type
:
MessageType
8
data
:
T
9
}
10
11
export interface
DataPayload
{
12
number
?:
number
13
}
14
15
export interface
WorkerData
{
16
port
:
number
17
}
18
19
export interface
WorkerResponse
{
20
status
:
boolean
21
port
?:
number
22
}