Skip to content

TS definitions missing third parameter for the view function #332

@danielopitz

Description

@danielopitz

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

4.2.1

Plugin version

7.0.0

Node.js version

16.15.1

Operating system

Linux

Operating system version (i.e. 20.04, 11.3, 10)

Arch current

Description

TS complains about third parameter passed to the view function. This was added in #284 but the TS definitions were not updated.

I can provide a PR, but it would be great if someone with more TS knowledge could check it.

Steps to Reproduce

fastify.get("/", async function (request, reply) {
    return reply.view(
      "test.eta",
      {
        test: "eta"
      },
      { layout: "layouts/test-layout.eta" }
    );
  });

This should be OK while using TS, but it complains.

Expected Behavior

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions