Skip to content

Inconsistent payload type definition in pushEvent / pushEventTo #4221

@rhcarvalho

Description

@rhcarvalho

While working on #4220, I noticed that HookInterface.pushEvent (and ViewHook.pushEvent) defines the payload type to be any, while HookInterface.pushEventTo (and ViewHook.pushEventTo) says object.

The Elixir/server-side code expects an Elixir map (i.e. JS object):


I think I tripped up on this once trying to push a non-object payload, though on the surface it feels like any JSON-serializable value could do.

Tightening up the typespec from any to object could trigger downstream warnings/errors, so flagging the inconsistence here to decide whether we any->object, object->any or do nothing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions