(loader: () => Promise<T>)
| 408 | } |
| 409 | |
| 410 | async function withNotesLoading<T>(loader: () => Promise<T>): Promise<T> { |
| 411 | notesLoadingCounter.value += 1 |
| 412 | |
| 413 | try { |
| 414 | return await loader() |
| 415 | } |
| 416 | finally { |
| 417 | notesLoadingCounter.value = Math.max(0, notesLoadingCounter.value - 1) |
| 418 | } |
| 419 | } |
| 420 | |
| 421 | async function createNote(payload?: CreateNotePayload) { |
| 422 | try { |
no outgoing calls
no test coverage detected