From 4b6dfe6619678ebc9561b96f3ebd31ff5b1ac429 Mon Sep 17 00:00:00 2001 From: Pavel Klibani Date: Wed, 15 Jan 2025 17:37:00 +0100 Subject: [PATCH] fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Refactor(web-react): step further --- .../types/shared/NamedExoticComponent.d.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 packages/web-react/src/types/shared/NamedExoticComponent.d.ts diff --git a/packages/web-react/src/types/shared/NamedExoticComponent.d.ts b/packages/web-react/src/types/shared/NamedExoticComponent.d.ts new file mode 100644 index 0000000000..b62a6b6cfb --- /dev/null +++ b/packages/web-react/src/types/shared/NamedExoticComponent.d.ts @@ -0,0 +1,19 @@ +/* eslint-disable @typescript-eslint/ban-types */ + +import type { ExoticComponent, FC, StaticLifecycle } from 'react'; + +declare global { + namespace React { + interface NamedExoticComponent

extends ExoticComponent

{ + spiritComponent?: string; + } + + interface FunctionComponent

extends FC

{ + spiritComponent?: string; + } + + interface ComponentClass

extends StaticLifecycle { + spiritComponent?: string; + } + } +}