Skip to content

Commit

Permalink
Explain weird Flow comment type
Browse files Browse the repository at this point in the history
  • Loading branch information
lettertwo committed Sep 23, 2021
1 parent c01c641 commit 710e743
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/graph/src/AdjacencyList.js
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,8 @@ export class SharedTypeMap<TItemType, THash, TAddress: number>
}
}

// Trick Flow into believing in `Symbol.iterator`.
// See https://github.com/facebook/flow/issues/1163#issuecomment-353523840
/*:: @@iterator(): Iterator<TAddress> { return ({}: any); } */
// $FlowFixMe[unsupported-syntax]
*[Symbol.iterator](): Iterator<TAddress> {
Expand Down

0 comments on commit 710e743

Please sign in to comment.