Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract state keys #456

Merged
merged 3 commits into from
Jan 26, 2024
Merged
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
147 changes: 80 additions & 67 deletions new-packages/ts-project/__tests__/actions.test.ts
Original file line number Diff line number Diff line change
@@ -57,6 +57,7 @@ test('should extract a string entry action (direct)', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -130,6 +131,7 @@ test('should extract a string exit action (direct)', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -203,6 +205,7 @@ test('should extract a string action (in array)', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -292,6 +295,7 @@ test('should extract multiple string actions', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -367,6 +371,7 @@ test('should extract a simple parameterized action (direct)', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -444,6 +449,7 @@ test('should extract a simple parameterized action (in array)', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -517,6 +523,7 @@ test('should extract an inline action (function)', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -592,6 +599,7 @@ test('should extract an inline action (builtin)', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -646,6 +654,7 @@ test('should error when extracting undefined action (direct)', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -704,6 +713,7 @@ test('should error when extracting undefined action (in array)', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -803,6 +813,7 @@ test('should extract a transition action', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -877,6 +888,7 @@ test('should not register multiple entry actions with duplicated entry property'
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -914,78 +926,79 @@ test('should not register multiple transition actions with duplicated actions pr
const project = await createTestProject(tmpPath);
expect(replaceUniqueIds(project.extractMachines('index.ts')))
.toMatchInlineSnapshot(`
[
[
{
"blocks": {
"block-0": {
"blockType": "action",
"parentId": "edge-0",
"properties": {
"params": {},
"type": "callAnders",
},
"sourceId": "callAnders",
"uniqueId": "block-0",
[
{
"blocks": {
"block-0": {
"blockType": "action",
"parentId": "edge-0",
"properties": {
"params": {},
"type": "callAnders",
},
"sourceId": "callAnders",
"uniqueId": "block-0",
},
},
},
"data": {
"context": {},
},
"edges": {
"edge-0": {
"data": {
"actions": [
"block-0",
],
"description": undefined,
"eventTypeData": {
"eventType": "EVENT",
"type": "named",
},
"guard": undefined,
"internal": true,
"metaEntries": [],
},
"source": "state-0",
"targets": [],
"type": "edge",
"uniqueId": "edge-0",
"data": {
"context": {},
},
},
"implementations": {
"actions": {
"callAnders": {
"id": "callAnders",
"name": "callAnders",
"type": "action",
"edges": {
"edge-0": {
"data": {
"actions": [
"block-0",
],
"description": undefined,
"eventTypeData": {
"eventType": "EVENT",
"type": "named",
},
"guard": undefined,
"internal": true,
"metaEntries": [],
},
"source": "state-0",
"targets": [],
"type": "edge",
"uniqueId": "edge-0",
},
},
"actors": {},
"guards": {},
},
"nodes": {
"state-0": {
"data": {
"description": undefined,
"entry": [],
"exit": [],
"history": undefined,
"initial": undefined,
"invoke": [],
"metaEntries": [],
"tags": [],
"type": "normal",
},
"parentId": undefined,
"type": "node",
"uniqueId": "state-0",
"implementations": {
"actions": {
"callAnders": {
"id": "callAnders",
"name": "callAnders",
"type": "action",
},
},
"actors": {},
"guards": {},
},
"nodes": {
"state-0": {
"data": {
"description": undefined,
"entry": [],
"exit": [],
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
},
"parentId": undefined,
"type": "node",
"uniqueId": "state-0",
},
},
"root": "state-0",
},
"root": "state-0",
},
[],
],
]
`);
[],
],
]
`);
});
252 changes: 134 additions & 118 deletions new-packages/ts-project/__tests__/actors.test.ts
Original file line number Diff line number Diff line change
@@ -59,6 +59,7 @@ test('should extract an actor with string src (direct)', async () => {
"invoke": [
"block-0",
],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -157,6 +158,7 @@ test('should extract multiple actors with different string sources (direct)', as
"history": undefined,
"initial": "foo",
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -175,6 +177,7 @@ test('should extract multiple actors with different string sources (direct)', as
"invoke": [
"block-0",
],
"key": "foo",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -193,6 +196,7 @@ test('should extract multiple actors with different string sources (direct)', as
"invoke": [
"block-1",
],
"key": "bar",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -286,6 +290,7 @@ test('should extract multiple actors with the same string source (direct)', asyn
"history": undefined,
"initial": "foo",
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -304,6 +309,7 @@ test('should extract multiple actors with the same string source (direct)', asyn
"invoke": [
"block-0",
],
"key": "foo",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -322,6 +328,7 @@ test('should extract multiple actors with the same string source (direct)', asyn
"invoke": [
"block-1",
],
"key": "bar",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -420,6 +427,7 @@ test('should extract multiple actors with string source (array)', async () => {
"history": undefined,
"initial": "foo",
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -439,6 +447,7 @@ test('should extract multiple actors with string source (array)', async () => {
"block-0",
"block-1",
],
"key": "foo",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -537,6 +546,7 @@ test('should extract actor with inline source (direct)', async () => {
"history": undefined,
"initial": "foo",
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -555,6 +565,7 @@ test('should extract actor with inline source (direct)', async () => {
"invoke": [
"block-0",
],
"key": "foo",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -573,6 +584,7 @@ test('should extract actor with inline source (direct)', async () => {
"invoke": [
"block-1",
],
"key": "bar",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -610,63 +622,65 @@ test('should raise error if actor is missing src property', async () => {
const project = await createTestProject(tmpPath);
expect(replaceUniqueIds(project.extractMachines('index.ts')))
.toMatchInlineSnapshot(`
[
[
{
"blocks": {},
"data": {
"context": {},
},
"edges": {},
"implementations": {
"actions": {},
"actors": {},
"guards": {},
},
"nodes": {
"state-0": {
"data": {
"description": undefined,
"entry": [],
"exit": [],
"history": undefined,
"initial": "foo",
"invoke": [],
"metaEntries": [],
"tags": [],
"type": "normal",
},
"parentId": undefined,
"type": "node",
"uniqueId": "state-0",
},
"state-1": {
"data": {
"description": undefined,
"entry": [],
"exit": [],
"history": undefined,
"initial": undefined,
"invoke": [],
"metaEntries": [],
"tags": [],
"type": "normal",
},
"parentId": "state-0",
"type": "node",
"uniqueId": "state-1",
},
},
"root": "state-0",
},
[
{
"type": "state_property_unhandled",
"blocks": {},
"data": {
"context": {},
},
"edges": {},
"implementations": {
"actions": {},
"actors": {},
"guards": {},
},
"nodes": {
"state-0": {
"data": {
"description": undefined,
"entry": [],
"exit": [],
"history": undefined,
"initial": "foo",
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
},
"parentId": undefined,
"type": "node",
"uniqueId": "state-0",
},
"state-1": {
"data": {
"description": undefined,
"entry": [],
"exit": [],
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "foo",
"metaEntries": [],
"tags": [],
"type": "normal",
},
"parentId": "state-0",
"type": "node",
"uniqueId": "state-1",
},
},
"root": "state-0",
},
[
{
"type": "state_property_unhandled",
},
],
],
],
]
`);
]
`);
});

test('should extract actor id if it is present with a string value', async () => {
@@ -692,76 +706,78 @@ test('should extract actor id if it is present with a string value', async () =>
const project = await createTestProject(tmpPath);
expect(replaceUniqueIds(project.extractMachines('index.ts')))
.toMatchInlineSnapshot(`
[
[
{
"blocks": {
"block-0": {
"blockType": "actor",
"parentId": "state-1",
"properties": {
"id": "user-provided-id",
"src": "actor1",
},
"sourceId": "actor1",
"uniqueId": "block-0",
[
{
"blocks": {
"block-0": {
"blockType": "actor",
"parentId": "state-1",
"properties": {
"id": "user-provided-id",
"src": "actor1",
},
"sourceId": "actor1",
"uniqueId": "block-0",
},
},
},
"data": {
"context": {},
},
"edges": {},
"implementations": {
"actions": {},
"actors": {
"actor1": {
"id": "actor1",
"name": "actor1",
"type": "actor",
"data": {
"context": {},
},
"edges": {},
"implementations": {
"actions": {},
"actors": {
"actor1": {
"id": "actor1",
"name": "actor1",
"type": "actor",
},
},
"guards": {},
},
"guards": {},
},
"nodes": {
"state-0": {
"data": {
"description": undefined,
"entry": [],
"exit": [],
"history": undefined,
"initial": "foo",
"invoke": [],
"metaEntries": [],
"tags": [],
"type": "normal",
},
"parentId": undefined,
"type": "node",
"uniqueId": "state-0",
},
"state-1": {
"data": {
"description": undefined,
"entry": [],
"exit": [],
"history": undefined,
"initial": undefined,
"invoke": [
"block-0",
],
"metaEntries": [],
"tags": [],
"type": "normal",
},
"parentId": "state-0",
"type": "node",
"uniqueId": "state-1",
"nodes": {
"state-0": {
"data": {
"description": undefined,
"entry": [],
"exit": [],
"history": undefined,
"initial": "foo",
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
},
"parentId": undefined,
"type": "node",
"uniqueId": "state-0",
},
"state-1": {
"data": {
"description": undefined,
"entry": [],
"exit": [],
"history": undefined,
"initial": undefined,
"invoke": [
"block-0",
],
"key": "foo",
"metaEntries": [],
"tags": [],
"type": "normal",
},
"parentId": "state-0",
"type": "node",
"uniqueId": "state-1",
},
},
"root": "state-0",
},
"root": "state-0",
},
[],
],
]
`);
[],
],
]
`);
});
6 changes: 6 additions & 0 deletions new-packages/ts-project/__tests__/createMachine.test.ts
Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@ test('should extract a machine with empty config', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -90,6 +91,7 @@ test('should extract a machine created with no config at all', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -149,6 +151,7 @@ test('should extract multiple machines in a single file', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "machine1",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -183,6 +186,7 @@ test('should extract multiple machines in a single file', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "machine2",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -240,6 +244,7 @@ test('should extract a machine created with `setup`', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -256,6 +261,7 @@ test('should extract a machine created with `setup`', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "foo",
"metaEntries": [],
"tags": [],
"type": "normal",
31 changes: 31 additions & 0 deletions new-packages/ts-project/__tests__/guards.test.ts
Original file line number Diff line number Diff line change
@@ -86,6 +86,7 @@ test('should extract guard from transition (string)', async () => {
"history": undefined,
"initial": "foo",
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -102,6 +103,7 @@ test('should extract guard from transition (string)', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "foo",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -118,6 +120,7 @@ test('should extract guard from transition (string)', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "bar",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -220,6 +223,7 @@ test('should extract guard (inline)', async () => {
"history": undefined,
"initial": "foo",
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -236,6 +240,7 @@ test('should extract guard (inline)', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "foo",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -252,6 +257,7 @@ test('should extract guard (inline)', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "bar",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -356,6 +362,7 @@ test('should extract parameterized guards', async () => {
"history": undefined,
"initial": "foo",
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -372,6 +379,7 @@ test('should extract parameterized guards', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "foo",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -388,6 +396,7 @@ test('should extract parameterized guards', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "bar",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -490,6 +499,7 @@ test('should extract higher order guards as inline', async () => {
"history": undefined,
"initial": "foo",
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -506,6 +516,7 @@ test('should extract higher order guards as inline', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "foo",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -522,6 +533,7 @@ test('should extract higher order guards as inline', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "bar",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -707,6 +719,7 @@ test('should extract multiple guards', async () => {
"history": undefined,
"initial": "foo",
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -723,6 +736,7 @@ test('should extract multiple guards', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "foo",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -739,6 +753,7 @@ test('should extract multiple guards', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "bar",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -755,6 +770,7 @@ test('should extract multiple guards', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "baz",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -857,6 +873,7 @@ test('should support XState v4 guard', async () => {
"history": undefined,
"initial": "foo",
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -873,6 +890,7 @@ test('should support XState v4 guard', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "foo",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -889,6 +907,7 @@ test('should support XState v4 guard', async () => {
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "bar",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -992,6 +1011,7 @@ test('should raise error if both guard and cond are provided, pick guard over co
"history": undefined,
"initial": "foo",
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -1008,6 +1028,7 @@ test('should raise error if both guard and cond are provided, pick guard over co
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "foo",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -1024,6 +1045,7 @@ test('should raise error if both guard and cond are provided, pick guard over co
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "bar",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -1131,6 +1153,7 @@ test('should raise error if both guard and cond are provided, pick guard over co
"history": undefined,
"initial": "foo",
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -1147,6 +1170,7 @@ test('should raise error if both guard and cond are provided, pick guard over co
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "foo",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -1163,6 +1187,7 @@ test('should raise error if both guard and cond are provided, pick guard over co
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "bar",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -1252,6 +1277,7 @@ test('should raise error for parameterized guard is missing type property', asyn
"history": undefined,
"initial": "foo",
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -1268,6 +1294,7 @@ test('should raise error for parameterized guard is missing type property', asyn
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "foo",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -1284,6 +1311,7 @@ test('should raise error for parameterized guard is missing type property', asyn
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "bar",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -1375,6 +1403,7 @@ test('should raise error for parameterized guard with invalid type property', as
"history": undefined,
"initial": "foo",
"invoke": [],
"key": "(machine)",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -1391,6 +1420,7 @@ test('should raise error for parameterized guard with invalid type property', as
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "foo",
"metaEntries": [],
"tags": [],
"type": "normal",
@@ -1407,6 +1437,7 @@ test('should raise error for parameterized guard with invalid type property', as
"history": undefined,
"initial": undefined,
"invoke": [],
"key": "bar",
"metaEntries": [],
"tags": [],
"type": "normal",
524 changes: 351 additions & 173 deletions new-packages/ts-project/__tests__/state.test.ts

Large diffs are not rendered by default.

705 changes: 433 additions & 272 deletions new-packages/ts-project/__tests__/transitions.test.ts

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion new-packages/ts-project/src/index.ts
Original file line number Diff line number Diff line change
@@ -110,7 +110,10 @@ function extractMachineConfig(
createMachineCall: CallExpression,
): readonly [ExtractorDigraphDef | undefined, ExtractionError[]] {
const rootState = createMachineCall.arguments[0];
const rootNode = extractState(ctx, ts, rootState, undefined);
const rootNode = extractState(ctx, ts, rootState, {
parentId: undefined,
key: '(machine)', // acts as a default that might be overriden by `rootState.id`
});

if (!rootNode) {
return [undefined, ctx.errors];
25 changes: 14 additions & 11 deletions new-packages/ts-project/src/state.ts
Original file line number Diff line number Diff line change
@@ -473,13 +473,14 @@ export function extractState(
ctx: ExtractionContext,
ts: typeof import('typescript'),
state: Expression | undefined,
parentId: string | undefined,
{ parentId, key }: { parentId: string | undefined; key: string },
): TreeNode | undefined {
const node: Node = {
type: 'node',
uniqueId: uniqueId(),
parentId,
data: {
key,
initial: undefined,
type: 'normal',
history: undefined,
@@ -515,11 +516,15 @@ export function extractState(
return treeNode;
}

forEachStaticProperty(ctx, ts, state, (prop, key) => {
switch (key) {
forEachStaticProperty(ctx, ts, state, (prop, propKey) => {
switch (propKey) {
case 'id': {
if (ts.isStringLiteralLike(prop.initializer)) {
ctx.idMap[prop.initializer.text] = node.uniqueId;

if (!node.parentId) {
node.data.key = prop.initializer.text;
}
return;
}
return;
@@ -610,12 +615,10 @@ export function extractState(
if (ts.isPropertyAssignment(state)) {
const childKey = getPropertyKey(ctx, ts, state);
if (childKey) {
const childTreeNode = extractState(
ctx,
ts,
state.initializer,
node.uniqueId,
);
const childTreeNode = extractState(ctx, ts, state.initializer, {
parentId: node.uniqueId,
key: childKey,
});
if (!childTreeNode) {
continue;
}
@@ -724,7 +727,7 @@ export function extractState(
return;
}

registerActionBlocks(ctx, blocks, node.data[key]);
registerActionBlocks(ctx, blocks, node.data[propKey]);
return;
}
case 'invoke': {
@@ -813,7 +816,7 @@ export function extractState(
}

for (const block of blocks) {
node.data[key].push(block.uniqueId);
node.data[propKey].push(block.uniqueId);
ctx.digraph.blocks[block.uniqueId] = block;
ctx.digraph.implementations.actors[block.sourceId] ??= {
type: 'actor',
2 changes: 1 addition & 1 deletion new-packages/ts-project/src/types.ts
Original file line number Diff line number Diff line change
@@ -119,7 +119,7 @@ export type Node = {
uniqueId: string;
parentId: string | undefined;
data: {
// key: string;
key: string;
type: 'normal' | 'parallel' | 'final' | 'history';
history: 'shallow' | 'deep' | undefined;
metaEntries: ExtractorMetaEntry[];