From 3d5105e25f03963c2ff10ea2554db5e86bd7e745 Mon Sep 17 00:00:00 2001 From: forbesus Date: Thu, 2 Jun 2022 16:05:58 +0900 Subject: [PATCH] front: Explicit react children https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56210 --- front/src/components/App/ErrorBoundary.tsx | 2 +- front/src/components/common/InternalLink.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/front/src/components/App/ErrorBoundary.tsx b/front/src/components/App/ErrorBoundary.tsx index f0740c1..f65f509 100644 --- a/front/src/components/App/ErrorBoundary.tsx +++ b/front/src/components/App/ErrorBoundary.tsx @@ -3,7 +3,7 @@ import * as React from "react" import { ModalWithoutClose } from "~/components/common/ModalWithoutClose" import { ModalWithReload } from "../common/ModalWithReload" -export class ErrorBoundary extends React.Component { +export class ErrorBoundary extends React.Component<{ children: React.ReactNode }> { state = { hasError: false } static getDerivedStateFromError(_error: Error) { diff --git a/front/src/components/common/InternalLink.tsx b/front/src/components/common/InternalLink.tsx index b94b82e..74e47b8 100644 --- a/front/src/components/common/InternalLink.tsx +++ b/front/src/components/common/InternalLink.tsx @@ -12,6 +12,7 @@ export class InternalLink extends React.Component<{ to: RouteId | RouteIdWithParamsObj className?: string innerHTML?: string + children?: React.ReactNode }> { aRef = React.createRef()