Unverified Commit 680564c7 authored by Sebastian Silbermann's avatar Sebastian Silbermann Committed by GitHub

Ensure latest React types for experimental release channel are used (#48641)

That way users just have to just bump `@types/react` and `typescript`
once TS 5.1. is out to get TS to no longer reject async components.
parent 8050a6c8
/// <reference types="node" /> /// <reference types="node" />
/// <reference types="react" /> /// <reference types="react" />
/// <reference types="react/experimental" />
/// <reference types="react-dom" /> /// <reference types="react-dom" />
import React from 'react' import React from 'react'
...@@ -42,19 +43,11 @@ declare module 'react' { ...@@ -42,19 +43,11 @@ declare module 'react' {
amp?: string amp?: string
} }
// <link nonce=""> support
interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
nonce?: string
}
// <img fetchPriority=""> support // <img fetchPriority=""> support
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- It's actually required for module augmentation to work. // eslint-disable-next-line @typescript-eslint/no-unused-vars -- It's actually required for module augmentation to work.
interface ImgHTMLAttributes<T> { interface ImgHTMLAttributes<T> {
fetchPriority?: 'high' | 'low' | 'auto' | undefined fetchPriority?: 'high' | 'low' | 'auto' | undefined
} }
function use<T>(promise: Promise<T> | React.Context<T>): T
function cache<T extends Function>(fn: T): T
} }
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