You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 8, 2022. It is now read-only.
The following error can be produced with any two collections that have different key or value types. I understand why you shouldn't be able to use two collections with different key types, as the resulting collection will always be empty, however, I don't understand why you can't do two collections with different value types, as values aren't referenced at all in either of the functions below.
For example, if I had a collection of non-discord related data about users (Collection<Snowflake, RandomUserData>), and wanted to only view the data for users who are in a voice channel (VoiceChannel#members is Collection<Snowflake, GuildMember>), I wouldn't be able to.
Code sample
constcollection1=newCollection<string,string>(...);constcollection2=newCollection<string,number>(...);collection1.intersect(collection2);collection1.difference(collection2);// Argument of type 'Collection<string, number>' is not assignable to parameter of type 'Collection<string, string>'.
@discordjs/collection version
0.3.2
Node.js version
16.6.1
Operating system
Windows
Priority this issue should have
Low (slightly annoying)
The text was updated successfully, but these errors were encountered:
Issue description
The following error can be produced with any two collections that have different key or value types. I understand why you shouldn't be able to use two collections with different key types, as the resulting collection will always be empty, however, I don't understand why you can't do two collections with different value types, as values aren't referenced at all in either of the functions below.
For example, if I had a collection of non-discord related data about users (
Collection<Snowflake, RandomUserData>
), and wanted to only view the data for users who are in a voice channel (VoiceChannel#members
isCollection<Snowflake, GuildMember>
), I wouldn't be able to.Code sample
@discordjs/collection version
0.3.2
Node.js version
16.6.1
Operating system
Windows
Priority this issue should have
Low (slightly annoying)
The text was updated successfully, but these errors were encountered: