@@ -35,7 +35,7 @@ declare module "@hmscore/react-native-hms-map" {
3535 */
3636 GAP = 2
3737 }
38-
38+ type PatternItemEnum = `${ Extract < PatternItemTypes , number > } ` extends `${infer N extends number } ` ? N : never ;
3939 export enum CapTypes {
4040
4141 /**
@@ -188,7 +188,7 @@ declare module "@hmscore/react-native-hms-map" {
188188 VIOLET = 270 ,
189189 MAGENTA = 300 ,
190190 ROSE = 330
191- } ;
191+ }
192192
193193 type HueEnum = `${Extract < Hue , number > } ` extends `${infer N extends number } ` ? N : never ;
194194
@@ -689,7 +689,20 @@ declare module "@hmscore/react-native-hms-map" {
689689 * Events triggered by the map.
690690 */
691691 export interface MapEvent < T = { } > extends NativeSyntheticEvent < T > { }
692+ /**
693+ * Stroke pattern of a polyline or the outline of a polygon or circle.
694+ */
695+ export interface PatternItem {
696+ /**
697+ * Type of the pattern.
698+ */
699+ type : PatternItemEnum ;
692700
701+ /**
702+ * Length, in pixels. It is not needed for DOT pattern item type.
703+ */
704+ length ?: number ;
705+ }
693706 /**
694707 * Props for <HMSCircle> component.
695708 */
@@ -1341,6 +1354,14 @@ declare module "@hmscore/react-native-hms-map" {
13411354 /**
13421355 * Props for <MapView> component.
13431356 */
1357+ /**
1358+ * The options for routePolicy are
1359+ * CHINA = "CN"
1360+ * GERMANY = "DE"
1361+ * SINGAPORE = "SG"
1362+ * RUSSIA = "RU"
1363+ */
1364+ export type RoutePolicyType = "CN" | "DE" | "SG" | "RU" ;
13441365 export interface HMSMapProps extends ViewProps {
13451366
13461367 /**
@@ -1621,7 +1642,7 @@ declare module "@hmscore/react-native-hms-map" {
16211642 * Initializes the Map SDK. You can set the data routing location. The options for routePolicy are CN (China), DE (Germany), SG (Singapore), and RU (Russia).
16221643 * Sets the access token of the Map SDK.
16231644 */
1624- initializer ( apiKey : String , routePolicy : String ) : Promise < void > ;
1645+ initializer ( apiKey : String , routePolicy : RoutePolicyType ) : Promise < void > ;
16251646
16261647 /**
16271648 * Obtains all attributes of the Huawei map object
@@ -1786,12 +1807,12 @@ declare module "@hmscore/react-native-hms-map" {
17861807 /**
17871808 * Enables HMSLogger
17881809 */
1789- enableLogger ( ) : Promise ;
1810+ enableLogger ( ) : Promise < null > ;
17901811
17911812 /**
17921813 * Disables HMSLogger
17931814 */
1794- disableLogger ( ) : Promise ;
1815+ disableLogger ( ) : Promise < null > ;
17951816
17961817 /**
17971818 * Gets the layer info about map layer objects
@@ -1812,4 +1833,4 @@ declare module "@hmscore/react-native-hms-map" {
18121833 export default class HMSMap extends React . Component < React . PropsWithChildren < HMSMapProps > > {
18131834 static module : HMSMapMethods ;
18141835 }
1815- }
1836+ }
0 commit comments