apply prettier formatting
This commit is contained in:
@@ -3,5 +3,5 @@
|
|||||||
"tabWidth": 2,
|
"tabWidth": 2,
|
||||||
"printWidth": 120,
|
"printWidth": 120,
|
||||||
"singleQuote": false,
|
"singleQuote": false,
|
||||||
"trailingComma": "es5"
|
"trailingComma": "none"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// tslint:disable:no-conditional-assignment
|
// tslint:disable:no-conditional-assignment
|
||||||
import {SourceMapConsumer} from "source-map";
|
import { SourceMapConsumer } from "source-map";
|
||||||
|
|
||||||
export class ErrorMapper {
|
export class ErrorMapper {
|
||||||
// Cache consumer
|
// Cache consumer
|
||||||
@@ -26,7 +26,7 @@ export class ErrorMapper {
|
|||||||
* @returns {string} The source-mapped stack trace
|
* @returns {string} The source-mapped stack trace
|
||||||
*/
|
*/
|
||||||
public static sourceMappedStackTrace(error: Error | string): string {
|
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)) {
|
if (this.cache.hasOwnProperty(stack)) {
|
||||||
return this.cache[stack];
|
return this.cache[stack];
|
||||||
}
|
}
|
||||||
@@ -35,7 +35,7 @@ export class ErrorMapper {
|
|||||||
let match: RegExpExecArray | null;
|
let match: RegExpExecArray | null;
|
||||||
let outStack = error.toString();
|
let outStack = error.toString();
|
||||||
|
|
||||||
while (match = re.exec(stack)) {
|
while ((match = re.exec(stack))) {
|
||||||
if (match[2] === "main") {
|
if (match[2] === "main") {
|
||||||
const pos = this.consumer.originalPositionFor({
|
const pos = this.consumer.originalPositionFor({
|
||||||
column: parseInt(match[4], 10),
|
column: parseInt(match[4], 10),
|
||||||
|
|||||||
Reference in New Issue
Block a user