TrainsAndRoads/interface/types/InternalNode.ts

13 lines
269 B
TypeScript

import { randomUUID } from "crypto";
import { InternalNodeType } from "../constants/InternalNodeType";
export class InternalNode {
id: string;
type: InternalNodeType;
constructor(type: InternalNodeType) {
this.id = randomUUID();
this.type = type;
}
}