diff --git a/README.md b/README.md index 87044ad..cbc8af8 100644 --- a/README.md +++ b/README.md @@ -68,8 +68,7 @@ The library implements a lot of ready to use components like `AzureMapFeature, A ```javascript import React from 'react' -import {AzureMap, AzureMapsProvider, IAzureMapOptions} from 'react-azure-maps' -import {AuthenticationType} from 'azure-maps-control' +import {AzureMap, AzureMapsProvider, IAzureMapOptions, AuthenticationType} from 'react-azure-maps' const option: IAzureMapOptions = { authOptions: { diff --git a/src/types.ts b/src/types.ts index 72f9f5d..b5e756e 100644 --- a/src/types.ts +++ b/src/types.ts @@ -161,28 +161,28 @@ export type IAzureMapEvent = { export type IAzureDataSourceStatefulProviderProps = { id: string children?: - | Array - | IAzureDataSourceChildren - | null + | Array + | IAzureDataSourceChildren + | null options?: DataSourceOptions events?: IAzureMapDataSourceEvent | any dataFromUrl?: string collection?: - | atlas.data.FeatureCollection - | atlas.data.Feature - | atlas.data.Geometry - | atlas.data.GeometryCollection - | Shape - | Array | atlas.data.Geometry | Shape> + | atlas.data.FeatureCollection + | atlas.data.Feature + | atlas.data.Geometry + | atlas.data.GeometryCollection + | Shape + | Array | atlas.data.Geometry | Shape> index?: number } export type IAzureVectorTileSourceStatefulProviderProps = { id: string children?: - | Array - | IAzureVectorTileSourceChildren - | null + | Array + | IAzureVectorTileSourceChildren + | null options?: VectorTileSourceOptions events?: IAzureMapVectorTileSourceEvent // NOTE: not sure yet why this is needed, haven't seen this used in AzureMapsDataSource, though IAzureGeoJSONDataSourceStatefulProviderProps has it @@ -202,16 +202,16 @@ export type IAzureMapLifecycleEvent = { export type IAzureLayerStatefulProviderProps = { id?: string options?: - | (SymbolLayerOptions & - HeatMapLayerOptions & - ImageLayerOptions & - LineLayerOptions & - PolygonExtrusionLayerOptions & - PolygonLayerOptions & - TileLayerOptions & - BubbleLayerOptions & - LayerOptions) - | Options + | (SymbolLayerOptions & + HeatMapLayerOptions & + ImageLayerOptions & + LineLayerOptions & + PolygonExtrusionLayerOptions & + PolygonLayerOptions & + TileLayerOptions & + BubbleLayerOptions & + LayerOptions) + | Options type: IAzureMapLayerType events?: IAzureMapLayerEvent | any onCreateCustomLayer?: (dataSourceRef: DataSourceType, mapRef: MapType | null) => atlas.layer.Layer @@ -316,10 +316,10 @@ export type IAzureMapFeature = { properties?: Options // Shape functions: setCoords?: - | atlas.data.Position - | atlas.data.Position[] - | atlas.data.Position[][] - | atlas.data.Position[][][] + | atlas.data.Position + | atlas.data.Position[] + | atlas.data.Position[][] + | atlas.data.Position[][][] setProperties?: Options } @@ -340,3 +340,4 @@ export type AzureDataLineString = atlas.data.LineString export type AzureDataPosition = atlas.data.Position export type ControlOptions = atlas.ControlOptions export type AzureSetCameraOptions = ((CameraOptions | CameraBoundsOptions) & AnimationOptions) | any +export { AuthenticationType } from 'azure-maps-control'