-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
Since the transformations applied before exporting the package to npm strips the flow annotations but not the comments, a lot of flow errors arise after a npm install graphql
.
Here's some of them:
/Users/rricard/src/github.com/rricard/td-foundation/lib/td-mirror/node_modules/graphql/lib/error/index.js:37:25,31: parameter message
Missing annotation
/Users/rricard/src/github.com/rricard/td-foundation/lib/td-mirror/node_modules/graphql/lib/error/index.js:39:3,7: parameter nodes
Missing annotation
/Users/rricard/src/github.com/rricard/td-foundation/lib/td-mirror/node_modules/graphql/lib/error/index.js:39:10,14: parameter stack
Missing annotation
/Users/rricard/src/github.com/rricard/td-foundation/lib/td-mirror/node_modules/graphql/lib/error/index.js:73:23,27: parameter error
Missing annotation
/Users/rricard/src/github.com/rricard/td-foundation/lib/td-mirror/node_modules/graphql/lib/error/index.js:73:30,34: parameter nodes
Missing annotation
...
... 121 more errors (only 50 out of 171 errors displayed)
To see all errors, re-run Flow with --show-all-errors
One solution would be to strip the /* @flow */
comments from the npm package. But we would lose all of the useful information contained inside those annotations. If we had a transform able to put the annotations in a comment, that would be much better...
Anyway, I'm open to discuss the best way to fix this so I can start working on a pull-request and/or a new transform for flow annotations!
Metadata
Metadata
Assignees
Labels
No labels