A blog post by the Flow team describes a "re-architecture" of Flow called "types-first". As far as I can tell, the only description is in this quote from the blog post:
"...it exploits full type annotations at file boundaries to perform better (more parallelizable and less redundant) separate compilation."
Is there more detail about this anywhere? Specifically, I'm wondering what these full annotations are: what are the new restrictions on source code and declaration files?
For example, is this allowed?
import { func } from "./other-module";
export const myNumber = func(num1, num2);
It's problematic in TypeScript, since the type of myNumber
is impossible to resolve without knowing the type of func
. Will the "types-first" re-architecture of Flow require users to write:
import { func } from "./other-module";
export const myNumber: number = func(num1, num2);
This is just one specific question I have. What I'm looking for is a little bit more information and a link to a document explaining all the known implications of the re-architecture.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…