Unverified Commit acf65f92 authored by Steven's avatar Steven Committed by GitHub

Fix TS type conflict for `<img>` 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 
parent f6d8a112
...@@ -627,6 +627,7 @@ export default function Image({ ...@@ -627,6 +627,7 @@ export default function Image({
data-nimg={layout} data-nimg={layout}
style={imgStyle} style={imgStyle}
className={className} className={className}
// @ts-ignore - TODO: upgrade to `@types/react@17`
loading={loading || 'lazy'} loading={loading || 'lazy'}
/> />
</noscript> </noscript>
......
...@@ -40,11 +40,6 @@ declare module 'react' { ...@@ -40,11 +40,6 @@ declare module 'react' {
interface LinkHTMLAttributes<T> extends HTMLAttributes<T> { interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
nonce?: string nonce?: string
} }
// <img loading="lazy"> support
interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
loading?: 'auto' | 'eager' | 'lazy'
}
} }
export type Redirect = export type Redirect =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment