Set the decorator mode to legacy in nub.jsonc and decorated classes run with no build step. This is the legacy decorator form the DI / ORM ecosystem (NestJS, TypeORM, Angular) is written against.

nub.jsonc
{
  "decorators": "legacy",
  "emitDecoratorMetadata": true
}
@Entity()
class Account {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  balance: number;
}

Nub also reads compilerOptions.experimentalDecorators and compilerOptions.emitDecoratorMetadata from the selected or nearest tsconfig.json. Top-level Nub fields override their TypeScript equivalents when both are present.

Read the full docs for decorators on typescriptlang.org.

Design-type metadata

When emitDecoratorMetadata is also set, Nub emits the Reflect.metadata(...) calls that DI containers read for constructor-parameter type inference. The emitted code references Reflect.metadata, so install and import reflect-metadata yourself, exactly as on plain TypeScript — Nub does not auto-inject it.

Stage 3 decorators

Stage 3 decorators (TypeScript 5's default when no legacy mode is selected) are not supported: that transform is an upstream gap in oxc, so Nub rejects Stage-3-shaped decorator syntax with a diagnostic pointing you at decorators: "legacy".