NativeScript / NativeScript/android-dts-generator
Classes don't expose static fields from interfaces
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Java
- Star
- 96
- Fork
- 25
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Hi,
I'm using the aforementioned experimental build option and it is quite handy.
What I noticed though is that if there is an inheritance then it is not possible to access the base class field from the derived class. Say, Android has the Telephony.Sms.Inbox.BODY where Inbox is
public static final class Inbox implements BaseColumns, TextBasedSmsColumns
and BODY is defined in the TextBasedSmsColumns. What ends up generated is:
export class Inbox extends java.lang.Object implements android.provider.BaseColumns, android.provider.Telephony.TextBasedSmsColumns {
public static CONTENT_URI: android.net.Uri;
public static DEFAULT_SORT_ORDER: string;
}
and basically an attempt to use in a native-like way android.provider.Telephony.Sms.Inbox.BODY fails, instead I need to do android.provider.Telephony.TextBasedSmsColumns.BODY.
Something you may want to check out and some point :)
Thank you!
P.S.: also keeping the original parameter names instead of paramX would have been nice, though I guess that's in the works too :)
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách lần theo tùy chọn build thử nghiệm tạo ra khai báo cho Telephony.Sms.Inbox của Android và các interface mà nó triển khai. So sánh khai báo Inbox được tạo với TextBasedSmsColumns.BODY và xác định các trường tĩnh được kế thừa nên xuất hiện như thế nào. Hoàn tất có nghĩa là Inbox.BODY khả dụng trong các khai báo TypeScript được tạo, với coverage cho ví dụ này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java, typescript
- Lĩnh vực
- tooling
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100