fix: add type annotations for implicit any parameters

- database/weapons/+page.svelte: Add types to template functions (nameObj, rarity)
- database/summons/+page.svelte: Add types to template functions (nameObj, rarity)
- JobSkillSlot.svelte: Add type annotations to snippet parameters (locked, skill, skillIconUrl, slot)
- BasicInfoSection.svelte: Add types to map callbacks (r, p)
- DatabaseProvider.ts: Add type to normalizer callback parameter (item)

Fixes "Parameter 'X' implicitly has an 'any' type" errors (12 instances fixed).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Justin Edmund 2025-11-28 18:07:34 -08:00
parent e52f6ef479
commit 2da99a7bf8
5 changed files with 10 additions and 10 deletions

View file

@ -82,7 +82,7 @@
</div>
{/if}
{#snippet SlotBody({ locked })}
{#snippet SlotBody({ locked }: { locked: boolean })}
{#if isFilled}
{@render SkillContent({ skill: skill!, skillIconUrl, locked })}
{:else if !isUnavailable}
@ -92,7 +92,7 @@
{/if}
{/snippet}
{#snippet SkillContent({ skill, skillIconUrl, locked })}
{#snippet SkillContent({ skill, skillIconUrl, locked }: { skill: JobSkill; skillIconUrl: string; locked: boolean })}
<div class="skill-content">
{#if skillIconUrl}
<img src={skillIconUrl} alt={skill.name.en} class="skill-icon" loading="lazy" />
@ -110,7 +110,7 @@
</div>
{/snippet}
{#snippet EmptyState({ slot })}
{#snippet EmptyState({ slot }: { slot: number })}
<div class="empty-content">
<div class="placeholder-icon">
<Icon name="plus" size={16} />

View file

@ -30,7 +30,7 @@
<span class="label">Race</span>
<span class="value">
{itemData.race
.map((r) => getRaceLabel(r))
.map((r: any) => getRaceLabel(r))
.filter(Boolean)
.join(', ') || '—'}
</span>
@ -45,7 +45,7 @@
<span class="label">Proficiencies</span>
<span class="value">
{itemData.proficiency
.map((p) => getProficiencyLabel(p))
.map((p: any) => getProficiencyLabel(p))
.filter(Boolean)
.join(', ') || '—'}
</span>

View file

@ -27,7 +27,7 @@ export class DatabaseProvider extends RestDataProvider {
constructor(options: DatabaseProviderOptions) {
// Pass a dummy URL to parent since we'll override getData
super('dummy', (item) => {
super('dummy', (item: any) => {
// Normalize data if needed
if (item.name && typeof item.name === 'object') {
// Ensure name is accessible for display

View file

@ -22,7 +22,7 @@
header: 'Name',
flexgrow: 1,
sort: true,
template: (nameObj) => {
template: (nameObj: any) => {
// nameObj is the name property itself, not the full item
if (!nameObj) return '—'
if (typeof nameObj === 'string') return nameObj
@ -35,7 +35,7 @@
header: 'Rarity',
width: 80,
sort: true,
template: (rarity) => getRarityLabel(rarity)
template: (rarity: any) => getRarityLabel(rarity)
},
{
id: 'element',

View file

@ -23,7 +23,7 @@
header: 'Name',
flexgrow: 1,
sort: true,
template: (nameObj) => {
template: (nameObj: any) => {
// nameObj is the name property itself, not the full item
if (!nameObj) return '—'
if (typeof nameObj === 'string') return nameObj
@ -36,7 +36,7 @@
header: 'Rarity',
width: 80,
sort: true,
template: (rarity) => getRarityLabel(rarity)
template: (rarity: any) => getRarityLabel(rarity)
},
{
id: 'element',