Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typescript >= 3 support #420

Closed
AndrewK15 opened this issue Oct 1, 2018 · 17 comments
Closed

typescript >= 3 support #420

AndrewK15 opened this issue Oct 1, 2018 · 17 comments
Assignees
Labels

Comments

@AndrewK15
Copy link

I'm getting these errors when trying to use amchartsv4 (4.0.0-beta.55) in angular7.rc0 + typescript 3.1.1.

Does it mean amcharts do not support typescript v3 at the moment and I should downgrade?

ERROR in node_modules/@amcharts/amcharts4/.internal/charts/elements/NavigationBar.d.ts(171,5): error TS2416: Property 'validateDataElement' in type 'NavigationBar' is not assignable to the same property in base type 'Component'.
  Type '(dataItem: NavigationBarDataItem) => void' is not assignable to type '(dataItem: this["_dataItem"]) => void'.
    Types of parameters 'dataItem' and 'dataItem' are incompatible.
      Type 'this["_dataItem"]' is not assignable to type 'NavigationBarDataItem'.
        Type 'DataItem' is not assignable to type 'NavigationBarDataItem'.
          Property 'name' is missing in type 'DataItem'.
node_modules/@amcharts/amcharts4/.internal/charts/types/ChordDiagram.d.ts(190,5): error TS2416: Property 'links' in type 'ChordDiagram' is not assignable to the same property in base type 'FlowDiagram'.
  Type 'ListTemplate<ChordLink>' is not assignable to type 'ListTemplate<this["_link"]>'.
    Type 'ChordLink' is not assignable to type 'this["_link"]'.
      Type 'ChordLink' is not assignable to type 'FlowDiagramLink'.
        Types of property 'copyFrom' are incompatible.
          Type '(source: ChordLink) => void' is not assignable to type '(source: this["_link"]) => void'.
            Types of parameters 'source' and 'source' are incompatible.
              Type 'this["_link"]' is not assignable to type 'ChordLink'.
                Type 'FlowDiagramLink' is not assignable to type 'ChordLink'.
                  Property 'radius' is missing in type 'FlowDiagramLink'.
node_modules/@amcharts/amcharts4/.internal/charts/types/SankeyDiagram.d.ts(162,5): error TS2416: Property 'links' in type 'SankeyDiagram' is not assignable to the same property in base type 'FlowDiagram'.
  Type 'ListTemplate<SankeyLink>' is not assignable to type 'ListTemplate<this["_link"]>'.
    Type 'SankeyLink' is not assignable to type 'this["_link"]'.
      Type 'SankeyLink' is not assignable to type 'FlowDiagramLink'.
        Types of property 'copyFrom' are incompatible.
          Type '(source: SankeyLink) => void' is not assignable to type '(source: this["_link"]) => void'.
            Types of parameters 'source' and 'source' are incompatible.
              Type 'this["_link"]' is not assignable to type 'SankeyLink'.
                Type 'FlowDiagramLink' is not assignable to type 'SankeyLink'.
                  Property 'startX' is missing in type 'FlowDiagramLink'.
@Pauan
Copy link
Collaborator

Pauan commented Oct 1, 2018

@AndrewK15 TypeScript 3.0 has a bunch of breaking changes. We're working on making AmCharts 4 compatible with TypeScript 3.0, but in the meantime we recommend downgrading to 2.x

@eliashdezr
Copy link

@Pauan any news on this?

@erichstark
Copy link

Today I also upgraded to angular 7 and typescript 3.1.3. With amcharts 4.0.0-beta.63 problem still exists.

@billfranklin
Copy link

can confirm @erichstark, have the same problem

@Pauan
Copy link
Collaborator

Pauan commented Oct 24, 2018

While working on TypeScript 3.0 support, we noticed that TypeScript 3.0 causes major slowdowns for compile times. We're working on creating a reduced test case so we can submit it to the TypeScript dev team.

@billfranklin
Copy link

@Pauan do you have an estimated timeframe on when the compile issues will be fixed, irrespective of the slowdown issue?

@dellax
Copy link

dellax commented Oct 26, 2018

Temporary solution:
add "skipLibCheck": true to tsconfig.json

@Pauan
Copy link
Collaborator

Pauan commented Oct 27, 2018

@billfranklin We've already fixed all the issues, but we can't release it until the major slowdown is fixed.

@dellax That's great! It must be a new option, I don't remember it existing before.

@billfranklin
Copy link

@Pauan did the update from 4 days ago fix this? It seems it might be related to slowdown issues in projects with many source files microsoft/TypeScript#28025

@billfranklin
Copy link

@dellax genius!

@Pauan
Copy link
Collaborator

Pauan commented Oct 31, 2018

@billfranklin Unfortunately, I don't think it fixed it. However, I submitted a bug report to the TypeScript team and they're looking into it.

@billfranklin
Copy link

@Pauan, at least they have a workaround from the looks of it?

@weswigham
Copy link

Yeah, there's a workaround posted in the thread and a fix committed to master that'll ship in 3.2.

@DanielRosenwasser
Copy link

Check out TypeScript 3.1.6 for the fix.

@DanielRosenwasser
Copy link

Sorry, not 3.1.6; someone linked to a separate issue which is addresed in 3.1.6.

@Pauan Pauan added the in next release Implemented. Available soon. label Nov 2, 2018
@Pauan
Copy link
Collaborator

Pauan commented Nov 2, 2018

Good news! The next release of AmCharts will include TypeScript 3.0 support. We hope to have it out by tomorrow, but we can't promise that.

@martynasma
Copy link
Collaborator

Fixed in 4.0.0-beta.72.

[4.0.0-beta.72] - 2018-11-03

Changed

  • For any XYSeries if the itemReaderText is not set explicitly, it will automatically try to fill with values from dataFields, so that each series element, like a Column has at least rudimentary screen-reader text.

Fixed

  • Added in TypeScript 3.x support.
  • ColumnSeries with two category axes anomaly fixed.

Full change log.

Make sure you clear your browser cache after upgrading. And feel free to contact us again if you are still experiencing this issue.

@martynasma martynasma removed the in next release Implemented. Available soon. label Nov 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants