Initializes the base WorkerFeature instance.
The worker to adapt with the feature.
The channel to the parent worker that created worker
.
Returns a value or a function that is a proxy for a method or property being accessed on the underlying worker.
The key being acccessed.
A value or a function that is a proxy for key
. Returns undefined
if no proxy can to satisfy key
.
Retrieves a worker feature for the current worker thread.
The target WorkerFeature.
The WorkerFeature instance for target
, or
undefined
if the current worker thread has not been decorated with the feature described by target
.
Generated using TypeDoc
Represents an extrinsic worker feature that can be used to extend the capabilities of workers.
Classes derived from WorkerFeature should be aware that their instances are transient, and created for each instance of the worker that is being decorated. As such, implementations are free to hold state specific to each worker instance if necessary.