Merge pull request #31166 from schultzp2020/constructor-parameters
refactor: convert constructor parameter properties for erasableSyntaxOnly compatibility
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user