<@U1DKTH3NW> Well, how are you imagining this woul...
# getting-started
r
@Tristan Caron Well, how are you imagining this would work? To implement the interface, you have to know what functions and properties the interface defines at compile time - that's not possible with normal generics.
t
robin: I was thinking having something similar to Typescript with objects.
const cache: T = {}
r
@Tristan Caron The problem is that Typescript uses duck-typing, and is only an overlay over the not at all statically typed javascript. That's why you can tell typescript "I know what I'm doing, this will be the correct type at runtime". That's not possible with a language where every type has to be statically resolved at compile time.
t
Ok, thanks