diff --git a/packages/@dcl/playground-assets/etc/playground-assets.api.md b/packages/@dcl/playground-assets/etc/playground-assets.api.md index 09ab46b3a..5ac3fa686 100644 --- a/packages/@dcl/playground-assets/etc/playground-assets.api.md +++ b/packages/@dcl/playground-assets/etc/playground-assets.api.md @@ -365,7 +365,7 @@ export const enum CameraType { // Warning: (ae-missing-release-tag) "Children" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) -export type Children = ReactNode; +export type Children = ReactEcs.JSX.ReactNode; // @public (undocumented) export const enum ColliderLayer { @@ -1012,7 +1012,7 @@ export const enum EasingFunction { export interface EcsElements { // (undocumented) entity: Partial & { - children?: ReactNode; + children?: ReactEcs.JSX.ReactNode; key?: Key; }; } @@ -3474,7 +3474,7 @@ export namespace ReactEcs { export interface IntrinsicElements extends EcsElements { } // (undocumented) - export type ReactNode = ReactElement | string | number | boolean | null | undefined | ReactElement[]; + export type ReactNode = Element | ReactElement | string | number | boolean | null | undefined | ReactNode[]; } const // (undocumented) createElement: any; @@ -3497,9 +3497,6 @@ export interface ReactElement

, ...ComponentDefinition[]]> = { [K in keyof T]: T[K] extends ComponentDefinition ? ReturnType : never; diff --git a/packages/@dcl/react-ecs/src/components/types.ts b/packages/@dcl/react-ecs/src/components/types.ts index 275de2a38..9e36d568a 100644 --- a/packages/@dcl/react-ecs/src/components/types.ts +++ b/packages/@dcl/react-ecs/src/components/types.ts @@ -1,4 +1,4 @@ -import { ReactNode } from '../react-ecs' +import { ReactEcs } from '../react-ecs' import { Listeners } from './listeners/types' import { UiBackgroundProps } from './uiBackground/types' import { UiTransformProps } from './uiTransform/types' @@ -22,7 +22,7 @@ export interface EntityPropTypes extends Listeners { * @public */ export type Key = number | string -export type Children = ReactNode +export type Children = ReactEcs.JSX.ReactNode /** * unit value type. i.e. 'vw' || 'vh' diff --git a/packages/@dcl/react-ecs/src/react-ecs.ts b/packages/@dcl/react-ecs/src/react-ecs.ts index 28e26f5aa..c385491ff 100644 --- a/packages/@dcl/react-ecs/src/react-ecs.ts +++ b/packages/@dcl/react-ecs/src/react-ecs.ts @@ -7,7 +7,7 @@ import { Callback, Key } from './components' * @public */ export interface EcsElements { - entity: Partial & { children?: ReactNode; key?: Key } + entity: Partial & { children?: ReactEcs.JSX.ReactNode; key?: Key } } /** @@ -47,11 +47,6 @@ export interface ReactElement< props: P key: Key | null } - -/** - * @public - */ -export type ReactNode = ReactElement | string | number | boolean | null | undefined /** * @public */ @@ -60,7 +55,7 @@ export namespace ReactEcs { /** * @public */ - export type ReactNode = ReactElement | string | number | boolean | null | undefined | ReactElement[] + export type ReactNode = Element | ReactElement | string | number | boolean | null | undefined | ReactNode[] /** * @public */