mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-26 10:21:55 +00:00
17 lines
433 B
TypeScript
17 lines
433 B
TypeScript
import { PackagePropertiesV2, PackagePropertyObject } from "../types";
|
|
import { Properties } from "./Properties";
|
|
|
|
export class PropertyObject<X extends PackagePropertyObject> {
|
|
private constructor(readonly data: X) {}
|
|
static of<X extends Properties<PackagePropertiesV2>>(
|
|
description: string,
|
|
value: X
|
|
) {
|
|
return new PropertyObject({
|
|
type: "object",
|
|
description,
|
|
value: value.data,
|
|
});
|
|
}
|
|
}
|