aws-cloudformation / aws-cloudformation/cloudformation-cli-typescript-plugin

bug: @ts-ignore causing issues when libchecking providers

Đang mở
#132 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
46
Fork
18
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

i am unable to do libChecking on my providers as [this](https://github.com/aws-cloudformation/cloudformation-cli-typescript-plugin/commit/e656c332f3233a9c0ee82b4c84952baf9d75f100) commit adds `@ts-ignore` directives to the `interface Integer` [here](https://github.com/aws-cloudformation/cloudformation-cli-typescript-plugin/blob/c6741811d918954b2bead0aa844400d236537581/src/interface.ts#L69-L82).

for this is problematic as it causes the following issue when building my resources (below).
i think the suggestion in the commit message is that resources should disable "lib checking". I dont see this as a great solution as it applies to all libraries. As i use aws-sdkv3 in my resources (and additional components i build using smithy), i have more than once caught issues due to incompatibilities between transient dependencies.

reviewing the code i am also not able to understand _why_ the code was added to the interface. browsing through the issues and commit messages doesn't seem to provide answers to this question either.

any recommended path forward is greatly appreciated.
@kddejong, @ericzbeard

```
node_modules/@amazon-web-services-cloudformation/cloudformation-cli-typescript-lib/dist/interface.d.ts:30:11 - error TS2430: Interface 'Integer' incorrectly extends interface 'BigInt'.
Types of property '[Symbol.toStringTag]' are incompatible.
Type '"Integer"' is not assignable to type '"BigInt"'.

30 interface Integer extends BigInt {
~~~~~~~

node_modules/@amazon-web-services-cloudformation/cloudformation-cli-typescript-lib/dist/interface.d.ts:35:11 - error TS2430: Interface 'IntegerConstructor' incorrectly extends interface 'BigIntConstructor'.
Types of property 'prototype' are incompatible.
Type 'Integer' is not assignable to type 'BigInt'.

35 interface IntegerConstructor extends BigIntConstructor {
````

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với src/interface.ts, đặc biệt là các dòng 69-82, và so sánh nó với node_modules/@amazon-web-services-cloudformation/cloudformation-cli-typescript-lib/dist/interface.d.ts được tạo ra. Tái hiện lỗi lib-check/build TypeScript đã được báo cáo và truy tìm lý do các khai báo Integer và IntegerConstructor được thêm vào. Hoàn tất khi provider có thể thực hiện lib-check mà không gặp các lỗi TS2430 đã được báo cáo.

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

Đánh giá

Công nghệ
node.js, typescript
Lĩnh vực
build-system, 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
Cần làm rõ
Mức phù hợp với người mới
32/100

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.