Next.js: Flow type Next.js

Created on 4 Mar 2018  路  4Comments  路  Source: vercel/next.js

After several years, https://flow.org/ seems to be stable without surprises. Is Next.js team interested in Flow typing the source code? With exported types of course.

Flow supports comment types https://flow.org/en/docs/types/comments, so there is no need to add any additional transpilation step.

Most helpful comment

I'm not sure yet, if it's easy to transpile from flow to typescript typings it'd be okay to keep them in the repository I guess 馃憤

All 4 comments

@steida Would this method also allow outputting .d.ts files too?

@steida we're planning to add flow with the transpilation step very soon 馃憤

@jthegedus I saw https://github.com/bcherny/flow-to-typescript

@timneutkens I'll keep the conversation here as to not create more issues.

I've been using Next.js with TS lately and found that the DefinitelyTyped @types/next types to not have 100% coverage and in addition, the repo has a lot of traffic and so it can take an indeterminate amount of time to get fixes merged. If a tool did exist to simply and reliably generate a .d.ts file from Flow types, would the team and yourself be open to maintaining the .d.ts file within this repo? Or would you defer that responsibility to the @types/next package?

Thanks for that link too :smiley:

I'm not sure yet, if it's easy to transpile from flow to typescript typings it'd be okay to keep them in the repository I guess 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

poyiding picture poyiding  路  73Comments

arunoda picture arunoda  路  103Comments

matthewmueller picture matthewmueller  路  102Comments

Vista1nik picture Vista1nik  路  55Comments

ematipico picture ematipico  路  66Comments