File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ import Pbf from 'pbf'
7
7
8
8
import { getTimezoneAtSea , oceanZones } from './oceanUtils'
9
9
10
+ type MapLike = {
11
+ get ( key : string ) : any
12
+ set ( key : string , value : any ) : void
13
+ }
14
+
10
15
export type CacheOptions = {
11
16
/**
12
17
* If set to true, all features will be loaded into memory to shorten future lookup
@@ -16,7 +21,7 @@ export type CacheOptions = {
16
21
/**
17
22
* Must be a map-like object with a `get` and `set` function.
18
23
*/
19
- store ?: Map < string , any >
24
+ store ?: MapLike
20
25
}
21
26
22
27
/**
@@ -69,7 +74,7 @@ function _preCache(
69
74
tzData : any ,
70
75
featureFilePath : string ,
71
76
featureFileFd : number ,
72
- featureCache : Map < string , any > ,
77
+ featureCache : MapLike ,
73
78
) {
74
79
// shoutout to github user @magwo for an initial version of this recursive function
75
80
function preloadFeaturesRecursive ( curTzData , quadPos : string ) {
@@ -147,7 +152,7 @@ function loadFeatures(
147
152
*/
148
153
export function findUsingDataset (
149
154
tzData : any ,
150
- featureCache : any ,
155
+ featureCache : MapLike ,
151
156
featureFilePath : string ,
152
157
lat : number ,
153
158
lon : number ,
You can’t perform that action at this time.
0 commit comments