interface Group {
tag: string;
css: CssGroup[];
dom: DocumentFragment | HTMLElement | null;
children: AstGroup[];
attrs?: CssGroup[];
additionalCss: CssGroup[];
text?: string;
isRoot?: boolean;
isRow?: boolean;
}
const [currentObj, setCurrentObj] = useState<Group>();
我不要 currentObj 的初始值,会导致使用 currentObj 的属性时候( currentObj as Group ).attrs 有没有更好的写发吗,这样太恶心了