Expressionsthattype
Expressionsthattype refers to a class of syntactic forms in programming languages whose main purpose is to influence, specify, or compute types. These expressions are often evaluated at compile time or checked by the type checker, and may produce a type, a type constraint, or a type-level value rather than a direct runtime result. The concept helps separate concerns between value computation and type formation, and is used in discussions of type inference, generics, and dependent types.
In practice, expressions that type appear in several forms. These include type queries that extract a type
- TypeScript: typeof used in a type context to query the type of a symbol
- Haskell: DataKinds and TypeFamilies for type-level computation
- Rust: type annotations and trait bounds that influence compilation