1
- import { ComponentClass , CSSProperties , ReactElement , StatelessComponent } from 'react'
1
+ import { ComponentClass , CSSProperties , ReactElement , ReactNode , FunctionComponent } from 'react'
2
2
import atlas , {
3
3
AnimationOptions ,
4
4
CameraBoundsOptions ,
@@ -51,7 +51,7 @@ export type IAzureMap = {
51
51
providedMapId ?: string
52
52
containerClassName ?: string
53
53
styles ?: CSSProperties
54
- LoaderComponent ?: ComponentClass < any > | StatelessComponent < any >
54
+ LoaderComponent ?: ComponentClass < any > | FunctionComponent < any >
55
55
options ?: IAzureMapOptions
56
56
imageSprites ?: IAzureMapImageSprite [ ]
57
57
controls ?: IAzureMapControls [ ]
@@ -129,7 +129,7 @@ export type IAzureMapLayerContextState = {
129
129
}
130
130
131
131
export type IAzureDataSourceChildren =
132
- | IAzureMapFeature
132
+ | ( IAzureMapFeature & ReactNode )
133
133
| ReactElement < IAzureMapFeature >
134
134
| ReactElement < IAzureLayerStatefulProviderProps >
135
135
@@ -160,9 +160,10 @@ export type IAzureMapEvent = {
160
160
161
161
export type IAzureDataSourceStatefulProviderProps = {
162
162
id : string
163
- children ?: | Array < IAzureDataSourceChildren | IAzureDataSourceChildren [ ] | null >
164
- | IAzureDataSourceChildren
165
- | null
163
+ children ?:
164
+ | Array < IAzureDataSourceChildren | IAzureDataSourceChildren [ ] | null >
165
+ | IAzureDataSourceChildren
166
+ | null
166
167
options ?: DataSourceOptions
167
168
events ?: IAzureMapDataSourceEvent | any
168
169
dataFromUrl ?: string
@@ -177,11 +178,12 @@ export type IAzureDataSourceStatefulProviderProps = {
177
178
}
178
179
179
180
export type IAzureVectorTileSourceStatefulProviderProps = {
180
- id : string ,
181
- children ?: | Array < IAzureVectorTileSourceChildren | IAzureVectorTileSourceChildren [ ] | null >
182
- | IAzureVectorTileSourceChildren
183
- | null
184
- options ?: VectorTileSourceOptions ,
181
+ id : string
182
+ children ?:
183
+ | Array < IAzureVectorTileSourceChildren | IAzureVectorTileSourceChildren [ ] | null >
184
+ | IAzureVectorTileSourceChildren
185
+ | null
186
+ options ?: VectorTileSourceOptions
185
187
events ?: IAzureMapVectorTileSourceEvent
186
188
// NOTE: not sure yet why this is needed, haven't seen this used in AzureMapsDataSource, though IAzureGeoJSONDataSourceStatefulProviderProps has it
187
189
index ?: number
0 commit comments