General type updates#684
Conversation
sandersn
left a comment
There was a problem hiding this comment.
Questions about the namesakes code. Also, would a name like duplicateProperties or aliasedProperties be more precise?
| }, | ||
| "Performance": { | ||
| "name": "Performance", | ||
| "properties": { |
There was a problem hiding this comment.
That was my intention but looks like this is completely redundant. I'll remove this.
| addComments(prop, commentMap, i.name, member.name); | ||
|
|
||
| if (member.name in properties!.namesakes!) { | ||
| properties!.namesakes![member.name].push(prop); |
There was a problem hiding this comment.
it looks like this can happen more than once, but the code in mergeNamesakes assumes there's only one entry in each namesakes in line 20: for (const [prop] of .... Is that correct?
There was a problem hiding this comment.
Yup, because in line 20 the namesakes value is already filtered by exposure ([Exposed] in IDL).
It's not precisely "duplicated" or "aliased" because those properties are mutually exclusive (only one property should be alive and others will be filtered out, for each lib target): interface X {
[Exposed=Window] attribute Foo x; // This one will be used in dom.generated.d.ts
[Exposed=Worker] attribute Bar x; // This one will be used in worker.generated.d.ts
};"duplicate" makes me think those are same properties but they are not really same, so 🤔 |
sandersn
left a comment
There was a problem hiding this comment.
sounds like evilTwin might be the most accurate name :). Namesake is a fine name for now, in any case.
Adds
WebGLRenderingContextBase.canvasandself.requestAnimationFrame()for worker, and exposesExternalglobal constructor.Had to modify the code to process the special same-named properties
canvas. Not super pretty but should be good enough for now.