FloorScheduletype
A fixed, periodic or authored schedule selecting the floor for committed block placements.
Import it
import type { FloorSchedule } from "@johnmorrisdotca/houseki/magnetic-blocks";
Definition
type FloorSchedule = {
readonly kind: 'frequent';
} | {
readonly kind: 'occasional';
} | {
readonly kind: 'infrequent';
} | {
readonly kind: 'mid-level';
readonly placement: number;
} | {
readonly kind: 'fixed';
readonly floor: Floor;
} | {
readonly kind: 'authored';
readonly magneticPlacements: readonly number[];
readonly defaultFloor?: Floor;
};
Examples
import type { FloorSchedule } from "@johnmorrisdotca/houseki/magnetic-blocks";
const value: FloorSchedule = {kind:"fixed",floor:"calm"};
console.log(value == null ? value : typeof value === "object" ? Object.keys(value).slice(0,6) : value);[ 'kind', 'floor' ]What it prints (run when this page was built)