We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In TreeMap's [Symbol.iterator]: public [Symbol.iterator] ():Iterator<K> { return this.entrySet[Symbol.iterator](); }
public [Symbol.iterator] ():Iterator<K> { return this.entrySet[Symbol.iterator](); }
The type of this.entrySet is a function, not an object of ImmutableEntrySetForTreeMap. So I think it should be defined like this:
public [Symbol.iterator]():Iterator<MapEntry<K, V>> { return this.entrySet()[Symbol.iterator](); }
Or there will get a ts(7053) error
The text was updated successfully, but these errors were encountered:
I'll take a look - thanks for reaching out!
Sorry, something went wrong.
Ahhh! I just saw the confusion - I was typing up a response and I see how I confused you!
This is a really good question and perhaps I should change the type name there.
In TestTreeMap.spec.ts I see what I did - it was bad type naming in that method on my part and I apologize.
You're 100% right - it should be MapEntry<K,V> and not simply K.
On line 982 in my test that's exactly what I did. let tsi:Iterator<MapEntry<PetStoreProduct,ValueClass>> = entrysetSymbol.iterator;
so the K that you get back from this method is really a MapEntry<K,V> and this is absolutely my bad.
I will patch the npm module to make this better.
Thank you very much for reaching out and letting me know about this! Larry Diamond
No branches or pull requests
In TreeMap's [Symbol.iterator]:
public [Symbol.iterator] ():Iterator<K> { return this.entrySet[Symbol.iterator](); }
The type of this.entrySet is a function, not an object of ImmutableEntrySetForTreeMap. So I think it should be defined like this:
public [Symbol.iterator]():Iterator<MapEntry<K, V>> { return this.entrySet()[Symbol.iterator](); }
Or there will get a ts(7053) error
The text was updated successfully, but these errors were encountered: