style(aio): correctly type tuple
This commit is contained in:

committed by
Chuck Jazdzewski

parent
c8ead9bcd0
commit
9df9bdc0f5
@ -120,13 +120,13 @@ class Helper {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public verifyResponse(status: number | (number | string)[], regex = /^/): VerifyCmdResultFn {
|
public verifyResponse(status: number | [number, string], regex = /^/): VerifyCmdResultFn {
|
||||||
let statusCode: number;
|
let statusCode: number;
|
||||||
let statusText: string;
|
let statusText: string;
|
||||||
|
|
||||||
if (Array.isArray(status)) {
|
if (Array.isArray(status)) {
|
||||||
statusCode = status[0] as number;
|
statusCode = status[0];
|
||||||
statusText = status[1] as string;
|
statusText = status[1];
|
||||||
} else {
|
} else {
|
||||||
statusCode = status;
|
statusCode = status;
|
||||||
statusText = http.STATUS_CODES[statusCode];
|
statusText = http.STATUS_CODES[statusCode];
|
||||||
|
Reference in New Issue
Block a user