Emitter
import { Emitter } from "@hyper-fetch/sockets"
Description
Defined in emitter/emitter.ts:8
Parameters
Name | Details |
---|---|
socket
|
|
emitterOptions
|
|
dump
|
|
dataMapper
|
|
Properties
emitterOptions
emitterOptions
Description
Defined in emitter/emitter.ts:16
Type
EmitterOptionsType<ExtractEmitterOptionsType<ClientType>>
Methods
dataMapper()
dataMapper()
Description
Defined in emitter/emitter.ts:18
Return
(data: RequestDataType) => MappedData
clone()
clone()
Preview
clone<NewRequestDataType, MapperData>(config, mapper)
Description
Defined in emitter/emitter.ts:46
Parameters
Name | Details |
---|---|
config
|
|
mapper
|
|
Return
Emitter<NewRequestDataType, ResponseDataType, ClientType, MapperData>
emit()
emit()
Preview
emit(options, ack)
Description
Defined in emitter/emitter.ts:67
Parameters
Name | Details |
---|---|
options
|
|
ack
|
|
Return
string
setData()
setData()
Preview
setData(data)
Description
Defined in emitter/emitter.ts:35
Parameters
Name | Details |
---|---|
data
|
|
Return
any
setDataMapper()
setDataMapper()
Preview
setDataMapper<MapperData>(mapper)
Description
Defined in emitter/emitter.ts:42
Parameters
Name | Details |
---|---|
mapper
|
|
Return
Emitter<RequestDataType, ResponseDataType, ClientType, MapperData>