diff --git a/packages/react-google-maps-api-gatsby-example/src/examples/example-directions.tsx b/packages/react-google-maps-api-gatsby-example/src/examples/example-directions.tsx index 2df3984a3..dc8007868 100644 --- a/packages/react-google-maps-api-gatsby-example/src/examples/example-directions.tsx +++ b/packages/react-google-maps-api-gatsby-example/src/examples/example-directions.tsx @@ -6,6 +6,7 @@ import { } from '@react-google-maps/api' import * as PropTypes from 'prop-types' import { + type JSX, memo, useCallback, useMemo, diff --git a/packages/react-google-maps-api-gatsby-example/src/examples/example-drawing.tsx b/packages/react-google-maps-api-gatsby-example/src/examples/example-drawing.tsx index 4c040734b..2c96fbf78 100644 --- a/packages/react-google-maps-api-gatsby-example/src/examples/example-drawing.tsx +++ b/packages/react-google-maps-api-gatsby-example/src/examples/example-drawing.tsx @@ -1,5 +1,5 @@ // eslint-disable-next-line node/no-extraneous-import -import { type CSSProperties, memo } from 'react' +import { type CSSProperties, type JSX, memo } from 'react' import PropTypes from 'prop-types' import { GoogleMap, DrawingManager } from '@react-google-maps/api' diff --git a/packages/react-google-maps-api-gatsby-example/src/examples/example-ground.tsx b/packages/react-google-maps-api-gatsby-example/src/examples/example-ground.tsx index 60cb0f382..7b4771176 100644 --- a/packages/react-google-maps-api-gatsby-example/src/examples/example-ground.tsx +++ b/packages/react-google-maps-api-gatsby-example/src/examples/example-ground.tsx @@ -1,5 +1,5 @@ // eslint-disable-next-line node/no-extraneous-import -import { type CSSProperties, memo } from 'react' +import { type CSSProperties, type JSX, memo } from 'react' import PropTypes from 'prop-types' import { GoogleMap, GroundOverlay } from '@react-google-maps/api' diff --git a/packages/react-google-maps-api-gatsby-example/src/examples/example-heatmap.tsx b/packages/react-google-maps-api-gatsby-example/src/examples/example-heatmap.tsx index ba68b395e..c47348ec4 100644 --- a/packages/react-google-maps-api-gatsby-example/src/examples/example-heatmap.tsx +++ b/packages/react-google-maps-api-gatsby-example/src/examples/example-heatmap.tsx @@ -1,5 +1,5 @@ // eslint-disable-next-line node/no-extraneous-import -import { type CSSProperties, memo, useMemo } from 'react' +import { type CSSProperties, type JSX, memo, useMemo } from 'react' import PropTypes from 'prop-types' import { GoogleMap, diff --git a/packages/react-google-maps-api-gatsby-example/src/examples/example-options.tsx b/packages/react-google-maps-api-gatsby-example/src/examples/example-options.tsx index 15ba61aeb..2d16ec1a6 100644 --- a/packages/react-google-maps-api-gatsby-example/src/examples/example-options.tsx +++ b/packages/react-google-maps-api-gatsby-example/src/examples/example-options.tsx @@ -1,5 +1,5 @@ // eslint-disable-next-line node/no-extraneous-import -import { type CSSProperties, memo } from 'react' +import { type CSSProperties, type JSX, memo } from 'react' import PropTypes from 'prop-types' import { GoogleMap } from '@react-google-maps/api' diff --git a/packages/react-google-maps-api-gatsby-example/src/examples/example-overlay-view.tsx b/packages/react-google-maps-api-gatsby-example/src/examples/example-overlay-view.tsx index 7f82640ef..331faa400 100644 --- a/packages/react-google-maps-api-gatsby-example/src/examples/example-overlay-view.tsx +++ b/packages/react-google-maps-api-gatsby-example/src/examples/example-overlay-view.tsx @@ -1,5 +1,5 @@ // eslint-disable-next-line node/no-extraneous-import -import { type CSSProperties, memo, useCallback, useState } from 'react' +import { type CSSProperties, type JSX, memo, useCallback, useState } from 'react' import PropTypes from 'prop-types' import { GoogleMap, OverlayViewF, MarkerF, OVERLAY_MOUSE_TARGET, MARKER_LAYER, } from '@react-google-maps/api' diff --git a/packages/react-google-maps-api-gatsby-example/src/examples/example-search-box.tsx b/packages/react-google-maps-api-gatsby-example/src/examples/example-search-box.tsx index a781eef27..719c478bd 100644 --- a/packages/react-google-maps-api-gatsby-example/src/examples/example-search-box.tsx +++ b/packages/react-google-maps-api-gatsby-example/src/examples/example-search-box.tsx @@ -1,5 +1,5 @@ // eslint-disable-next-line node/no-extraneous-import -import { type CSSProperties, memo } from 'react' +import { type CSSProperties, type JSX, memo } from 'react' import PropTypes from 'prop-types' import { GoogleMap, StandaloneSearchBox } from '@react-google-maps/api' diff --git a/packages/react-google-maps-api-gatsby-example/src/examples/example-shapes.tsx b/packages/react-google-maps-api-gatsby-example/src/examples/example-shapes.tsx index 46e18806a..ecc9f87d4 100644 --- a/packages/react-google-maps-api-gatsby-example/src/examples/example-shapes.tsx +++ b/packages/react-google-maps-api-gatsby-example/src/examples/example-shapes.tsx @@ -1,5 +1,5 @@ // eslint-disable-next-line node/no-extraneous-import -import { type CSSProperties, memo, useCallback, useMemo, useState, ChangeEventHandler } from 'react' +import { type CSSProperties, type JSX, memo, useCallback, useMemo, useState, ChangeEventHandler } from 'react' import PropTypes from 'prop-types' import { GoogleMap, diff --git a/packages/react-google-maps-api-gatsby-example/src/examples/example-traffic.tsx b/packages/react-google-maps-api-gatsby-example/src/examples/example-traffic.tsx index 2405b3846..c0e4307e8 100644 --- a/packages/react-google-maps-api-gatsby-example/src/examples/example-traffic.tsx +++ b/packages/react-google-maps-api-gatsby-example/src/examples/example-traffic.tsx @@ -1,5 +1,5 @@ // eslint-disable-next-line node/no-extraneous-import -import { type CSSProperties, memo } from 'react' +import { type CSSProperties, type JSX, memo } from 'react' import PropTypes from 'prop-types' import { GoogleMap, TrafficLayer } from '@react-google-maps/api' diff --git a/packages/react-google-maps-api-gatsby-example/src/examples/example-transit.tsx b/packages/react-google-maps-api-gatsby-example/src/examples/example-transit.tsx index 8d267e093..c651b0908 100644 --- a/packages/react-google-maps-api-gatsby-example/src/examples/example-transit.tsx +++ b/packages/react-google-maps-api-gatsby-example/src/examples/example-transit.tsx @@ -1,5 +1,5 @@ // eslint-disable-next-line node/no-extraneous-import -import { type CSSProperties, memo } from 'react' +import { type CSSProperties, type JSX, memo } from 'react' import PropTypes from 'prop-types' import { GoogleMap, TransitLayer } from '@react-google-maps/api' diff --git a/packages/react-google-maps-api/src/LoadScript.tsx b/packages/react-google-maps-api/src/LoadScript.tsx index 1957d1699..f369c0724 100644 --- a/packages/react-google-maps-api/src/LoadScript.tsx +++ b/packages/react-google-maps-api/src/LoadScript.tsx @@ -1,4 +1,4 @@ -import { createRef, PureComponent, type ReactNode, type RefObject } from 'react' +import { createRef, type JSX, PureComponent, type ReactNode, type RefObject } from 'react' import invariant from 'invariant' import { injectScript } from './utils/injectscript' diff --git a/packages/react-google-maps-api/src/__tests__/components/circle.test.tsx b/packages/react-google-maps-api/src/__tests__/components/circle.test.tsx index 0a96dcee6..d26893dfa 100644 --- a/packages/react-google-maps-api/src/__tests__/components/circle.test.tsx +++ b/packages/react-google-maps-api/src/__tests__/components/circle.test.tsx @@ -1,8 +1,8 @@ /** * @jest-environment jsdom */ -import type { JSX } from 'react' +import { type JSX } from "react" import { render, cleanup } from "@testing-library/react" import GoogleMap from "../../GoogleMap" import Circle, { type CircleProps } from '../../components/drawing/Circle' diff --git a/packages/react-google-maps-api/src/components/addons/MarkerClusterer.tsx b/packages/react-google-maps-api/src/components/addons/MarkerClusterer.tsx index 6716c7bbc..3a3a2091f 100644 --- a/packages/react-google-maps-api/src/components/addons/MarkerClusterer.tsx +++ b/packages/react-google-maps-api/src/components/addons/MarkerClusterer.tsx @@ -1,5 +1,6 @@ import { type ContextType, + type JSX, PureComponent, useState, memo, diff --git a/packages/react-google-maps-api/src/components/directions/DirectionsRenderer.md b/packages/react-google-maps-api/src/components/directions/DirectionsRenderer.md index bbb3553ad..f5afc63a0 100644 --- a/packages/react-google-maps-api/src/components/directions/DirectionsRenderer.md +++ b/packages/react-google-maps-api/src/components/directions/DirectionsRenderer.md @@ -2,7 +2,7 @@ ```jsx const ScriptLoaded = require("../../docs/ScriptLoaded").default; -import React, { memo, useCallback, useMemo, useRef, useState } from 'react'; +import React, { type JSX, memo, useCallback, useMemo, useRef, useState } from 'react'; import { GoogleMap, diff --git a/packages/react-google-maps-api/src/components/directions/DirectionsRenderer.tsx b/packages/react-google-maps-api/src/components/directions/DirectionsRenderer.tsx index 2df45673d..a2150a6d9 100644 --- a/packages/react-google-maps-api/src/components/directions/DirectionsRenderer.tsx +++ b/packages/react-google-maps-api/src/components/directions/DirectionsRenderer.tsx @@ -1,4 +1,4 @@ -import { type ContextType, PureComponent } from 'react' +import { type ContextType, type JSX, PureComponent } from 'react' import { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper' diff --git a/packages/react-google-maps-api/src/components/dom/OverlayView.stories.tsx b/packages/react-google-maps-api/src/components/dom/OverlayView.stories.tsx index 3967b2763..78a74c9ee 100644 --- a/packages/react-google-maps-api/src/components/dom/OverlayView.stories.tsx +++ b/packages/react-google-maps-api/src/components/dom/OverlayView.stories.tsx @@ -1,5 +1,6 @@ // eslint-disable-next-line node/no-extraneous-import import type { StoryFn, Meta } from '@storybook/react' +import { type JSX } from "react" import GoogleMap from '../../GoogleMap' import { OverlayViewF, OVERLAY_LAYER } from './OverlayView' diff --git a/packages/react-google-maps-api/src/components/drawing/Marker.tsx b/packages/react-google-maps-api/src/components/drawing/Marker.tsx index de6902bfc..9637ce93b 100644 --- a/packages/react-google-maps-api/src/components/drawing/Marker.tsx +++ b/packages/react-google-maps-api/src/components/drawing/Marker.tsx @@ -11,6 +11,7 @@ import { type ReactNode, type ContextType, type ReactElement, + type JSX, } from 'react' import { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper' diff --git a/packages/react-google-maps-api/src/components/places/Autocomplete.tsx b/packages/react-google-maps-api/src/components/places/Autocomplete.tsx index e787f271e..888f15e9e 100644 --- a/packages/react-google-maps-api/src/components/places/Autocomplete.tsx +++ b/packages/react-google-maps-api/src/components/places/Autocomplete.tsx @@ -1,4 +1,4 @@ -import { Children, type ContextType, createRef, PureComponent, type ReactChild, type RefObject } from 'react' +import { Children, type ContextType, createRef, type JSX, PureComponent, type ReactNode, type RefObject } from 'react' import { unregisterEvents, applyUpdatersToPropsAndRegisterEvents } from '../../utils/helper' @@ -43,7 +43,7 @@ interface AutocompleteState { export interface AutocompleteProps { // required - children: ReactChild + children: ReactNode /** The area in which to search for places. */ bounds?: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | undefined /** The component restrictions. Component restrictions are used to restrict predictions to only those within the parent component. For example, the country. */ diff --git a/packages/react-google-maps-api/src/components/places/StandaloneSearchBox.tsx b/packages/react-google-maps-api/src/components/places/StandaloneSearchBox.tsx index 7a5606bd1..d177aaa12 100644 --- a/packages/react-google-maps-api/src/components/places/StandaloneSearchBox.tsx +++ b/packages/react-google-maps-api/src/components/places/StandaloneSearchBox.tsx @@ -1,4 +1,4 @@ -import { Children, type ContextType, createRef, PureComponent, type ReactNode, type RefObject } from 'react' +import { Children, type ContextType, createRef, type JSX, PureComponent, type ReactNode, type RefObject } from 'react' import invariant from 'invariant' diff --git a/packages/react-google-maps-api/src/docs/DocsApiKeyInput.tsx b/packages/react-google-maps-api/src/docs/DocsApiKeyInput.tsx index d731887ea..beac1c0a1 100644 --- a/packages/react-google-maps-api/src/docs/DocsApiKeyInput.tsx +++ b/packages/react-google-maps-api/src/docs/DocsApiKeyInput.tsx @@ -1,4 +1,4 @@ -import { type ChangeEvent, Component, type FormEvent, type ReactNode } from 'react' +import { type ChangeEvent, Component, type JSX, type FormEvent, type ReactNode } from 'react' import { setKey, getKey } from './docs-api-key' import LoadScript from '../LoadScript' diff --git a/packages/react-google-maps-api/src/docs/ScriptLoaded.tsx b/packages/react-google-maps-api/src/docs/ScriptLoaded.tsx index 7cfd0472d..29d282090 100644 --- a/packages/react-google-maps-api/src/docs/ScriptLoaded.tsx +++ b/packages/react-google-maps-api/src/docs/ScriptLoaded.tsx @@ -1,4 +1,4 @@ -import { Component, type ReactChild, type ReactChildren } from 'react' +import { Component, type JSX, type ReactNode } from 'react' interface ScriptLoadedState { scriptLoaded: boolean @@ -6,7 +6,7 @@ interface ScriptLoadedState { interface ScriptLoadedProps { // eslint-disable-next-line @typescript-eslint/ban-types - children: ReactChild | ReactChildren | Function + children: ReactNode | ReactNode[] | Function } function SpanIntro(): JSX.Element {