From a90196ed102f07976f1a58574df1483653a4bcbd Mon Sep 17 00:00:00 2001 From: Marcel Wiessler Date: Tue, 26 Sep 2023 12:46:22 +0200 Subject: [PATCH] Fix NeedleEngine tsx --- src/NeedleEngine.tsx | 6 +++--- src/global.d.ts | 13 +++++-------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/NeedleEngine.tsx b/src/NeedleEngine.tsx index b795073..d0c4cc4 100644 --- a/src/NeedleEngine.tsx +++ b/src/NeedleEngine.tsx @@ -1,8 +1,8 @@ import "@needle-tools/engine"; import { NeedleEngineAttributes } from "@needle-tools/engine"; -import React, { useRef } from 'react' - -export function NeedleEngine(props: { children?: React.ReactNode } & NeedleEngineAttributes) { +import React, { ReactElement, useRef } from 'react' + +export function NeedleEngine(props: NeedleEngineAttributes | { children?: any }): ReactElement { return {props.children} ; diff --git a/src/global.d.ts b/src/global.d.ts index 48adbf8..81be022 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -1,8 +1,5 @@ - -declare global { - namespace JSX { - interface IntrinsicElements { - 'needle-engine': React.DetailedHTMLProps, HTMLElement>; - } - } - } \ No newline at end of file +declare namespace JSX { + interface IntrinsicElements { + "needle-engine": any; + } +}