Remove Flow annotations and pragmas

This commit is contained in:
Sam Goldman
2016-02-28 13:07:49 -10:00
parent 6aff776124
commit 4252244d06
49 changed files with 288 additions and 448 deletions

View File

@@ -1,4 +1,3 @@
/* @flow */
/* eslint indent: 0 */
/* eslint max-len: 0 */
@@ -62,7 +61,7 @@ function getTokenType(match) {
* Highlight `text`.
*/
function highlight(text: string) {
function highlight(text) {
return text.replace(jsTokens, function (...args) {
let type = getTokenType(args);
let colorize = defs[type];
@@ -78,12 +77,7 @@ function highlight(text: string) {
* Create a code frame, adding line numbers, code highlighting, and pointing to a given position.
*/
export default function (
rawLines: string,
lineNumber: number,
colNumber: number,
opts: Object = {},
): string {
export default function (rawLines, lineNumber, colNumber, opts = {}) {
colNumber = Math.max(colNumber, 0);
let highlighted = opts.highlightCode && chalk.supportsColor;