Skip to content

Commit

Permalink
babel-code-frame rename exported type to be just "Options"
Browse files Browse the repository at this point in the history
  • Loading branch information
zxbodya committed Dec 10, 2020
1 parent 3d0fc1b commit 5df2caa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/babel-code-frame/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type NodeLocation = {
start: Location;
};

export interface BabelCodeFrameOptions {
export interface Options {
/** Syntax highlight the code as JavaScript for terminals. default: false */
highlightCode?: boolean;
/** The number of lines to show above the error. default: 2 */
Expand Down Expand Up @@ -58,7 +58,7 @@ const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
function getMarkerLines(
loc: NodeLocation,
source: Array<string>,
opts: BabelCodeFrameOptions,
opts: Options,
): {
start: number;
end: number;
Expand Down Expand Up @@ -129,7 +129,7 @@ function getMarkerLines(
export function codeFrameColumns(
rawLines: string,
loc: NodeLocation,
opts: BabelCodeFrameOptions = {},
opts: Options = {},
): string {
const highlighted =
(opts.highlightCode || opts.forceColor) && shouldHighlight(opts);
Expand Down Expand Up @@ -205,7 +205,7 @@ export default function (
rawLines: string,
lineNumber: number,
colNumber?: number | null,
opts: BabelCodeFrameOptions = {},
opts: Options = {},
): string {
if (!deprecationWarningShown) {
deprecationWarningShown = true;
Expand Down

0 comments on commit 5df2caa

Please sign in to comment.