fix(docs-infra): fix parameters with @Optional() decorator do not match declared, optional type (#35150)
PR Close #35150
This commit is contained in:

committed by
Misko Hevery

parent
5b80e944be
commit
79742a397f
@ -247,7 +247,7 @@ let some_message = 'Hello from the injected logger';
|
||||
export class Provider10Component implements OnInit {
|
||||
log: string;
|
||||
// #docregion provider-10-ctor
|
||||
constructor(@Optional() private logger: Logger) {
|
||||
constructor(@Optional() private logger?: Logger) {
|
||||
if (this.logger) {
|
||||
this.logger.log(some_message);
|
||||
}
|
||||
|
Reference in New Issue
Block a user