@heycar/heycars-map 2.0.0-switchMap7 → 2.0.0-switchMap8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,9 +13,14 @@ function assertLatitudeLongitudeLiteral(value) {
|
|
|
13
13
|
throw Error(`MyError: expect type LatitudeLongitudeLiteral, actual is: ${JSON.stringify(value)}`);
|
|
14
14
|
}
|
|
15
15
|
function assertSnappedPoint(value) {
|
|
16
|
-
|
|
16
|
+
const error = Error(`MyError: expect type SnappedPoint, actual is: ${JSON.stringify(value)}`);
|
|
17
|
+
if (!value)
|
|
18
|
+
throw error;
|
|
19
|
+
try {
|
|
17
20
|
assertLatitudeLongitudeLiteral(value.location);
|
|
18
|
-
|
|
21
|
+
} catch {
|
|
22
|
+
throw error;
|
|
23
|
+
}
|
|
19
24
|
}
|
|
20
25
|
function assertSnapToRoadsResponse(value) {
|
|
21
26
|
const error = Error(
|
package/dist/v2/utils/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const availableLogKeys = /* @__PURE__ */ new Set();
|
|
2
2
|
const pkgName = "@heycar/heycars-map";
|
|
3
|
-
const pkgVersion = "2.0.0-
|
|
3
|
+
const pkgVersion = "2.0.0-switchMap8";
|
|
4
4
|
const isEnableLog = (name) => {
|
|
5
5
|
const searchParam = new URLSearchParams(location.search);
|
|
6
6
|
return searchParam.has(`log-${name}`);
|
|
@@ -13,9 +13,14 @@ function assertLatitudeLongitudeLiteral(value) {
|
|
|
13
13
|
throw Error(`MyError: expect type LatitudeLongitudeLiteral, actual is: ${JSON.stringify(value)}`);
|
|
14
14
|
}
|
|
15
15
|
function assertSnappedPoint(value) {
|
|
16
|
-
|
|
16
|
+
const error = Error(`MyError: expect type SnappedPoint, actual is: ${JSON.stringify(value)}`);
|
|
17
|
+
if (!value)
|
|
18
|
+
throw error;
|
|
19
|
+
try {
|
|
17
20
|
assertLatitudeLongitudeLiteral(value.location);
|
|
18
|
-
|
|
21
|
+
} catch {
|
|
22
|
+
throw error;
|
|
23
|
+
}
|
|
19
24
|
}
|
|
20
25
|
function assertSnapToRoadsResponse(value) {
|
|
21
26
|
const error = Error(
|
package/dist/v3/utils/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const availableLogKeys = /* @__PURE__ */ new Set();
|
|
2
2
|
const pkgName = "@heycar/heycars-map";
|
|
3
|
-
const pkgVersion = "2.0.0-
|
|
3
|
+
const pkgVersion = "2.0.0-switchMap8";
|
|
4
4
|
const isEnableLog = (name) => {
|
|
5
5
|
const searchParam = new URLSearchParams(location.search);
|
|
6
6
|
return searchParam.has(`log-${name}`);
|