viernes, 21 de noviembre de 2014

Flow

Flow es un software que permite el chequeo de tipos en script en javascript. Este software te permite encontrar errores de tipos en javascript.

El mecanismo es muy fácil, se crea un script, luego se corre flow y este te indica si hay algún problema.

Por ejemplo dado el siguiente script:

/* @flow */
function foo(x) {
  return x * 10;
}
foo('Hello, world!');

Tendremos la siguiente salida:

hello.js:5:5,19: string This type is incompatible with hello.js:3:10,15: number

Se puede utilizar tanto en Linux como en OS X.

Dejo links:
http://flowtype.org/
http://flowtype.org/docs/getting-started.html#_

No hay comentarios.:

Publicar un comentario