2 ms·
Type variables are sometimes called generics and a part of the type language, so JavaScript doesn’t have them. Typescript, but also Rust, Haskell, Java, the ML-
by sfvisser 5y ago
Type variables are sometimes called generics and a part of the type language, so JavaScript doesn’t have them. Typescript, but also Rust, Haskell, Java, the ML-family have them.
Type variables abstract over types and are analogous to function parameters at the values level. Think the ‘T’ in ‘List<T>’.
- rendall 5y agoThanks