@dec
class MyService {
// Overload 1
constructor(a: string);
// Overload 2
constructor(a: string, b: string);
// Implementation
constructor(a?: string, b?: string) {}
}
For this input, Oxc outputs
let MyService = class MyService {
// Implementation
constructor(a, b) {}
};
MyService = _decorate([
dec,
_decorateMetadata("design:paramtypes", [String])
], MyService);
(playground)
but it should be
let MyService = class MyService {
// Implementation
constructor(a, b) {}
};
MyService = _decorate([
dec,
_decorateMetadata("design:paramtypes", [String, String]) // <-- this line is the diff
], MyService);
(TS playground).