Decorators
How Nub runs legacy TypeScript decorators and their emitted design-type metadata on stock Node — the form the NestJS, TypeORM, and Angular dependency-injection ecosystem is written against.
Set experimentalDecorators: true in your tsconfig.json and decorated classes run with no build step. This is the legacy decorator form the DI / ORM ecosystem (NestJS, TypeORM, Angular) is written against.
{
"compilerOptions": {
"experimentalDecorators": true,
"emitDecoratorMetadata": true
}
}@Entity()
class Account {
@PrimaryGeneratedColumn()
id: number;
@Column()
balance: number;
}emitDecoratorMetadata
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 neither flag is set) 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 experimentalDecorators: true.
JSX
How Nub runs JSX on stock Node — automatic-runtime defaults, tsconfig-driven configuration, and the per-file import-source pragma for mixing runtimes.
Module resolution
The TypeScript-aware resolution Nub layers on top of Node — tsconfig path aliases and base URL, extends chains, extensionless imports, and the JavaScript-to-TypeScript extension swap.