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

Đang mở
#92 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
frontend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
0
Fork
4
Merge trung bình
54 phút
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Yormee-103/PayLoop

Tất cả issue của Yormee-103/PayLoop

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.