Skip to content

Commit

Permalink
Updated eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
salmenus committed May 18, 2024
1 parent 8a97dca commit 21efd0f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion packages/js/core/src/exports/aiChat/comp/base.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {CallbackArgType, CallbackFunction} from '../../../../../../shared/src/types/callbackFunction';
import {NluxError, NluxUsageError} from '../../../../../../shared/src/types/error';
import {domOp} from '../../../../../../shared/src/utils/dom/domOp';
import {uid} from '../../../../../../shared/src/utils/uid';
Expand Down Expand Up @@ -361,7 +362,7 @@ export abstract class BaseComp<AiMsg, PropsType, ElementsType, EventsType, Actio
});
}

return domOp(() => action(...args));
return domOp(() => (action as CallbackFunction)(...args as CallbackArgType[]));
};

protected executeRenderer(root: HTMLElement | DocumentFragment) {
Expand Down
8 changes: 5 additions & 3 deletions packages/js/core/src/exports/aiContext/tasksService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
RunTaskResult,
} from '../../../../../shared/src/types/aiContext/contextResults';
import {ContextTask, ContextTasks} from '../../../../../shared/src/types/aiContext/data';
import {CallbackFunction} from '../../../../../shared/src/types/callbackFunction';
import {CallbackArgType, CallbackFunction} from '../../../../../shared/src/types/callbackFunction';
import {warn} from '../../../../../shared/src/utils/warn';

type UpdateQueueItem = {
Expand Down Expand Up @@ -241,7 +241,9 @@ export class TasksService {
}

try {
const result = callback(...(parameters ?? []));
const result = callback(
...(parameters ?? []) as CallbackArgType[],
);
return {
success: true,
result,
Expand Down Expand Up @@ -409,7 +411,7 @@ export class TasksService {
updateData.paramDescriptions = item.paramDescriptions;
}

acc[itemId] = updateData;
acc[itemId] = updateData as ContextTask;
}

return acc;
Expand Down

0 comments on commit 21efd0f

Please sign in to comment.