Fix tslint warnings in json extension

This commit is contained in:
Martin Aeschlimann 2016-01-26 09:43:10 +01:00
parent b0306ad7aa
commit 63bbc4ea27
2 changed files with 8 additions and 4 deletions

View file

@ -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;

View file

@ -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();
});