Merge pull request #31166 from schultzp2020/constructor-parameters

refactor: convert constructor parameter properties for erasableSyntaxOnly compatibility
This commit is contained in:
Patrik Oldsberg
2025-10-15 18:56:42 +02:00
committed by GitHub
187 changed files with 1893 additions and 728 deletions
@@ -108,7 +108,11 @@ describe('eventsPlugin', () => {
describe('event bus', () => {
class ReqHelper {
constructor(private readonly backend: TestBackend) {}
private readonly backend: TestBackend;
constructor(backend: TestBackend) {
this.backend = backend;
}
subscribe(id: string, topics: string[], options?: { auth?: string }) {
return request(this.backend.server)
@@ -65,16 +65,30 @@ export class HttpPostIngressEventPublisher {
);
}
private readonly events: EventsService;
private readonly logger: LoggerService;
private readonly ingresses: {
[topic: string]: Omit<HttpPostIngressOptions, 'topic'>;
};
private readonly bodyParsers: {
[contentType: string]: HttpBodyParser;
};
private constructor(
private readonly events: EventsService,
private readonly logger: LoggerService,
private readonly ingresses: {
events: EventsService,
logger: LoggerService,
ingresses: {
[topic: string]: Omit<HttpPostIngressOptions, 'topic'>;
},
private readonly bodyParsers: {
bodyParsers: {
[contentType: string]: HttpBodyParser;
},
) {}
) {
this.events = events;
this.logger = logger;
this.ingresses = ingresses;
this.bodyParsers = bodyParsers;
}
bind(router: express.Router): void {
router.use('/http', this.createRouter(this.ingresses));