Redis geoadd,类型问题

Redis geoadd, type issue

我正在尝试将 redis geoadd 函数与 nodejs 客户端一起使用,客户端似乎提供了该函数,但类型与打字稿混淆了,我似乎无法使其工作,当前代码是

cache.geoAdd(KEY,position.longitude,position.latitude, courier_id)

正如我在 redis 文档中读到的那样,这应该是语法,但它 returns 这个 TS 错误

Type at position 2 in source is not compatible with type at position 2 in target. Type 'string' is not assignable to type 'GeoMember | GeoMember[]'

当我检查节点模块中的 GeoMember 类型时,它是只有成员 属性 {member: string} 的对象,所以我不知道如何构建命令,因为资源量非常少在 redis geo 上在线。如果有人有这方面的经验,你能详细说明你是如何使这个命令工作的吗

GeoMember extends GeoCoordinates...这应该有效:

await cache.geoAdd(KEY, {
  longitude: position.longitude,
  latitude: position.latitude,
  member: courier_id
});