Skip to content

Type Resolver Transformer

GoogleFeud edited this page Aug 24, 2023 · 6 revisions

The type resolver transformer is a program transformer that's built on top of the already existing macro transformer. It first transpiles the source code to typescript with all macros expanded, and then to javascript. This means that typescript is aware of all imports, type definitions, declarations, and exports that your macros expand to.

Here is an example of a macro that creates a type alias definition, we call the macro and use the type afterwards:

showcase

Clone this wiki locally