mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-02 06:29:40 +08:00
react: Improve types for "input" (#19240)
This commit is contained in:
2
types/react/index.d.ts
vendored
2
types/react/index.d.ts
vendored
@@ -188,7 +188,7 @@ declare namespace React {
|
||||
function createElement(
|
||||
type: "input",
|
||||
props?: InputHTMLAttributes<HTMLInputElement> & ClassAttributes<HTMLInputElement>,
|
||||
...children: ReactNode[]): DetailedReactHTMLElement<{}, HTMLInputElement>;
|
||||
...children: ReactNode[]): DetailedReactHTMLElement<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
||||
function createElement<P extends HTMLAttributes<T>, T extends HTMLElement>(
|
||||
type: keyof ReactHTML,
|
||||
props?: ClassAttributes<T> & P,
|
||||
|
||||
Reference in New Issue
Block a user