Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkpiano committed Nov 4, 2024
1 parent 002670f commit a2d8fb0
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/actions/assign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import type {
PropertyAssigner,
ProvidedActor,
ActionFunction,
SpecialActionResolution
BuiltinActionResolution
} from '../types.ts';

export interface AssignArgs<
Expand All @@ -40,7 +40,7 @@ function resolveAssign(
| Assigner<any, any, any, any, any>
| PropertyAssigner<any, any, any, any, any>;
}
): SpecialActionResolution {
): BuiltinActionResolution {
if (!snapshot.context) {
throw new Error(
'Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.'
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/actions/cancel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
MachineContext,
ActionArgs,
ParameterizedObject,
SpecialActionResolution
BuiltinActionResolution
} from '../types.ts';

type ResolvableSendId<
Expand All @@ -27,7 +27,7 @@ function resolveCancel(
actionArgs: ActionArgs<any, any, any>,
actionParams: ParameterizedObject['params'] | undefined,
{ sendId }: { sendId: ResolvableSendId<any, any, any, any> }
): SpecialActionResolution {
): BuiltinActionResolution {
const resolvedSendId =
typeof sendId === 'function' ? sendId(actionArgs, actionParams) : sendId;
return [snapshot, { sendId: resolvedSendId }, undefined];
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/actions/emit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
MachineContext,
ParameterizedObject,
SendExpr,
SpecialActionResolution
BuiltinActionResolution
} from '../types.ts';

function resolveEmit(
Expand All @@ -32,7 +32,7 @@ function resolveEmit(
EventObject
>;
}
): SpecialActionResolution {
): BuiltinActionResolution {
const resolvedEvent =
typeof eventOrExpr === 'function'
? eventOrExpr(args, actionParams)
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/actions/enqueueActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
MachineContext,
ParameterizedObject,
ProvidedActor,
SpecialActionResolution,
BuiltinActionResolution,
UnifiedArg
} from '../types.ts';
import { assign } from './assign.ts';
Expand Down Expand Up @@ -131,7 +131,7 @@ function resolveEnqueueActions(
EventObject
>;
}
): SpecialActionResolution {
): BuiltinActionResolution {
const actions: any[] = [];
const enqueue: Parameters<typeof collect>[0]['enqueue'] = function enqueue(
action
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/actions/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
LogExpr,
MachineContext,
ParameterizedObject,
SpecialActionResolution
BuiltinActionResolution
} from '../types.ts';

type ResolvableLogValue<
Expand All @@ -29,7 +29,7 @@ function resolveLog(
value: ResolvableLogValue<any, any, any, any>;
label: string | undefined;
}
): SpecialActionResolution {
): BuiltinActionResolution {
return [
snapshot,
{
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/actions/raise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
ParameterizedObject,
RaiseActionOptions,
SendExpr,
SpecialActionResolution
BuiltinActionResolution
} from '../types.ts';

function resolveRaise(
Expand Down Expand Up @@ -49,7 +49,7 @@ function resolveRaise(
| undefined;
},
{ internalQueue }: { internalQueue: AnyEventObject[] }
): SpecialActionResolution {
): BuiltinActionResolution {
const delaysMap = snapshot.machine.implementations.delays;

if (typeof eventOrExpr === 'string') {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/actions/send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
ParameterizedObject,
SendExpr,
SendToActionOptions,
SpecialActionResolution,
BuiltinActionResolution,
SpecialTargets,
UnifiedArg
} from '../types.ts';
Expand Down Expand Up @@ -65,7 +65,7 @@ function resolveSendTo(
| undefined;
},
extra: { deferredActorIds: string[] | undefined }
): SpecialActionResolution {
): BuiltinActionResolution {
const delaysMap = snapshot.machine.implementations.delays;

if (typeof eventOrExpr === 'string') {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/actions/spawnChild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
ParameterizedObject,
ProvidedActor,
RequiredActorOptions,
SpecialActionResolution,
BuiltinActionResolution,
UnifiedArg
} from '../types.ts';
import { resolveReferencedActor } from '../utils.ts';
Expand Down Expand Up @@ -48,7 +48,7 @@ function resolveSpawn(
input?: unknown;
syncSnapshot: boolean;
}
): SpecialActionResolution {
): BuiltinActionResolution {
const logic =
typeof src === 'string'
? resolveReferencedActor(snapshot.machine, src)
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/actions/stopChild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
EventObject,
MachineContext,
ParameterizedObject,
SpecialActionResolution
BuiltinActionResolution
} from '../types.ts';

type ResolvableActorRef<
Expand All @@ -31,7 +31,7 @@ function resolveStop(
args: ActionArgs<any, any, any>,
actionParams: ParameterizedObject['params'] | undefined,
{ actorRef }: { actorRef: ResolvableActorRef<any, any, any, any> }
): SpecialActionResolution {
): BuiltinActionResolution {
const actorRefOrString =
typeof actorRef === 'function' ? actorRef(args, actionParams) : actorRef;
const resolvedActorRef: AnyActorRef | undefined =
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2668,7 +2668,7 @@ export type ExecutableActionsFrom<T extends AnyActorLogic> =

export type ActionExecutor = (actionToExecute: ExecutableActionObject) => void;

export type SpecialActionResolution = [
export type BuiltinActionResolution = [
AnyMachineSnapshot,
NonReducibleUnknown, // params
UnknownAction[] | undefined
Expand Down

0 comments on commit a2d8fb0

Please sign in to comment.