mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
react-helmet: add link and meta prop types (#31802)
* Add missing semicolon * Add link and meta prop types
This commit is contained in:
committed by
Sheetal Nandi
parent
b081a5b7d0
commit
a0f4fe7299
Vendored
+6
-2
@@ -6,6 +6,10 @@
|
||||
|
||||
import * as React from "react";
|
||||
|
||||
type LinkProps = JSX.IntrinsicElements['link'];
|
||||
|
||||
type MetaProps = JSX.IntrinsicElements['meta'];
|
||||
|
||||
export interface HelmetProps {
|
||||
async?: boolean;
|
||||
base?: any;
|
||||
@@ -15,8 +19,8 @@ export interface HelmetProps {
|
||||
encodeSpecialCharacters?: boolean;
|
||||
htmlAttributes?: any;
|
||||
onChangeClientState?: (newState: any) => void;
|
||||
link?: Array<any>;
|
||||
meta?: Array<any>;
|
||||
link?: LinkProps[];
|
||||
meta?: MetaProps[];
|
||||
noscript?: Array<any>;
|
||||
script?: Array<any>;
|
||||
style?: Array<any>;
|
||||
|
||||
@@ -101,4 +101,9 @@ function HTML() {
|
||||
font-size: 12px;
|
||||
}
|
||||
`}</style>
|
||||
</Helmet>
|
||||
</Helmet>;
|
||||
|
||||
// $ExpectError
|
||||
<Helmet link={[ invalidProp: 'foo' ]} />;
|
||||
// $ExpectError
|
||||
<Helmet meta={[ invalidProp: 'foo' ]} />;
|
||||
|
||||
Reference in New Issue
Block a user