INNER CODE UNIT · TypeScript

index

SurgeDM/Surge · extension/entrypoints/popup/store/index.ts:128

    const index = downloads.findIndex((download) => download.id === id);
    if (index < 0) return downloads;

    const next = [...downloads];
    next[index] = update(downloads[index]);
    return next;
  });
}

function createDownload(
  message: DownloadStartedMsg | DownloadQueuedMsg,
  status: DownloadStatus['status'],
  totalSize = 0,
): DownloadStatus {
  return {
    id: message.DownloadID,
    url: message.URL,
    filename: message.Filename,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…