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
The data argument is marked as "optional", but it is effectively required; share() will return a rejected promise with a TypeError if called with no arguments. WebIDL mandates that it be optional because the dictionary members are all optional. See WebIDL Issue #130.
If the type of an argument is a dictionary type or a union type that has a dictionary type as one of its flattened member types, and that dictionary type and its ancestors have no required members, and the argument is either the final argument or is followed only by optional arguments, then the argument must be specified as optional and have a default value provided.
Given that the first thing we need to check is if
data
has some members, shouldn't the share() signature actually makedata
required?Alternatively, the method signature should default to the empty dictionary:
However, I think we should just make
data
required.The text was updated successfully, but these errors were encountered: