Type Instantiation for Generics

Say you have something that has a generic parameter e.g. a class Foo:

class Foo<T>{
foo: T;
}

You want to create a specialized version for it for a particular type. The pattern is to copy the item into a new variable and give it the type annotation with the generics replaced with concrete types. E.g if you want a class Foo<number>: