First commit

Create basic render engine that only allows to add elements
This commit is contained in:
Alexander Navarro 2024-06-25 13:02:10 -04:00
parent 0d3eb3d40f
commit f411544fe9
Signed by untrusted user who does not match committer: anavarro
GPG key ID: 6426043E9FA3E3B5
14 changed files with 414 additions and 0 deletions

View file

@ -0,0 +1,18 @@
export type YarHTMLTagName = keyof React.JSX.IntrinsicElements | string;
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;
}