Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Enhance types generation

Đang mở
#3,542 1 bình luận 1 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ó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
nodejs, typescript

Hướng nghiên cứu

Bắt đầu với kiểu được生成 trong src/apis/calendar/v3.ts, ở khu vực quanh ví dụ Calendar API được liên kết, sau đó so sánh các trường tùy chọn của nó với tài liệu về tài nguyên Google Calendar và issue #3151. Công việc được xem là hoàn tất khi trình tạo kiểu tạo ra các trường bắt buộc ở những nơi tài liệu API xác định chúng là bắt buộc, mà không biến mọi trường thành tùy chọn một cách rộng rãi.

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

Mô tả

priority: p3 size: l type: feature request

Is your feature request related to a problem? Please describe.

Currently, all types are optional, or at least a lot of them. See: https://github.com/search?q=repo:googleapis/google-api-nodejs-client+%22%7C+null%22&type=code So, this leads to an awful development experience.

For example, see Google Calendar API:

https://github.com/googleapis/google-api-nodejs-client/blob/6e8c998cee93dbc79a6f306c2150414b933c22c9/src/apis/calendar/v3.ts#L720

But on the other hand, we can see in docs that some fields are optional and some are not.

https://developers.google.com/calendar/api/v3/reference/events#resource

image

Describe the solution you'd like
I would like to see real types with the minimum amount of optional fields.

Describe alternatives you've considered
Of course, we can check everything manually or disable TypeScript checking at all. But I believe it's not a good solution, as why do we need typings which do not work.
https://github.com/googleapis/google-api-nodejs-client/issues/3151

Ngôn ngữ chính
TypeScript
Star
12.3k
Fork
2k
Merge trung bình
1 ngày 19 giờ
Pull request đã merge (30 ngày)
21

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 googleapis/google-api-nodejs-client

Tất cả issue của googleapis/google-api-nodejs-client

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.