This repository has been archived on 2024-10-26. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
yarjs/src/lib/YarJs.interfaces.ts

26 lines
525 B
TypeScript

export type YarHTMLTagName = keyof React.JSX.IntrinsicElements | string;
export enum YarEffectTag {
Update,
Placement,
Deletion,
}
export type YarProps = {
children: YarElement[];
[key: string]: unknown;
};
export interface YarElement {
type: YarHTMLTagName;
props: YarProps;
}
export interface YarFiber extends YarElement {
parent: null | YarFiber;
dom: null | HTMLElement | Text;
child: null | YarFiber;
sibling: null | YarFiber;
alternate?: null | YarFiber;
effectTag: null | YarEffectTag;
}