API reference/Transformer

Transformer

The transformer rewrites supported syntax into JavaScript, including TypeScript constructs and class static blocks. Unlike type stripping, it can generate runtime code for TypeScript features such as parameter properties.

Example

Input
class Point {
  constructor(public x: number) {}
}
Output
class Point {
  x;
  constructor(x) {
    this.x = x;
  }
}