Clean up createTechDocsAddonExtension return type

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2022-04-25 15:10:00 +02:00
parent 736913517a
commit 075a9a067b
4 changed files with 9 additions and 5 deletions
+2 -2
View File
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import React, { ComponentType, useCallback } from 'react';
import React, { useCallback } from 'react';
import { useOutlet } from 'react-router-dom';
import {
@@ -53,7 +53,7 @@ const getDataKeyByName = (name: string) => {
*/
export function createTechDocsAddonExtension<TComponentProps>(
options: TechDocsAddonOptions<TComponentProps>,
): Extension<ComponentType<TComponentProps>> {
): Extension<(props: TComponentProps) => JSX.Element | null> {
const { name, component: TechDocsAddon } = options;
return createReactExtension({
name,