Thanks for your contribution @joestrouth1 ! Its a good idea to expose a
`Symbol.asyncIterator` method.
We must support Node.js 6 and 8 runtimes, that don't expose
`Symbol.asyncIterator`.
You can fix it by define it conditionally:
```javascript
const asyncIteratorSymbol = Symbol.asyncIterator || Symbol('@@asyncIterator');
// ...
[asyncIteratorSymbol]() {
// This wont work for Node.js 6 and 8, but at least the method will be
exposed
// under symbol name
return this;
}
```
Also, it would be nice it we could add a [unit
test](https://github.com/apache/tinkerpop/blob/master/gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/traversal-test.js)
validating that `Symbol.asyncIterator` is defined for a `Traversal` instance:
```javascript
if (Symbol.asyncIterator) {
describe('@@iterator', () => {
it('should expose the async iterator');
});
}
```
[ Full content available at: https://github.com/apache/tinkerpop/pull/1071 ]
This message was relayed via gitbox.apache.org for [email protected]