resium
resium copied to clipboard
Incorrect typings with both new Cesium (>=1.117.0) and new React (>=18.3.1) + typescript (>=5.5)
Hi,
I'd like to address two new (independent) issues regarding wrong typings with new Cesium and new React:
- Resium currently uses
[email protected]
. From[email protected]
onwards, new attributes were added to classes on almost every release. This caused some of the tests in resium to fail, becuase the type checking wasn't precise.
For exmaple, take Billboard.ts
:
In version 1.120 of cesium, Billboard.splitDirection
was added, which caused mismatches between the type and the cesiumProps
array in Billboard.ts
:
After the addition (of course, checking that it's not a readonly attribute), the test passed.
There are in total 11 such cases.
- The upgrade of
@types/react
from version 18.2 to 18.3 causes breaks in the definition offorwardRef
, as mentioned in this PR in react itself (They mention that it itself is being caused by typescript 5.5+).
This causes usages of forwardRef
in resium to fail typescript checks, and a tiny fix would just be to change the type inside of it from Props
to PropsWithoutRef<Props>>
@keiya01 I'd like to add two PRs for each issue 🙂