Skip to content

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

Description

@blujedis

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

Platforms Affected

  • iOS
  • Android
  • Web

Current Behavior

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

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.

import * as React from 'react';

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

Project Reproduction

https://github.com/blujedis/roadrumor

Additional Information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions