Skip to content

Commit cb6080e

Browse files
committed
refactor(core,platform-fastify): drop useless optional signature
1 parent 10f4a9d commit cb6080e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/core/test/utils/noop-adapter.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ export class NoopHttpAdapter extends AbstractHttpAdapter {
2121
setErrorHandler(handler: Function, prefix = '/'): any {}
2222
setNotFoundHandler(handler: Function, prefix = '/'): any {}
2323
isHeadersSent(response: any): any {}
24-
getHeader?(response: any, name: string) {}
24+
getHeader(response: any, name: string) {}
2525
setHeader(response: any, name: string, value: string): any {}
26-
appendHeader?(response: any, name: string, value: string) {}
26+
appendHeader(response: any, name: string, value: string) {}
2727
registerParserMiddleware(): any {}
2828
enableCors(options: any): any {}
2929
createMiddlewareFactory(requestMethod: RequestMethod): any {}

packages/platform-fastify/adapters/fastify-adapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,15 +525,15 @@ export class FastifyAdapter<
525525
return response.sent;
526526
}
527527

528-
public getHeader?(response: any, name: string) {
528+
public getHeader(response: any, name: string) {
529529
return response.getHeader(name);
530530
}
531531

532532
public setHeader(response: TReply, name: string, value: string) {
533533
return response.header(name, value);
534534
}
535535

536-
public appendHeader?(response: any, name: string, value: string) {
536+
public appendHeader(response: any, name: string, value: string) {
537537
response.header(name, value);
538538
}
539539

0 commit comments

Comments
 (0)