Skip to content

Commit

Permalink
refactor(typescript):noImplicitAny for index test file (#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenqlogic authored and JustinBeckwith committed Mar 4, 2019
1 parent 96f645d commit 6f2890b
Show file tree
Hide file tree
Showing 2 changed files with 201 additions and 171 deletions.
16 changes: 2 additions & 14 deletions src/topic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,13 +328,7 @@ export class Topic {
callback!(null, true);
return;
}
let code = 0;
if (err.hasOwnProperty('code')) {
code =
(Object.getOwnPropertyDescriptor(err, 'code') as PropertyDescriptor)
.value;
}
if (code === 5) {
if (err.code === 5) {
callback!(null, false);
return;
}
Expand Down Expand Up @@ -397,13 +391,7 @@ export class Topic {
callback!(null, this, apiResponse!);
return;
}
let code = 0;
if (err.hasOwnProperty('code')) {
code =
(Object.getOwnPropertyDescriptor(err, 'code') as PropertyDescriptor)
.value;
}
if (code !== 5 || !autoCreate) {
if (err.code !== 5 || !autoCreate) {
callback!(err, null, apiResponse!);
return;
}
Expand Down
Loading

0 comments on commit 6f2890b

Please sign in to comment.