It looks like the Payload type used by PublishParameters.message attempts to ensure the value contains only valid JSON types, but using this type on inputs prevents users from utilizing the JSON serialization layer. Namely, classes/objects with custom JSON serialization via toJSON(): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#tojson_behavior
For example, instances of Date. Another example is that undefined is not allowed even though JSON serialization excludes those properties automatically.
I suggest using unknown instead of Payload.
The workaround is to use the any trapdoor which defeats the purpose of the typing entirely.