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

bug: @ts-ignore causing issues when libchecking providers

Offen
#132 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
46
Forks
18
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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 {
````

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit src/interface.ts, insbesondere mit den Zeilen 69-82, und vergleiche die Datei mit der generierten node_modules/@amazon-web-services-cloudformation/cloudformation-cli-typescript-lib/dist/interface.d.ts. Reproduziere den gemeldeten TypeScript-lib-check-/Build-Fehler und verfolge, warum die Deklarationen Integer und IntegerConstructor hinzugefügt wurden. Die Aufgabe ist abgeschlossen, wenn der Provider lib-check ohne die gemeldeten TS2430-Fehler durchführen kann.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
node.js, typescript
Bereich
build-system, tooling
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
32/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.