@types/babel-code-frame
TypeScript definitions for babel-code-frame
Last updated 7 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/babel-code-frame 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/babel-code-frame

Summary

This package contains type definitions for babel-code-frame (https://github.com/babel/babel/tree/master/packages).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel-code-frame.

index.d.ts

// Type definitions for babel-code-frame 6.20
// Project: https://github.com/babel/babel/tree/master/packages, https://babeljs.io
// Definitions by: Mohsen Azimi <https://github.com/mohsen1>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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 */
    linesBelow?: number | undefined;
    /**  The number of lines to show below the error. default: 3 */
    linesAbove?: number | undefined;
    /**
     * Forcibly syntax highlight the code as JavaScript (for non-terminals);
     * overrides highlightCode.
     * default: false
     */
    forceColor?: boolean | undefined;
}

/**
 * Generate errors that contain a code frame that point to source locations.
 *
 * @param rawLines Raw lines to frame
 * @param lineNumber Line number (1 indexed)
 * @param colNumber Column number
 * @param options Additional options
 *
 * @returns Framed code
 */
declare function codeFrame(
    rawLines: string,
    lineNumber: number,
    colNumber: number,
    options?: BabelCodeFrameOptions
): string;

export = codeFrame;

Additional Details

  • Last updated: Tue, 06 Jul 2021 18:05:38 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Mohsen Azimi.

Current Tags

  • 6.20.5                                ...           latest (5 years ago)
  • 6.20.2                                ...           ts2.0 (7 years ago)
  • 6.20.2                                ...           ts2.1 (7 years ago)
  • 6.20.2                                ...           ts2.2 (7 years ago)
  • 6.20.2                                ...           ts2.3 (7 years ago)
  • 6.20.2                                ...           ts2.4 (7 years ago)
  • 6.20.2                                ...           ts2.5 (7 years ago)
  • 6.20.2                                ...           ts2.6 (7 years ago)
  • 6.20.2                                ...           ts2.7 (7 years ago)
  • 6.20.2                                ...           ts2.8 (7 years ago)
  • 6.20.2                                ...           ts2.9 (7 years ago)
  • 6.20.4                                ...           ts3.0 (6 years ago)
  • 6.20.4                                ...           ts3.1 (6 years ago)
  • 6.20.4                                ...           ts3.2 (6 years ago)
  • 6.20.4                                ...           ts3.3 (6 years ago)
  • 6.20.4                                ...           ts3.4 (6 years ago)
  • 6.20.4                                ...           ts3.5 (6 years ago)
  • 6.20.5                                ...           ts3.6 (5 years ago)
  • 6.20.5                                ...           ts3.7 (5 years ago)
  • 6.20.5                                ...           ts3.8 (5 years ago)
  • 6.20.5                                ...           ts3.9 (5 years ago)
  • 6.20.5                                ...           ts4.0 (5 years ago)
  • 6.20.5                                ...           ts4.1 (5 years ago)
  • 6.20.5                                ...           ts4.2 (5 years ago)
  • 6.20.5                                ...           ts4.3 (5 years ago)
  • 6.20.5                                ...           ts4.4 (5 years ago)
  • 6.20.5                                ...           ts4.5 (5 years ago)
  • 6.20.5                                ...           ts4.6 (5 years ago)

7 Versions

  • 6.20.5                                ...           5 years ago
  • 6.20.4                                ...           6 years ago
  • 6.20.3                                ...           6 years ago
  • 6.20.2                                ...           7 years ago
  • 6.20.1                                ...           9 years ago
  • 6.20.0                                ...           9 years ago
  • 6.16.0                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 2
This Month 2
Last Day 0
Last Week 1
Last Month 1
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |