import * as request from 'request';

function requestPromise(options: request.Options) {
	'use strict';
	return new Promise<string>((resolve, reject) => {
		request(options, (error, response, body) => {
			if (error) {
				reject(error);
			} else {
				resolve(body);
			}
		});
	});
}

export default requestPromise;

import * as request from 'request';

function requestPromise(options: request.Options) {
	'use strict';
	return new Promise<string>((resolve, reject) => {
		request(options, (error, response, body) => {
			error ? reject(error) : resolve(body);
		});
	});
}

export default requestPromise;

--- 
+++ 
@@ -4,7 +4,11 @@
 	'use strict';
 	return new Promise<string>((resolve, reject) => {
 		request(options, (error, response, body) => {
-			error ? reject(error) : resolve(body);
+			if (error) {
+				reject(error);
+			} else {
+				resolve(body);
+			}
 		});
 	});
 }
Use if statement instead of conditional operator
