egreact
Version:
A react render for egret 一个为 egret 而生的 react 渲染器
35 lines (34 loc) • 1.52 kB
TypeScript
import React from 'react';
import type { Instance, EventInfo } from '../type';
export declare function hyphenate(str: string): string;
export declare const isEvent: (key: string) => boolean;
export declare const isMountProp: (value: any) => value is "__PROP_MOUNT";
export declare const DevThrow: (e: string | Error, options?: {
from?: string;
link?: string;
toThrow?: boolean;
}) => void;
export declare function getActualInstance(instance: Instance<any>): any;
export declare function getCanvas(): HTMLCanvasElement;
export declare type EquConfig = {
arrays?: 'reference' | 'shallow';
objects?: 'reference' | 'shallow';
strict?: boolean;
};
export declare const is: {
obj: (a: any) => boolean;
fun: (a: any) => a is (...args: any) => any;
str: (a: any) => a is string;
num: (a: any) => a is number;
boo: (a: any) => a is boolean;
und: (a: any) => boolean;
arr: (a: any) => a is any[];
empty: (a: any) => a is void;
equ(a: any, b: any, { arrays, objects, strict }?: EquConfig): boolean;
};
export declare function findEgretAncestor(o: Instance<unknown>): Instance<egret.DisplayObject> | null;
export declare function reduceKeysToTarget(target: any, key: string, separator?: string): readonly [any, string, string[]];
export declare const DEFAULT_EVENT_CATEGORY: typeof egret.Event;
export declare function splitEventKeyToInfo(key: string): EventInfo;
export declare function collectContextsFromDom(dom: any): React.Context<any>[];
export * from '../outside';