Skip to content

Commit

Permalink
fix(CodeFrameError): fix missing type declaration error
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards1211 committed Sep 28, 2022
1 parent 0e63f07 commit 053cce7
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/util/CodeFrameError.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
import CompilePathError from './CompilePathError'
import generate from '@babel/generator'
import { NodePath } from '../types'
import { codeFrameColumns, BabelCodeFrameOptions } from '@babel/code-frame'
import { codeFrameColumns } from '@babel/code-frame'
import chalk from 'chalk'
import dedent from 'dedent-js'

interface BabelCodeFrameOptions {
/** Syntax highlight the code as JavaScript for terminals. default: false */
highlightCode?: boolean | undefined
/** The number of lines to show above the error. default: 2 */
linesAbove?: number | undefined
/** The number of lines to show below the error. default: 3 */
linesBelow?: number | undefined
/**
* Forcibly syntax highlight the code as JavaScript (for non-terminals);
* overrides highlightCode.
* default: false
*/
forceColor?: boolean | undefined
}

export interface SourceLocation {
start: {
line: number
Expand Down

0 comments on commit 053cce7

Please sign in to comment.