есть const addTaskToPool = createEvent<TaskInPool>(); type TaskInPool = { taskId:…
- User
есть const addTaskToPool = createEvent(); type TaskInPool = { taskId: number; v: string; messageSuccess: string; messageFailure: string; createdAt: number; onSuccess: { eventsToTrigger?: Event[]; }; }; вне элемента добавляю addTaskToPool( { taskId: taskIdState as number, v: VN, messageSuccess:
Заблокирована ${usr}, messageFailure:Не удалось заблокировать ${usr}, createdAt: Date.now(), onSuccess: { eventsToTrigger: [{ updateDetailsEvent }] } } ); и const updateDetailsEvent= createEvent(); получаю ошибку No overload matches this call. Overload 1 of 2, '(payload: TaskInPool): TaskInPool', gave the following error. Object literal may only specify known properties, and 'updateDetailsEvent' does not exist in type 'Event'. Overload 2 of 2, '(this: "Error: Expected 1 argument, but got 0", payload?: TaskInPool | undefined): void', gave the following error. The 'this' context of type 'void' is not assignable to method's 'this' of type '"Error: Expected 1 argument, but got 0"'. Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.