UNPKG

@ray-core/runtime

Version:

Ray 是一个全新的基于 React 的小程序开发框架

44 lines (43 loc) 1.21 kB
import AppContainer from './AppContainer'; import Container from './Container'; export declare function processProps(newProps: any, node: VNode): any; export interface RawNode { id: number; type: string; props?: any; nodes?: { [key: number]: RawNode; }; children?: Array<RawNode | number>; text?: string; } declare type VNodeOptions = { type: string; props?: any; container: Container | AppContainer; }; export default class VNode { id: number; container: Container | AppContainer; mounted: boolean; deleted: boolean; type: string; parent: VNode | null; props?: any; text?: string; callbackIds: Set<string>; children: VNode[]; constructor({ type, props, container }: VNodeOptions); appendChild(node: VNode): void; removeChild(node: VNode): void; insertBefore(node: VNode, referenceNode: VNode): void; setInnerHTML(html: string): void; update(payload?: any[]): void; get path(): string[]; isMounted(): boolean; isDeleted(): boolean; registerCallback(propKey: string, propValue: any): string; unregisteredCallbacks(): void; toJSON(skip2html?: boolean): RawNode; } export {};