I am creating a data model paradigm with typescript. I store different types of data in different places (SQL, a local cache). I want to create an abstract class that contains all of the methods I would need for any type of data storage (create, find, update, count, destroy). This way I could extend that class and implement it differently for different types of storage and the compiler would warn me if I was missing a method. I would then extend one of those implementations in a class describing the data model. However, some of the methods I need (such as find and create) are static. I know typescript does not support abstract static methods. Is there something similar to abstract methods I could use so the compiler warns me about missing methods?
I would also like these static methods to be generic and typed the same as the class. I know this makes no sense for a standard generic class. However, since this class will always be extended and never instantiated, could I type the generic class when I extend it, automatically updating the generic type on the static methods?