Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/store/component.ts
Original file line number Diff line number Diff line change
@@ -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<string, "CCComponentId">;
export type CCComponentId = Tagged<string, "CCComponentId">;

export type CCComponent = {
readonly id: CCComponentId;
Expand Down
4 changes: 2 additions & 2 deletions src/store/componentPin.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -17,7 +17,7 @@ export type CCComponentPin = {
name: string;
};

export type CCComponentPinId = Opaque<string, "CCPinId">;
export type CCComponentPinId = Tagged<string, "CCPinId">;
export type CCComponentPinType = "input" | "output";
export const ccPinTypes: CCComponentPinType[] = ["input", "output"];

Expand Down
4 changes: 2 additions & 2 deletions src/store/connection.ts
Original file line number Diff line number Diff line change
@@ -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<string, "CCConnectionId">;
export type CCConnectionId = Tagged<string, "CCConnectionId">;

export type CCConnectionEndpoint = {
readonly nodeId: CCNodeId;
Expand Down
4 changes: 2 additions & 2 deletions src/store/node.ts
Original file line number Diff line number Diff line change
@@ -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<string, "CCNodeId">;
export type CCNodeId = Tagged<string, "CCNodeId">;

export type CCNode<
Spec extends CCIntrinsicComponentSpec = CCIntrinsicComponentSpec,
Expand Down
4 changes: 2 additions & 2 deletions src/store/nodePin.ts
Original file line number Diff line number Diff line change
@@ -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<string, "CCNodePinId">;
export type CCNodePinId = Tagged<string, "CCNodePinId">;

export type CCNodePin = {
id: CCNodePinId;
Expand Down
Loading