3 ms·
> In Go, there’s nothing that can be both indexed and take a type parameter. True, but TypeScript has a rule against type-dependent emit - it’s not allowed. Co
by zarzavat 2y ago
> In Go, there’s nothing that can be both indexed and take a type parameter.
True, but TypeScript has a rule against type-dependent emit - it’s not allowed. Code must always do the same thing regardless of what the types are. And in any case JavaScript does allow indexing on functions, since functions are just objects.