apply prettier formatting

This commit is contained in:
Resi Respati
2018-08-01 11:49:15 +07:00
parent a0563bf15e
commit ebc46fb96e
2 changed files with 4 additions and 4 deletions

View File

@@ -3,5 +3,5 @@
"tabWidth": 2,
"printWidth": 120,
"singleQuote": false,
"trailingComma": "es5"
"trailingComma": "none"
}

View File

@@ -1,5 +1,5 @@
// tslint:disable:no-conditional-assignment
import {SourceMapConsumer} from "source-map";
import { SourceMapConsumer } from "source-map";
export class ErrorMapper {
// Cache consumer
@@ -26,7 +26,7 @@ export class ErrorMapper {
* @returns {string} The source-mapped stack trace
*/
public static sourceMappedStackTrace(error: Error | string): string {
const stack: string = error instanceof Error ? error.stack as string : error;
const stack: string = error instanceof Error ? (error.stack as string) : error;
if (this.cache.hasOwnProperty(stack)) {
return this.cache[stack];
}
@@ -35,7 +35,7 @@ export class ErrorMapper {
let match: RegExpExecArray | null;
let outStack = error.toString();
while (match = re.exec(stack)) {
while ((match = re.exec(stack))) {
if (match[2] === "main") {
const pos = this.consumer.originalPositionFor({
column: parseInt(match[4], 10),