couchdb-nano icon indicating copy to clipboard operation
couchdb-nano copied to clipboard

Typescript definitions and views with composite keys

Open DerNamenlose opened this issue 5 years ago • 2 comments

When accessing a view with a composite key (e.g. something like ['This', 'is', 'a', 'key', 123], the key type in the DocumentViewResponse<V,D>.rows field is statically defined as string. I can cast it to unknown and then to any[] (which would be correct in my case), but that seems to be cumbersome to me. Am I using the interface wrong or is this type definition insufficient.

Something rather odd as a side note: my nano version is 8.1.0, but when opening the type definition file, it says "// Type definitions for nano 6.4" at the top. This is a fresh, clean install into a new project.

DerNamenlose avatar Sep 25 '19 07:09 DerNamenlose

Any update on this? I'm facing the same issue

egriff38 avatar Jan 27 '20 13:01 egriff38

Same here.

epacke avatar Nov 29 '20 10:11 epacke