Server.DelegateContext
A delegate context used in delegate builder in Config.
Allows to emit logs, notify about compilation events and broadcast events to connected clients.
• log: FastifyLoggerInstance
A logger instance, useful for emitting logs from the delegate.
▸ broadcastToHmrClients<E>(event, platform, clientIds?): void
Broadcast arbitrary event to all connected HMR clients for given platform.
| Name | Type | 
|---|---|
E | 
any | 
| Name | Type | Description | 
|---|---|---|
event | 
E | 
Arbitrary event to broadcast. | 
platform | 
string | 
Platform of the clients to which broadcast should be sent. | 
clientIds? | 
string[] | 
Ids of the client to which broadcast should be sent. If undefined the broadcast will be sent to all connected clients for the given platform. | 
void
▸ broadcastToMessageClients<E>(event): void
Broadcast arbitrary method-like event to all connected message clients.
| Name | Type | 
|---|---|
E | 
extends Object | 
| Name | Type | Description | 
|---|---|---|
event | 
E | 
Arbitrary method-like event to broadcast. | 
void
▸ notifyBuildEnd(platform): void
Send notification about compilation end for given platform.
| Name | Type | 
|---|---|
platform | 
string | 
void
▸ notifyBuildStart(platform): void
Send notification about compilation start for given platform.
| Name | Type | 
|---|---|
platform | 
string | 
void