harp.gl throws an error while using with Typescript version 4 and above
Closed this issue · 3 comments
Describe the bug
Harp.gl throws an error while using along with Typescript version 4.0 and above
To Reproduce
Steps to reproduce the behavior:
- Generate sample angular project (Angular version - 11 with Typescript Version 4 or above )
- Add simple harp.gl map rendering code
- Check error due to Typescript breaking change (https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#properties-overriding-accessors-and-vice-versa-is-an-error)
Example project - https://github.com/ravioshankar/angular-harp
Expected behavior
Harp.gl should load basic map
Screenshots
Harp.gl does not work with Typescript version 4.0 and above due to recent Typescript breaking change
for more details https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#properties-overriding-accessors-and-vice-versa-is-an-error
Desktop (please complete the following information):
- OS: I think all OS should have this issue as this is happening due to Typescript breaking change
- Browser : all browsers
Additional context
Add any other context about the problem here.
Build at: 2021-01-27T04:12:18.015Z - Hash: dc78403668244d0f4091 - Time: 21863ms
Error: node_modules/@here/harp-materials/lib/CirclePointsMaterial.d.ts:41:9 - error TS2611: 'opacity' is defined as a property in class
'ShaderMaterial', but is overridden here in 'CirclePointsMaterial' as an accessor.
41 get opacity(): number;
~~~~~~~
Error: node_modules/@here/harp-materials/lib/MapMeshMaterials.d.ts:455:9 - error TS2611: 'displacementMap' is defined as a property in class 'MeshStandardMaterial', but is overridden here in 'MapMeshStandardMaterial' as an accessor.
455 get displacementMap(): THREE.Texture | null;
~~~~~~~~~~~~~~~
Error: node_modules/@here/harp-materials/lib/SolidLineMaterial.d.ts:116:9 - error TS2611: 'fog' is defined as a property in class 'RawShaderMaterial', but is overridden here in 'SolidLineMaterial' as an accessor.
116 set fog(enable: boolean);
~~~
Error: node_modules/@here/harp-materials/lib/SolidLineMaterial.d.ts:142:9 - error TS2611: 'opacity' is defined as a property in class 'RawShaderMaterial', but is overridden here in 'SolidLineMaterial' as an accessor.
142 get opacity(): number;
~~~~~~~
0m
hi @ravioshankar , thanks for the issue request.
We have upgraded to Typescript 4, see PR #2026
We have not however made a release yet, we wanted to do this Monday, but had some issues, hopefully we can make a new release soon to unblock you!
@ravioshankar , we made a release yesterday, see: https://github.com/heremaps/harp.gl/releases/tag/v0.22.0, can you please re-try?
issues got resolved. thanks