Skip to content
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

Maybe inconsistent result for WebIDL checker regarding "stringifier" #767

Open
janemba opened this issue Jan 19, 2024 · 1 comment
Open

Comments

@janemba
Copy link

janemba commented Jan 19, 2024

Hello,

I submit a WebIDL example for the WebIDL checker at https://w3c.github.io/webidl2.js/checker/ .

The WebIDL data is the following:

interface interface_identifier {
  stringifier;
};

And from the checker I'm getting the following result:

[
  {
    "type": "interface",
    "name": "interface_identifier",
    "inheritance": null,
    "members": [
      {
        "type": "operation",
        "name": "",
        "arguments": [],
        "extAttrs": [],
        "special": "stringifier"
      }
    ],
    "extAttrs": [],
    "partial": false
  }
]

So we have only one member but it doesn't contain the IdlType field. The Operation type describe in the README.md (from this repo), contains the IdlType.

I was wondering if the correct results should be that one instead (with IdlType set to null):

[
    {
        "type": "interface",
        "name": "interface_identifier",
        "inheritance": null,
        "members": [
            {
                "type": "operation",
                "name": "",
                "idlType": null,
                "arguments": [],
                "extAttrs": [],
                "special": "stringifier"
            }
        ],
        "extAttrs": [],
        "partial": false
    }
]

Thanks

@janemba
Copy link
Author

janemba commented Jan 21, 2024

According to the README.md the Operation type describe the idlType as below:

idlType: An IDL Type of what the operation returns, if exists.

So, the idlType is like the return type but if it does not exists, should the idlType be set to null or should the field be removed from the operation member (which does not make sense).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant