forked from staylor/react-helmet-async
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
95 lines (79 loc) · 2.4 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
declare module 'react-helmet-async' {
import * as React from 'react';
interface OtherElementAttributes {
[key: string]: string | number | boolean | null | undefined;
}
type HtmlProps = JSX.IntrinsicElements['html'] & OtherElementAttributes;
type BodyProps = JSX.IntrinsicElements['body'] & OtherElementAttributes;
type LinkProps = JSX.IntrinsicElements['link'];
type MetaProps = JSX.IntrinsicElements['meta'];
export interface HelmetTags {
baseTag: Array<any>;
linkTags: Array<HTMLLinkElement>;
metaTags: Array<HTMLMetaElement>;
noscriptTags: Array<any>;
scriptTags: Array<HTMLScriptElement>;
styleTags: Array<HTMLStyleElement>;
}
export interface HelmetProps {
async?: boolean;
base?: any;
bodyAttributes?: BodyProps;
defaultTitle?: string;
defer?: boolean;
encodeSpecialCharacters?: boolean;
helmetData?: HelmetData;
htmlAttributes?: HtmlProps;
onChangeClientState?: (newState: any, addedTags: HelmetTags, removedTags: HelmetTags) => void;
link?: LinkProps[];
meta?: MetaProps[];
noscript?: Array<any>;
script?: Array<any>;
style?: Array<any>;
title?: string;
titleAttributes?: Object;
titleTemplate?: string;
prioritizeSeoTags?: boolean;
}
export class Helmet extends React.Component<React.PropsWithChildren<HelmetProps>> {}
export interface HelmetServerState {
base: HelmetDatum;
bodyAttributes: HelmetHTMLBodyDatum;
htmlAttributes: HelmetHTMLElementDatum;
link: HelmetDatum;
meta: HelmetDatum;
noscript: HelmetDatum;
script: HelmetDatum;
style: HelmetDatum;
title: HelmetDatum;
titleAttributes: HelmetDatum;
priority: HelmetDatum;
}
export interface HelmetDatum {
toString(): string;
toComponent(): React.Component<any>;
}
export interface HelmetHTMLBodyDatum {
toString(): string;
toComponent(): React.HTMLAttributes<HTMLBodyElement>;
}
export interface HelmetHTMLElementDatum {
toString(): string;
toComponent(): React.HTMLAttributes<HTMLHtmlElement>;
}
export interface FilledContext {
helmet: HelmetServerState;
}
interface ProviderProps {
context?: {};
}
export class HelmetData {
constructor(context: any);
context: {
helmet: HelmetServerState;
};
}
export class HelmetProvider extends React.Component<React.PropsWithChildren<ProviderProps>> {
static canUseDOM: boolean;
}
}