mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
react: Add "as" attribute to link elements (#20628)
* Add "as" attribute to links See corresponding addition here: https://github.com/facebook/react/pull/7582 * Add "as" attribute to link elements in React v16 definition * Turn commas into semicolons (React 15) * Turn commas into semicolons (React 16)
This commit is contained in:
committed by
John Reilly
parent
902a364510
commit
ed36d5538f
Vendored
+2
-1
@@ -33,7 +33,7 @@ And since any object is assignable to {}, we would lose the type safety of the P
|
||||
Therefore, the type of props is left as Q, which should work for most cases.
|
||||
If you need to call cloneElement with key or ref, you'll need a type cast:
|
||||
interface ButtonProps {
|
||||
label: string,
|
||||
label: string;
|
||||
isDisabled?: boolean;
|
||||
}
|
||||
var element: React.CElement<ButtonProps, Button>;
|
||||
@@ -2782,6 +2782,7 @@ declare namespace React {
|
||||
}
|
||||
|
||||
interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
|
||||
as?: string;
|
||||
href?: string;
|
||||
hrefLang?: string;
|
||||
integrity?: string;
|
||||
|
||||
Vendored
+2
-1
@@ -35,7 +35,7 @@ Therefore, the type of props is left as Q, which should work for most cases.
|
||||
If you need to call cloneElement with key or ref, you'll need a type cast:
|
||||
|
||||
interface ButtonProps {
|
||||
label: string,
|
||||
label: string;
|
||||
isDisabled?: boolean;
|
||||
}
|
||||
var element: React.CElement<ButtonProps, Button>;
|
||||
@@ -2720,6 +2720,7 @@ declare namespace React {
|
||||
}
|
||||
|
||||
interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
|
||||
as?: string;
|
||||
href?: string;
|
||||
hrefLang?: string;
|
||||
integrity?: string;
|
||||
|
||||
Reference in New Issue
Block a user