Constructs a new Worker with the provided worker callback and type.
worker
type
Worker(this.worker, this.type);