@dcl/react-ecs
Version:
Decentraland ECS
41 lines (40 loc) • 2.66 kB
TypeScript
import { EntityComponents } from '../react-ecs';
import { Changes, Container, HostContext, Instance, OpaqueHandle, Props, PublicInstance, SuspenseInstance, TextInstance, TimeoutHandle, Type } from './types';
export declare function propsChanged<K extends keyof EntityComponents>(component: K, prevProps: Partial<EntityComponents[K]>, nextProps: Partial<EntityComponents[K]>): Changes<K> | undefined;
export declare const componentKeys: (keyof EntityComponents)[];
export declare function isEqual<T = unknown>(val1: T, val2: T): boolean;
export declare const isNotUndefined: <T>(val: T | undefined) => val is T;
export declare const noopConfig: {
supportsMutation: boolean;
supportsPersistence: boolean;
noTimeout: number;
isPrimaryRenderer: boolean;
supportsHydration: boolean;
insertInContainerBefore(_container: Container, _child: Instance | TextInstance, _beforeChild: Instance | TextInstance | SuspenseInstance): void;
detachDeletedInstance(_node: Instance): void;
hideInstance(_instance: Instance): void;
hideTextInstance(_textInstance: TextInstance): void;
unhideInstance(_instance: Instance, _props: Props): void;
unhideTextInstance(_textInstance: TextInstance, _text: string): void;
clearContainer(_container: Container): void;
getCurrentEventPriority(): number;
getInstanceFromNode(_node: Instance): null | undefined;
beforeActiveInstanceBlur(): void;
afterActiveInstanceBlur(): void;
prepareScopeUpdate(): void;
getInstanceFromScope(): null;
commitMount(_instance: Instance, _type: Type, _props: Props, _internalInstanceHandle: OpaqueHandle): void;
resetTextContent(_instance: Instance): void;
commitTextUpdate(_textInstance: TextInstance, _oldText: string, _newText: string): void;
prepareForCommit(_containerInfo: Container): Record<string, any> | null;
resetAfterCommit(_containerInfo: Container): void;
preparePortalMount(_containerInfo: Container): void;
createTextInstance(_text: string, _rootContainer: Container, _hostContext: HostContext, _internalHandle: OpaqueHandle): TextInstance;
scheduleTimeout(_fn: any, _delay?: number): TimeoutHandle;
cancelTimeout(_id: TimeoutHandle): void;
shouldSetTextContent(_type: Type, _props: Props): boolean;
getRootHostContext(_rootContainer: Container): HostContext | null;
getChildHostContext(_parentHostContext: HostContext, _type: Type, _rootContainer: Container): HostContext;
getPublicInstance(instance: Instance): PublicInstance;
finalizeInitialChildren(_instance: Instance, _type: Type, _props: Props, _rootContainer: Container, _hostContext: HostContext): boolean;
};