fixed babel-code-frame typings (#13246)

* fixed babel-code-frame typings

* latest version header
This commit is contained in:
Simon Schick
2016-12-11 16:57:15 +01:00
committed by Andy
parent 67a9bd38ae
commit d686ddcd8e
2 changed files with 5 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
import codeFrame from "babel-code-frame";
import codeFrame = require("babel-code-frame");
const code = `
const number = 1;

View File

@@ -1,4 +1,4 @@
// Type definitions for babel-code-frame 6.16
// Type definitions for babel-code-frame 6.20
// Project: https://github.com/babel/babel/tree/master/packages
// Definitions by: Mohsen Azimi <https://github.com/mohsen1>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -28,9 +28,11 @@ interface BabelCodeFrameOptions {
*
* @returns Framed code
*/
export default function babelCodeFrame(
declare function codeFrame(
rawLines: string,
lineNumber: number,
colNumber: number,
options?: BabelCodeFrameOptions
): string;
export = codeFrame;