TS error: When I use position restyleFunctions

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

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
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
react-native, typescript
Lĩnh vực
mobile

Hướng nghiên cứu

Reproduce the reported composeRestyleFunctions snippet with @shopify/restyle 2.4.2, React Native 0.71.9, and TypeScript 4.8.4; the issue does not name a source file or test. Trace the type definitions used by spacing, layout, and position, and consider the work done when this example compiles without the reported TypeScript error.

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

Mô tả

bug

Current behavior

Hello, I got this error:
image

My code:

export type BaseIconProps = LayoutProps<Theme> & SpacingProps<Theme> & PositionProps<Theme>;
const restyleFunctions = composeRestyleFunctions<Theme, BaseIconProps>([spacing, layout, position]);

Expected behavior

No error:)

Platform:

  • iOS
  • Android

Environment

"react": "18.2.0",
"react-native": "0.71.9",
"@shopify/restyle": "^2.4.2",
"typescript": "~4.8.4"

Ngôn ngữ chính
TypeScript
Star
3.4k
Fork
154
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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 Shopify/restyle

Tất cả issue của Shopify/restyle

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.