Skip to content

Supported version declaration for TypeScript seems to be incorrect #1190

@SanjoSolutions

Description

@SanjoSolutions

It seems that this package only supports TypeScript >= 4.0.0 because the TypeScript factory API was introduced in TypeScript 4.

With the current dependecy declaration, TypeScript 3 is also considered a valid dependency version. This has resulted in an error when I have installed this package in combination with another package that depends on TypeScript 3 (pnpm has opted to use TypeScript 3 too for this package).

Sources for that the TypeScript factory API was introduced in TypeScript 4:

Suggestion for fix

I suggest to change the version constraint for TypeScript to >=4.0.0 <=4.5.0.

How to fix it in a project

For PNPM I have added the following to pnpm-workspace.yaml:

overrides:
  "@aws-amplify/codegen-ui-react>typescript": ">=4.0.0 <=4.5.0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions