From acf65f92dc7ce459a25ac5a9bc668300e8cff28b Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 31 Aug 2021 15:03:08 -0400 Subject: [PATCH] Fix TS type conflict for `` tag (#28672) This type was added in PR #28269 but doesn't need to be public and was causing conflicts with `@types/react@17`. We currently use `@types/react@16` so ideally we should upgrade to `@types/react@17` and then remove the `ts-ignore`. Fixes #28647 --- packages/next/client/image.tsx | 1 + packages/next/types/index.d.ts | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/next/client/image.tsx b/packages/next/client/image.tsx index 74638933f446344..5174d5f3f5678c1 100644 --- a/packages/next/client/image.tsx +++ b/packages/next/client/image.tsx @@ -627,6 +627,7 @@ export default function Image({ data-nimg={layout} style={imgStyle} className={className} + // @ts-ignore - TODO: upgrade to `@types/react@17` loading={loading || 'lazy'} /> diff --git a/packages/next/types/index.d.ts b/packages/next/types/index.d.ts index b1bc5ea2e074451..4abaab83eb3cf9f 100644 --- a/packages/next/types/index.d.ts +++ b/packages/next/types/index.d.ts @@ -40,11 +40,6 @@ declare module 'react' { interface LinkHTMLAttributes extends HTMLAttributes { nonce?: string } - - // support - interface ImgHTMLAttributes extends HTMLAttributes { - loading?: 'auto' | 'eager' | 'lazy' - } } export type Redirect =