Expected Behavior
If we want to create an interface and extends DocumentViewResponse for the result of db.view function, we can't provide other types other than string for key property of view. Suppose I use an array as my key like [date, tag] or a number as my key. So I need to define other types than string for my key in interface.
Current Behavior
This will not work:
interface IPostViewResponseByTag extends DocumentViewResponse<{ title: string }, Post> {
rows: {
id: string;
key: string[]; // Error here
value: { title: string };
}[],
}
Possible Solution
Add other types to key like key: string | string[] | etc