Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with exporting->importing an opaque flow type when using the readme command #1322

Closed
andrewdelprete opened this issue Jun 1, 2020 · 1 comment · Fixed by #1323
Closed

Comments

@andrewdelprete
Copy link
Contributor

andrewdelprete commented Jun 1, 2020

Issue:
When exporting an opaque Flow type and importing it into an entry file for documentation to consume, the CLI throws an error when using the readme command.

Example:

// MyType.js
export opaque type MyType: string = string
// index.js
import type { MyType } from './MyType'
> yarn documentation README ./index.js --document-exported
Error: Unable to find the value MyType in /Users/andrewdelprete/path/to/MyType.js
  • What version of documentation.js are you using?: v13.0.0

  • How are you running documentation.js (on the CLI, Node.js API, Grunt, other?): CLI

@andrewdelprete
Copy link
Contributor Author

By adding declaration.isOpaqueType() to the conditional on line 231 in exported.js, it resolves the issue. I'll open a PR to fix :)

andrewdelprete added a commit to andrewdelprete/documentation that referenced this issue Jun 2, 2020
When exporting an opaque Flow type and importing it into an entry file
for documentation to consume, the CLI throws an error when using the
readme command.

✅ Closes: documentationjs#1322
@andrewdelprete andrewdelprete changed the title Error when exporting->importing an opaque flow type Error with exporting->importing an opaque flow type when using the readme command Jun 2, 2020
@tmcw tmcw closed this as completed in #1323 Jun 4, 2020
tmcw pushed a commit that referenced this issue Jun 4, 2020
When exporting an opaque Flow type and importing it into an entry file
for documentation to consume, the CLI throws an error when using the
readme command.

✅ Closes: #1322
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant