Skip to content

Commit d6fd56f

Browse files
committed
Update Article types
1 parent 70f2aff commit d6fd56f

File tree

2 files changed

+33
-8
lines changed

2 files changed

+33
-8
lines changed

src/Article.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1-
import React, { useEffect } from 'react'
1+
import React, { ReactFragment, useEffect } from 'react'
22
import useZendesk from './useZendesk'
33

4+
/**
5+
*
6+
* @param {Object} props
7+
* @param {string=} props.apiVersion
8+
* @param {(number | string)} props.articleId
9+
* @param {string=} props.domain
10+
* @param {ReactFragment=} props.loadingComponent
11+
* @param {string=} props.locale
12+
* @param {(error) => void=} props.onError
13+
* @param {(data) => void=} props.onLoad
14+
* @returns
15+
*/
416
const Article = ({
517
apiVersion,
618
articleId,

types/Article.d.ts

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
export default Article;
2+
/**
3+
*
4+
* @param {Object} props
5+
* @param {string=} props.apiVersion
6+
* @param {(number | string)} props.articleId
7+
* @param {string=} props.domain
8+
* @param {ReactFragment=} props.loadingComponent
9+
* @param {string=} props.locale
10+
* @param {(error) => void=} props.onError
11+
* @param {(data) => void=} props.onLoad
12+
* @returns
13+
*/
214
declare function Article({ apiVersion, articleId, domain, loadingComponent, locale, onError, onLoad, }: {
3-
apiVersion: any;
4-
articleId: any;
5-
domain: any;
6-
loadingComponent: any;
7-
locale: any;
8-
onError: any;
9-
onLoad: any;
15+
apiVersion?: string | undefined;
16+
articleId: (number | string);
17+
domain?: string | undefined;
18+
loadingComponent?: ReactFragment | undefined;
19+
locale?: string | undefined;
20+
onError?: (error: any) => void;
21+
onLoad?: (data: any) => void;
1022
}): JSX.Element;
23+
import { ReactFragment } from "react";

0 commit comments

Comments
 (0)