Skip to content

[BUG]: Type discrepencies vs actual code #969

Closed
@wolfy1339

Description

@wolfy1339

What happened?

While browsing through the code and really digging into the types, I noticed in many places some discrepancies.

The EventHandler#receive function can accept Error as well as EmitterWebhookEvent as seen in the code
In the getHooks() function, the eventName parameter should only accept event names (WebhookEventName), and not event names + actions (EmitterEventName)

In the type EmitterWebhookEventWithStringPayloadAndSignature, the name property should only accept event names (WebhookEventName), and not event names + actions (EmitterEventName)

Versions

@octokit/webhooks 12.1.0

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working as documented, or is being fixedreleasedreleased on @betatypescriptRelevant to TypeScript users only

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions