override build()

in src/worker/api/MessageTypes.ts [184:219]


  override build<P = any>(): DaemonCommand<P> {
    const { _id, _source, _cancelable = false, _timestamp, _type, _payload, _metadata, _next } = this;
    return {
      get id() {
        return _id || `${_type}.${this.timestamp}`.toLowerCase();
      },

      get source() {
        return _source;
      },

      get cancelable() {
        return _cancelable;
      },

      get timestamp() {
        return _timestamp;
      },

      get type() {
        return _type as DaemonCommandType || DaemonCommandType.NO_OP;
      },

      get payload() {
        return _payload;
      },

      get metadata() {
        return _metadata;
      },

      get next() {
        return _next;
      }
    } as DaemonCommand<P>
  }