UNPKG

@visulima/error

Version:

Error with more than just a message, stacktrace parsing.

16 lines (15 loc) 728 B
/** * This is a modified copy of the codeFrameColumns function from Babel * @see https://github.com/babel/babel/blob/85e649203b61b7c908eb04c05511a0d35f893e8e/packages/babel-code-frame/src/index.ts#L145-L217 * * MIT License * * Copyright (c) 2014-present Sebastian McKenzie and other contributors */ import type { CodeFrameNodeLocation, CodeFrameOptions } from "./types.d.ts"; export declare const CODE_FRAME_POINTER: string; /** * Generate a code frame from string and an error location. */ export declare const codeFrame: (source: string, loc: CodeFrameNodeLocation, options?: CodeFrameOptions) => string; export type { CodeFrameLocation, CodeFrameNodeLocation, CodeFrameOptions, ColorizeMethod } from "./types.d.ts";