-
Notifications
You must be signed in to change notification settings - Fork 42
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
Methods that can return empty lists (and nullable attributes) #433
Comments
I would suggest just returning an empty sequence rather than allowing null, but that's just me...
No. Optional but not nullable.
No, optional but not nullable.
Correct, result is nullable. Allowing
Again, my personal preference is an empty sequence since there's no additional meaning value to allowing null.
No. If specified, it can't be null.
Hmmm...
I don't see why
Think that was wrong.
No. I don't think it should be nullable.
Same as previous.
No, I don't think it should be nullable index. I prefer empty lists (personal preference). |
Agreed. Typically any API method that returns a sequence must always return a sequence, even if empty.
Agreed.
Agreed.
Agreed. An API method returning
Agreed. Always return a sequence (avoid
Agreed.
Return an empty sequence.
Agreed.
Agreed.
Agreed. Always empty list. |
Throughout the specification, there appear to be issues with methods that can return null or attributes that can be null. For example:
dictionary RTCDtlsTransportStateChangedEventInit : EventInit {
RTCDtlsTransportState? state;
};
partial interface RTCRtpSender : RTCStatsProvider {
readonly attribute RTCDtlsTransport? rtcpTransport;
};
partial interface RTCRtpReceiver : RTCStatsProvider {
readonly attribute RTCDtlsTransport? rtcpTransport;
};
What if there aren't any ICE transports added yet? Does getTransports() return an empty list?
The text was updated successfully, but these errors were encountered: