Skip to content

Typescript - next/image HOC is returning type error on src #26735

Closed
@BrunoQuaresma

Description

@BrunoQuaresma

What version of Next.js are you using?

11.0.1

What version of Node.js are you using?

12

What browser are you using?

Chrome

What operating system are you using?

macOS

How are you deploying your application?

next

Describe the Bug

I have a HOC for the next/image component and the type was working good on nextjs 10 but now, after upgrading to 11, it is returning an error. Unfortunately I was not able to find a solution. Here is a sandbox:
https://codesandbox.io/s/cold-tdd-onubv?file=/src/image.tsx

Expected Behavior

Not having the type error.

To Reproduce

Here is a codesandbox link: https://codesandbox.io/s/cold-tdd-onubv?file=/src/image.tsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue was opened via the bug report template.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions