(
item: Omit<Assignment, 'id'>,
)
| 6452 | let nextId = 100 |
| 6453 | |
| 6454 | const apiCreate = async ( |
| 6455 | item: Omit<Assignment, 'id'>, |
| 6456 | ): Promise<Assignment> => { |
| 6457 | await sleep(MUTATION_DELAY) |
| 6458 | const created = { ...item, id: nextId++ } |
| 6459 | serverItems.push(created) |
| 6460 | return created |
| 6461 | } |
| 6462 | |
| 6463 | const apiDelete = async (id: number): Promise<void> => { |
| 6464 | await sleep(MUTATION_DELAY) |