add some more flow types

This commit is contained in:
Henry Zhu
2015-12-18 01:19:06 -05:00
parent effaf820c3
commit c2d7e95e1a
19 changed files with 75 additions and 45 deletions

View File

@@ -1,4 +1,4 @@
/* @noflow */
/* @flow */
import escapeRegExp from "lodash/string/escapeRegExp";
import startsWith from "lodash/string/startsWith";
@@ -16,7 +16,7 @@ export { inherits, inspect } from "util";
* Test if a filename ends with a compilable extension.
*/
export function canCompile(filename: string, altExts?: Array<string>) {
export function canCompile(filename: string, altExts?: Array<string>): boolean {
let exts = altExts || canCompile.EXTENSIONS;
let ext = path.extname(filename);
return contains(exts, ext);