Emitter
import { Emitter } from "@hyper-fetch/sockets"
Description
Defined in emitter/emitter.ts:8
Parameters
Name | Details |
---|---|
socket
|
|
emitterOptions
|
|
json
|
|
dataMapper
|
|
Properties
emitterOptions
emitterOptions
Description
Defined in emitter/emitter.ts:16
Type
EmitterOptionsType<ExtractEmitterOptionsType<Adapter>>
Methods
clone()
clone()
Preview
clone<NewPayload, MapperData>(config, mapper)
Description
Defined in emitter/emitter.ts:46
Parameters
Name | Details |
---|---|
config
|
|
mapper
|
|
Return
Emitter<NewPayload, Response, Adapter, MapperData>
emit()
emit()
Preview
emit(options, ack)
Description
Defined in emitter/emitter.ts:62
Parameters
Name | Details |
---|---|
options
|
|
ack
|
|
Return
string
setData()
setData()
Preview
setData(data)
Description
Defined in emitter/emitter.ts:35
Parameters
Name | Details |
---|---|
data
|
|
Return
Emitter<Payload, Response, Adapter, MappedData>
setDataMapper()
setDataMapper()
Preview
setDataMapper<MapperData>(mapper)
Description
Defined in emitter/emitter.ts:42
Parameters
Name | Details |
---|---|
mapper
|
|
Return
Emitter<Payload, Response, Adapter, MapperData>