Gemtype
A native gem with a stable run-local id and colour.
Import it
import type { Gem } from "@johnmorrisdotca/houseki/magnetic-blocks";
Definition
interface Gem {
readonly id: number;
readonly colour: Colour;
}
Members
| Name | Type | Description |
|---|---|---|
id | number | |
colour | Colour |
Examples
import type { Gem } from "@johnmorrisdotca/houseki/magnetic-blocks";
const value: Gem = {id:1,colour:"red"};
console.log(value == null ? value : typeof value === "object" ? Object.keys(value).slice(0,6) : value);[ 'id', 'colour' ]What it prints (run when this page was built)