Revert "Remove Flow annotations and pragmas"
This reverts commit 4252244d06.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user