From 96b1267c016ab148bbd91d5310858528216ff0e9 Mon Sep 17 00:00:00 2001 From: Pavel Klibani Date: Thu, 30 Jan 2025 17:00:41 +0100 Subject: [PATCH] fixup! fixup! fixup! fixup! fixup! fixup! UNSAFE classname test --- packages/web-react/src/global.d.ts | 19 +++++++++++++++++++ .../src/types/shared/SpiritComponentType.d.ts | 19 ------------------- 2 files changed, 19 insertions(+), 19 deletions(-) delete mode 100644 packages/web-react/src/types/shared/SpiritComponentType.d.ts diff --git a/packages/web-react/src/global.d.ts b/packages/web-react/src/global.d.ts index c45dcd0e4e..442d69ce0d 100644 --- a/packages/web-react/src/global.d.ts +++ b/packages/web-react/src/global.d.ts @@ -1,3 +1,6 @@ +/* eslint-disable @typescript-eslint/ban-types */ +import type { ExoticComponent, FC, StaticLifecycle } from 'react'; + declare module '*.md' { const content: string; export default content; @@ -18,3 +21,19 @@ interface Window { declare module 'prettier' { export type BuiltInParserName = unknown; } + +declare global { + namespace React { + interface NamedExoticComponent

extends ExoticComponent

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

extends FC

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

extends StaticLifecycle { + spiritComponent?: string; + } + } +} diff --git a/packages/web-react/src/types/shared/SpiritComponentType.d.ts b/packages/web-react/src/types/shared/SpiritComponentType.d.ts deleted file mode 100644 index b62a6b6cfb..0000000000 --- a/packages/web-react/src/types/shared/SpiritComponentType.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* 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; - } - } -}