metaprogramming

Writing code that works on other code or on types, such as decorators that modify classes or types computed from other types.

In more detail

Mapped types, conditional types and utility types are metaprogramming at the type level. Use it where it removes real duplication, since heavy type-level code is hard to read.

Related terms

Taught in

References