···2020 if (event.message.id === this.id) {
2121 // NOTE: would be nice to do a runtime assertion here, but the mapping is currently
2222 // only defined as a type. Not hard to shift to a value, just lazy.
2323- resolve(event.message.response as OnceType<T>);
2323+ resolve(event.message as OnceType<T>);
2424 this.#socket.removeEventListener("message", handler);
2525 abort?.removeEventListener("abort", onabort);
2626 }
···4141 if (event.message.id === this.id) {
4242 // NOTE: would be nice to do a runtime assertion here, but the mapping is currently
4343 // only defined as a type. Not hard to shift to a value, just lazy.
4444- callback(event.message.response as StreamType<T>);
4444+ callback(event.message as StreamType<T>);
4545 }
4646 };
4747