diff --git a/src/store/component.ts b/src/store/component.ts index fc1bf11..77408ec 100644 --- a/src/store/component.ts +++ b/src/store/component.ts @@ -1,11 +1,11 @@ import EventEmitter from "eventemitter3"; import nullthrows from "nullthrows"; import invariant from "tiny-invariant"; -import type { Opaque } from "type-fest"; +import type { Tagged } from "type-fest"; import type CCStore from "."; import type { CCIntrinsicComponentType } from "./intrinsics/types"; -export type CCComponentId = Opaque; +export type CCComponentId = Tagged; export type CCComponent = { readonly id: CCComponentId; diff --git a/src/store/componentPin.ts b/src/store/componentPin.ts index 2171493..a0f203a 100644 --- a/src/store/componentPin.ts +++ b/src/store/componentPin.ts @@ -1,7 +1,7 @@ import EventEmitter from "eventemitter3"; import nullthrows from "nullthrows"; import invariant from "tiny-invariant"; -import type { Opaque } from "type-fest"; +import type { Tagged } from "type-fest"; import type CCStore from "."; import type { CCComponentId } from "./component"; import { IntrinsicComponentDefinition } from "./intrinsics/base"; @@ -17,7 +17,7 @@ export type CCComponentPin = { name: string; }; -export type CCComponentPinId = Opaque; +export type CCComponentPinId = Tagged; export type CCComponentPinType = "input" | "output"; export const ccPinTypes: CCComponentPinType[] = ["input", "output"]; diff --git a/src/store/connection.ts b/src/store/connection.ts index 3290c49..7976f5e 100644 --- a/src/store/connection.ts +++ b/src/store/connection.ts @@ -1,13 +1,13 @@ import EventEmitter from "eventemitter3"; import nullthrows from "nullthrows"; -import type { Opaque } from "type-fest"; +import type { Tagged } from "type-fest"; import type CCStore from "."; import type { CCComponentId } from "./component"; import type { CCComponentPinId } from "./componentPin"; import type { CCNodeId } from "./node"; import type { CCNodePinId } from "./nodePin"; -export type CCConnectionId = Opaque; +export type CCConnectionId = Tagged; export type CCConnectionEndpoint = { readonly nodeId: CCNodeId; diff --git a/src/store/node.ts b/src/store/node.ts index 22efd1d..af67c7e 100644 --- a/src/store/node.ts +++ b/src/store/node.ts @@ -1,14 +1,14 @@ import EventEmitter from "eventemitter3"; import nullthrows from "nullthrows"; import invariant from "tiny-invariant"; -import type { Opaque } from "type-fest"; +import type { Tagged } from "type-fest"; import type { Vector2 } from "../common/vector2"; import type CCStore from "."; import type { CCComponentId } from "./component"; import { definitionByComponentId } from "./intrinsics/definitions"; import type { CCIntrinsicComponentSpec } from "./intrinsics/types"; -export type CCNodeId = Opaque; +export type CCNodeId = Tagged; export type CCNode< Spec extends CCIntrinsicComponentSpec = CCIntrinsicComponentSpec, diff --git a/src/store/nodePin.ts b/src/store/nodePin.ts index f37a7ce..0b00c77 100644 --- a/src/store/nodePin.ts +++ b/src/store/nodePin.ts @@ -1,13 +1,13 @@ import EventEmitter from "eventemitter3"; import nullthrows from "nullthrows"; import invariant from "tiny-invariant"; -import type { Opaque } from "type-fest"; +import type { Tagged } from "type-fest"; import type CCStore from "."; import type { CCComponentPinId, CCNodePinBitWidthStatus } from "./componentPin"; import { IntrinsicComponentDefinition } from "./intrinsics/base"; import type { CCNodeId } from "./node"; -export type CCNodePinId = Opaque; +export type CCNodePinId = Tagged; export type CCNodePin = { id: CCNodePinId;