Evit packages documentation
    Preparing search index...

    Variable withPayloadConst

    withPayload: <T>() => T = ...

    Utility function to help infer payload types when defining events. Does nothing at runtime.

    Type declaration

      • <T>(): T
      • Type Parameters

        • T

        Returns T

    const event = defineEvent('user.updated', withPayload<{ id: string }>())