Files
start-sdk/lib/properties/PropertyPage.ts

19 lines
468 B
TypeScript

import { PackagePropertyPage } from "../types"
import { PropertyGroup } from "./PropertyGroup"
export class PropertyPage {
private constructor(readonly data: PackagePropertyPage) {}
static of(options: {
name: string
description: string | null
groups: PropertyGroup[]
}) {
return new PropertyPage({
type: "page",
name: options.name,
description: options.description,
value: options.groups.map((x) => x.data),
})
}
}