ionic-team / ionic-team/capacitor-google-maps

[Bug]: capacitor-google-map types for React 19+

Open
#88 0 comments 0 reactions 0 assignees View on GitHub
triage
Dominant language
TypeScript
Stars
32
Forks
47
PR merge metrics
No merged PRs in 30d

Description

### Capacitor Version

**Latest Dependencies:**

@capacitor/cli: 7.4.1
@capacitor/core: 7.4.1
@capacitor/android: 7.4.1
@capacitor/ios: 7.4.1

**Installed Dependencies:**

@capacitor/cli: 7.4.1
@capacitor/core: 7.4.1
@capacitor/ios: 7.4.1
@capacitor/android: 7.4.1

### Other API Details

```Shell

```

### Platforms Affected

- [x] iOS
- [x] Android
- [x] Web

### Current Behavior

The below appears to throw an error in the IDE with newer versions of React for custom element `capacitor-google-map`

```ts
declare global {
export namespace JSX {
interface IntrinsicElements {
'capacitor-google-map': any;
}
}
}
```

### Expected Behavior

I believe with current versions of React that the declaration for the `capacitor-google-map` custom element should be the following.

NOTE: I've included more detailed props/attributes for the custom element rather than `any` as shown above.

```ts
import * as React from 'react';

declare module 'react/jsx-runtime' {
namespace JSX {
interface IntrinsicElements {
'capacitor-google-map': React.DetailedHTMLProps, HTMLElement>;
}
}
}
```

### Project Reproduction

https://github.com/blujedis/roadrumor

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.