Skip to content

Error when using object spread and $Exact flow utility type #1324

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

Closed
andrewdelprete opened this issue Jun 2, 2020 · 0 comments · Fixed by #1325
Closed

Error when using object spread and $Exact flow utility type #1324

andrewdelprete opened this issue Jun 2, 2020 · 0 comments · Fixed by #1325

Comments

@andrewdelprete
Copy link
Contributor

andrewdelprete commented Jun 2, 2020

Issue:
An error is thrown on build when using the object spread + $Exact flow utility type

Example:

type B = number

export type MyType = {
  a: string,
  ...$Exact<B>
}
> yarn documentation readme ./index.js --document-exported

TypeError: Cannot read property 'name' of undefined at /Users/andrewdelprete/path/to/node_modules/documentation/src/infer/properties.js:57:63

  • 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 andrewdelprete changed the title Error when using ObjectSpread and $Exact flow utility type Error when using object spread and $Exact flow utility type Jun 2, 2020
andrewdelprete added a commit to andrewdelprete/documentation that referenced this issue Jun 2, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fixes an issue where documentationjs breaks on build when  using object
spread and Flow utility $Exact (i.g: ...Exact<Type>)

✅ Closes: documentationjs#1324
@tmcw tmcw closed this as completed in #1325 Jun 4, 2020
tmcw pushed a commit that referenced this issue Jun 4, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fixes an issue where documentationjs breaks on build when  using object
spread and Flow utility $Exact (i.g: ...Exact<Type>)

✅ Closes: #1324
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