-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
types of types #93
Comments
I'm starting to be a bit confused about the hyphening, when we want to use space and when we want to use hyphen for the type name? |
And what should the name be for return types? Just |
And BTW, |
Ok, so the rule appears to be: if the type can match a name for display purpose (e.g., “callback interface”, “interface mixin”) we use space, otherwise use hyphen. And yeah about iterable, also setlike should be an array with a single item. |
Sometimes an "arguments": [
{
"optional": false,
"variadic": false,
"extAttrs": [],
"idlType": {
"sequence": true,
"generic": "sequence",
"nullable": false,
"union": false,
"idlType": {
"sequence": false,
"generic": "record",
"nullable": false,
"union": false,
"idlType": [
{
"sequence": false,
"generic": null,
"nullable": false,
"union": false,
"idlType": "ByteString"
},
{
"sequence": false,
"generic": null,
"nullable": false,
"union": false,
"idlType": "any"
}
]
}
},
"name": "param"
}
] Do we want to also add |
that would be great, actually. That's part what I'm doing at the moment with my dynamically adding a parent (in ReSpec) to work out the type's type. |
That sounds essentially #85 😄. Can you point your related ReSpec commits if you pushed so that I can understand your use case better? |
I've not pushed my local the code up yet, but essentially I am deriving the "type" for a data-attribute. For example: <a dataset-idl-type="attribute-type">DOMString</a> So, to do that, I call function getTypeFromParent({ parent }) {
if (!parent) {
return "";
}
if (parent.hasOwnProperty("type")) {
return parent.type + "-type";
}
return getTypeFromParent(parent);
} |
That is helpful, thanks! |
Oops, not completely fixed yet. |
We covered argument-type, attribute-type, const-type, dictionary-type, return-type, and typedef-type. Is there anything still needed before a potential release? |
I think we should be good to go. I'll publish soon. |
@saschanaz, sorry, can you seem to be getting errors locally with
I haven't had a chance to poke around at those. Could you take a look? |
Oops, quickly pushed ac7ef08. Sorry! |
No problem :) Thanks for fixing! |
released 10.2.0. |
I think this is fixed 👍 |
Is there anyone that updates the typescript |
That one is indeed undermaintained and it should ideally be autogenerated: #255 |
For interfaces, const, attributes etc. that define a idlType, those types should themselves have a
type:
property saying what they are (e.g., "attribute-type", "constant-type").The text was updated successfully, but these errors were encountered: