Skip to content

Commit

Permalink
Merge pull request #89 from Phuire-Research/UI
Browse files Browse the repository at this point in the history
UI
  • Loading branch information
REllEK-IO committed Oct 13, 2023
2 parents f473434 + 117e039 commit 609d06d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@phuire/strx",
"version": "0.0.31",
"version": "0.0.33",
"description": "Unified Turing Machine",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export {
createActionNode
} from './model/actionStrategy';
export type { Action, ActionType } from './model/action';
export { primeAction, createAction, getSemaphore, prepareActionCreator } from './model/action';
export { primeAction, createAction, getSemaphore, prepareActionCreator, prepareActionWithPayloadCreator } from './model/action';
export { createConcept, createQuality, defaultReducer, defaultMethodCreator } from './model/concept';
export type {
Concept,
Expand Down
12 changes: 6 additions & 6 deletions src/model/actionStrategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ export interface ActionNotes {
*/
export interface ActionStrategyParameters {
topic: string;
data?: unknown;
data?: Record<string, unknown>;
initialNode: ActionNode;
}
export interface ActionStrategy {
topic: string;
data?: unknown;
data?: Record<string, unknown>;
currentNode: ActionNode;
actionList: Array<string>;
puntedStrategy?: ActionStrategy[];
Expand Down Expand Up @@ -139,7 +139,7 @@ function createSentence(actionNode: ActionNode, actionNotes?: ActionNotes , deci
export function createStrategy(
params: ActionStrategyParameters,
): ActionStrategy {
const data: unknown = params.data;
const data: Record<string, unknown> | undefined = params.data;
const currentNode: ActionNode = params.initialNode;
currentNode.lastActionNode = {
// This logically determines that all ActionNodes will have a Action associated.
Expand All @@ -157,7 +157,7 @@ export function createStrategy(
};
}

export const strategyBegin = (strategy: ActionStrategy, data?: unknown): Action => {
export const strategyBegin = (strategy: ActionStrategy, data?: Record<string, unknown>): Action => {
strategy.currentNode.action = createAction(
strategy.currentNode.actionType,
strategy.currentNode.payload,
Expand All @@ -184,7 +184,7 @@ export const strategyBegin = (strategy: ActionStrategy, data?: unknown): Action
* If no failureNode is found, will return EndOfActionStrategy instead.
* @param data - OPTIONAL, if used will override the ActionStrategy's payload
*/
export const strategySuccess = (_strategy: ActionStrategy, data?: unknown) => {
export const strategySuccess = (_strategy: ActionStrategy, data?: Record<string, unknown>) => {
const strategy = {..._strategy};
let nextAction: Action;
const actionListEntry = createSentence(
Expand Down Expand Up @@ -323,7 +323,7 @@ export const strategyDecide = (
_strategy: ActionStrategy,
decideKey: string,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
data?: unknown,
data?: Record<string, unknown>,
) => {
const strategy = {..._strategy};
let nextAction: Action;
Expand Down

0 comments on commit 609d06d

Please sign in to comment.