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

Type error on MapPanelProvider and MapPanelContent #2184

Open
RubenSibon opened this issue Mar 6, 2024 · 0 comments
Open

Type error on MapPanelProvider and MapPanelContent #2184

RubenSibon opened this issue Mar 6, 2024 · 0 comments

Comments

@RubenSibon
Copy link

Describe the bug

When using the MapPanelProvider or MapPanelContent from the latest version of @amsterdam/arm-core (1.0.0) and React and ReactDOM 17.x you get a type error when using either of these components. The type error:

Type '{ children: Element; variant: "panel"; initialPosition: SnapPoint.Halfway; }' is not assignable to type 'IntrinsicAttributes & Props'.
  Property 'children' does not exist on type 'IntrinsicAttributes & Props'.typescript(2322)

This error started to appear recently, so may be related to minor or patch updates in another package. No major upgrades have been done. I was able to reproduce this error in CodeSandbox with only React 17 and ARM 1.0:

See the type error reproduced in a CodeSandbox

Expected behavior

Property children should exist on these element's types. The elements should allow a React child element.

RubenSibon added a commit to Amsterdam/bereikbaarheid-frontend that referenced this issue Mar 7, 2024
As (dummy) Touringcar Messages only exist on Acceptance and Production,
and they cannot be accessed locally due to CORS, this PR needs to be
merged with `azure` to get the code on Acceptance.

You might notice the `ts-ignore` comments everywhere. They are added due
to an upstream type error. See [this bug report of
mine](Amsterdam/amsterdam-react-maps#2184) for
more details.

---------

Co-authored-by: Kris de Groot <[email protected]>
Co-authored-by: jjbeekman <[email protected]>
Co-authored-by: Jeroen Beekman <[email protected]>
Co-authored-by: jjbeekman <[email protected]>
Co-authored-by: dependabot-vakgroep-so[bot] <144998647+dependabot-vakgroep-so[bot]@users.noreply.github.com>
Co-authored-by: github-merge-queue <[email protected]>
Co-authored-by: thomasbrockmeier-ams <[email protected]>
Co-authored-by: jjbeekman <[email protected]>
@dlnr dlnr assigned dlnr and unassigned dlnr Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants