by fdomig · 12y ago · 0 comments
tsc --noImplicitAny hello.tsc
which will result in hello.ts(2,14): error TS7006: Parameter 'x' implicitly has an 'any' type.
I do not see much difference.[1]: http://flowtype.org
function length(x) {
return x.length;
}
length(null);
can never be a compile-time error in typescript.tl;dr: they want to support both of those features, the question is what syntax to use and how to introduce those features into the existing ecosystem.
TypeScript doesn't have that concept, although it's been suggested by the community more than once.
Besides perhaps the extra 'compile' time added to do both translation with TypeScript and then static analysis with Flow. Both tools have their advantages and disadvantages.
May as well throw in a linting tool as well..