pycodestyle
pycodestyle copied to clipboard
Swap of key and type in custom store
I was surprised by the inversion of type and key in custom store of Svelvet. We have many TS types such as:
Map<CustomEdgeKey, WritableEdge>Record<string, Writable<unknown> | Readable<unknown>>
but the Svelvet's Store interface is defined in the opposite way export interface Store<T, K>.
IMHO it generates disturbing usage and definitions such as:
export interface Store<T, K> {
subscribe: Writable<Map<K, T>>['subscribe'];
...
where T, V is swapped to K, V.
I propose to use common K, V ordering.