@venuecms/sdk-next
Version:
This is a work in progress and is heavily in flux until we launch 1.0 in February.
12 lines (9 loc) • 382 B
TypeScript
import { Page } from '@venuecms/sdk';
type PageWithParent = Page & {
parentId?: string;
};
type PageWithParentAndChildren = PageWithParent & {
children: PageWithParentAndChildren[];
};
declare const buildTree: (nodes: Array<PageWithParent>, parentId?: string) => Array<PageWithParentAndChildren>;
export { type PageWithParent, type PageWithParentAndChildren, buildTree };