flowgen
flowgen copied to clipboard
ExportDeclaration
Trying to use this on apollo-client's index.d.ts I'm getting:
Parsing index
Missing node parse ExportDeclaration
And looking at parser.js this is effectively not supported. Are you aware of this issue?
For those who stumble into this issue, I found that the error "Missing node parse ExportDeclaration" is caused by using module.exports = MyVariable.
My code specifically was:
// index.ts
import MyVariable from './my-variable-file';
module.exports = MyVariable;
This syntax was wrong, but I didn't notice it until after I had attempted to implement my code in another website with server-side rendering. This is the working code:
// index.ts
import MyVariable from './my-variable-file';
export default MyVariable;