A music player that connects to your cloud/distributed storage.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: type errors

+10 -8
+6 -4
src/components/output/raw/atproto/element.js
··· 300 300 if (!rpc) return; 301 301 try { 302 302 const result = await ok(rpc.get("com.atproto.repo.describeRepo", { 303 - params: { repo: did }, 303 + params: { repo: /** @type {import("@atcute/lexicons").ActorIdentifier} */ (did) }, 304 304 })); 305 305 if (this.#did.value === did) { 306 306 this.#handle.value = result.handle ?? null; ··· 458 458 459 459 try { 460 460 const records = []; 461 + /** @type {string | undefined} */ 461 462 let cursor; 462 463 do { 463 464 const page = await ok(this.#rpc.get("com.atproto.repo.listRecords", { 464 - params: { repo: did, collection, limit: 100, cursor }, 465 + params: { repo: /** @type {import("@atcute/lexicons").ActorIdentifier} */ (did), collection: /** @type {`${string}.${string}.${string}`} */ (collection), limit: 100, cursor }, 465 466 })); 466 467 records.push(...page.records.map((r) => /** @type {T} */ (r.value))); 467 468 cursor = page.cursor; ··· 585 586 /** @type {Map<string, { rkey: string, value: unknown }>} */ 586 587 const existing = new Map(); 587 588 589 + /** @type {string | undefined} */ 588 590 let cursor; 589 591 do { 590 592 const page = await ok(rpc.get("com.atproto.repo.listRecords", { 591 - params: { repo: did, collection, limit: 100, cursor }, 593 + params: { repo: did, collection: /** @type {`${string}.${string}.${string}`} */ (collection), limit: 100, cursor }, 592 594 })); 593 595 for (const { uri, value } of page.records) { 594 596 const record = /** @type {any} */ (value); 595 - const rkey = uri.split("/").at(-1); 597 + const rkey = /** @type {string} */ (uri.split("/").at(-1)); 596 598 existing.set(record.id, { rkey, value: record }); 597 599 } 598 600 cursor = page.cursor;
+1 -1
src/components/supplement/rocksky/element.js
··· 201 201 }; 202 202 203 203 if (tags.track?.no != null) record.trackNumber = tags.track.no; 204 - if (tags.disk?.no != null) record.discNumber = tags.disk.no; 204 + if (tags.disc?.no != null) record.discNumber = tags.disc.no; 205 205 206 206 record.createdAt = new Date(startedAt).toISOString(); 207 207
+1 -1
src/facets/connect/common.js
··· 16 16 * @param {Object} config 17 17 * @param {string} config.title - Card header title 18 18 * @param {TemplateResult | string} config.description - Content shown on the left side 19 - * @param {TemplateResult} [config.rightContent] - Extra content shown at the top of the right side 19 + * @param {TemplateResult | typeof nothing} [config.rightContent] - Extra content shown at the top of the right side 20 20 * @param {TemplateResult} config.formFields - Form body content (inputs, footnotes, etc.) 21 21 * @param {(mode: 'input' | 'output') => Promise<void>} config.onSubmit 22 22 * @param {boolean} [config.hasInput] - Whether to show the "Add audio input" button (default: true)
+2 -2
src/facets/data/playlists/index.inline.js
··· 152 152 */ 153 153 function showDetails(name, tracks, items) { 154 154 const seenIds = new Set(); 155 - const found = items 155 + const found = /** @type {Track[]} */ (items 156 156 .map((item) => tracks.find((t) => Playlist.match(t, item))) 157 157 .filter((t) => t != null && !seenIds.has(t.id) && seenIds.add(t.id)) 158 - .sort((a, b) => (a.tags?.title ?? "").localeCompare(b.tags?.title ?? "")); 158 + .sort((a, b) => (a?.tags?.title ?? "").localeCompare(b?.tags?.title ?? ""))); 159 159 160 160 const notFound = items 161 161 .filter((item) => !tracks.some((t) => Playlist.match(t, item)))