I am working with a simple interface that looks like this:
interface A<T extends Object> {
b: T;
}
Currently, "b" is stored as an instance of T. However, I want to store the non-instanced version of T as a value within the interface.
My initial idea was to try something like this:
interface A<T extends Object> {
b: typeof T;
}
Unfortunately, it seems like this approach is not correct and is not allowed by the compiler. Is there a way to achieve what I want?
The following code accomplishes my goal, but it does not enforce 'b' to be generic:
interface A<T extends Object> {
b: Object;
}