Skip to content

Add generic type to return of json #1256

@rtritto

Description

@rtritto

Describe the feature

Usage:

event.req.json<{ key: string }>()

The change should be:

- json: () => Promise<Body>
+ json: <T>() => Promise<T | Body>

Additional information

  • Would you be willing to help implement this feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions