aws-cloudformation / aws-cloudformation/cloudformation-cli-typescript-plugin
bug: @ts-ignore causing issues when libchecking providers
- 主要语言
- TypeScript
- 星标
- 46
- 派生
- 18
- PR 合并指标
- 30 天内没有已合并 PR
描述
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 {
````
贡献指南
调研方向
从 src/interface.ts 开始,重点查看第 69-82 行,并将其与生成的 node_modules/@amazon-web-services-cloudformation/cloudformation-cli-typescript-lib/dist/interface.d.ts 进行比较。重现报告的 TypeScript lib-check/build 失败,并追踪为何添加了 Integer 和 IntegerConstructor 声明。当 provider 能够在不出现报告的 TS2430 错误的情况下通过 lib-check 时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- node.js, typescript
- 领域
- build-system, tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 32/100