Fix tslint warnings in json extension
This commit is contained in:
parent
b0306ad7aa
commit
63bbc4ea27
|
@ -196,7 +196,7 @@ export function createScanner(text:string, ignoreTrivia:boolean = false):JSONSca
|
|||
function scanNext():SyntaxKind {
|
||||
|
||||
value = '';
|
||||
scanError = ScanError.None,
|
||||
scanError = ScanError.None;
|
||||
|
||||
tokenOffset = pos;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ export interface IXHROptions {
|
|||
timeout?: number;
|
||||
data?: any;
|
||||
agent?: any;
|
||||
strictSSL?: boolean;
|
||||
strictSSL?: boolean;
|
||||
responseType?: string;
|
||||
followRedirects?: number;
|
||||
}
|
||||
|
@ -133,8 +133,12 @@ function request(options: IXHROptions): Promise<IRequestResult> {
|
|||
});
|
||||
req.on('error', e);
|
||||
|
||||
options.timeout && req.setTimeout(options.timeout);
|
||||
options.data && req.write(options.data);
|
||||
if (options.timeout) {
|
||||
req.setTimeout(options.timeout);
|
||||
}
|
||||
if (options.data) {
|
||||
req.write(options.data);
|
||||
}
|
||||
|
||||
req.end();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue