Skip to content

Commit

Permalink
Add any casting to fix TypeScript bug (#109)
Browse files Browse the repository at this point in the history
* Add userAgent casting

* Add any casting to fix TypeScript bug
  • Loading branch information
kpajdzik authored May 10, 2019
1 parent 17d5bba commit 535ba9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/azureServiceClientTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2516,9 +2516,9 @@ describe("AzureServiceClient", () => {
let actualUserAgent: string | undefined;

if (typeof actual.userAgent === "string") {
actualUserAgent = (actual.userAgent! as string);
actualUserAgent = actual.userAgent!;
} else if (typeof actual.userAgent === "function") {
actualUserAgent = (actual.userAgent! as ((defaultUserAgent: string) => string))("");
actualUserAgent = (actual.userAgent! as any)("");
}
delete actual.userAgent;
delete expected.userAgent;
Expand Down

0 comments on commit 535ba9b

Please sign in to comment.