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:
parent
e52f6ef479
commit
2da99a7bf8
5 changed files with 10 additions and 10 deletions
|
|
@ -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} />
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in a new issue