Skip to content

Commit

Permalink
[typescript-angular] Provide return value for all code paths (#9174) (#…
Browse files Browse the repository at this point in the history
…9176)

In order to avoid a compiler error when using `noImplicitReturns `, we
change the mustache template to use provide a return value for the if-
and else branch.

Fixes #9174.
  • Loading branch information
HexagonSun authored Apr 6, 2021
1 parent c3b7ecf commit acedd1c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ export class {{configurationClassName}} {
{{#isBasic}}
{{#isBasicBasic}}
this.credentials['{{name}}'] = () => {
if (this.username || this.password) {
return btoa(this.username + ':' + this.password);
}
return (this.username || this.password)
? btoa(this.username + ':' + this.password)
: undefined;
};
{{/isBasicBasic}}
{{#isBasicBearer}}
Expand Down

0 comments on commit acedd1c

Please sign in to comment.