Revert "Remove Flow annotations and pragmas"

This reverts commit 4252244d06.
This commit is contained in:
Amjad Masad
2016-03-03 15:03:55 -08:00
parent 9a180797c0
commit b5315d4b27
7 changed files with 47 additions and 12 deletions

View File

@@ -1,3 +1,4 @@
/* @flow */
// Matches a whole line break (where CRLF is considered a single
// line break). Used to count lines.
@@ -5,7 +6,7 @@
export const lineBreak = /\r\n?|\n|\u2028|\u2029/;
export const lineBreakG = new RegExp(lineBreak.source, "g");
export function isNewLine(code) {
export function isNewLine(code: number): boolean {
return code === 10 || code === 13 || code === 0x2028 || code === 0x2029;
}