Type safety: remove the 22 `any` usages in `web/`

Aperta
#92 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

Start in web/lib/contract.ts, where contract decoding uses any, then search web/app, web/components and web/lib for : any and catch (e: any). Define a RawInvoice type from the decoded shape and add a small helper that turns an unknown error into a message. Done when no explicit any remains in web/, tsc and lint pass, and runtime behaviour is unchanged. The issue does not give the invoice field shape, so check the decoder before typing it.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

difficulty: intermediate help wanted refactor Stellar Wave web

Difficulty: Intermediate

Problem

There are 22 uses of any in web/app, web/components and web/lib (contract decoding and catch (e: any) blocks).

Why it matters

any hides bugs such as the earlier status-decoding mistake.

Scope of work

Define a typed RawInvoice for contract decoding, use catch (e: unknown) with a small helper to extract messages, and enable @typescript-eslint/no-explicit-any as a warning.

Acceptance criteria

  • No explicit any remains in web/.
  • tsc and lint pass.
  • Runtime behaviour unchanged.

Relevant files

  • web/lib/contract.ts, pages and components using catch (e: any)

Dependencies

Coordinate with other PRs touching these files.

Maintainer discussion needed?

No.

Lingua principale
TypeScript
Stelle
0
Fork
4
Merge medio
54m
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Yormee-103/PayLoop

Tutte le issue di Yormee-103/PayLoop

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.