Closed stefanhaustein closed 8 months ago
We don't typically use interfaces this way on the web platform. Since the behavior is not actually identical between store and index, it wouldn't be functional inheritance (or each algorithm would have "if this is a store, do X; if it's an index, do Y", which defeats the purpose).
I understand the appeal when coming from a strongly typed language to have something like IIDBQueryable, but that's just not a pattern that's established for the web.
IDBObjectStore and IDBIndex APIs seem to be aligned in large parts, but this is not formalized as a shared interface in the spec.
We are using the spec to derive types (for jsdoc and j2cl), and an explicit IDL interface for the shared parts of IDBObjectStore and IDBIndex would help us abstract from the differences of IDBIndex and IDBObjectStore in code where the difference doesn't matter.