-
Notifications
You must be signed in to change notification settings - Fork 456
General type updates #684
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
General type updates #684
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -112,7 +112,7 @@ function convertInterfaceCommon(i: webidl2.InterfaceType | webidl2.InterfaceMixi | |
| constants: { constant: {} }, | ||
| methods: { method: {} }, | ||
| "anonymous-methods": { method: [] }, | ||
| properties: { property: {} }, | ||
| properties: { property: {}, namesakes: {} }, | ||
| constructor: getConstructor(i.extAttrs, i.name), | ||
| "named-constructor": getNamedConstructor(i.extAttrs, i.name), | ||
| exposed: getExtAttrConcatenated(i.extAttrs, "Exposed"), | ||
|
|
@@ -130,8 +130,19 @@ function convertInterfaceCommon(i: webidl2.InterfaceType | webidl2.InterfaceMixi | |
| addComments(result.constants!.constant[member.name], commentMap, i.name, member.name); | ||
| } | ||
| else if (member.type === "attribute") { | ||
| result.properties!.property[member.name] = convertAttribute(member, result.exposed); | ||
| addComments(result.properties!.property[member.name], commentMap, i.name, member.name); | ||
| const { properties } = result; | ||
| const prop = convertAttribute(member, result.exposed); | ||
| 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it looks like this can happen more than once, but the code in mergeNamesakes assumes there's only one entry in each There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup, because in line 20 the |
||
| } else if (member.name in properties!.property) { | ||
| const existing = properties!.property[member.name]; | ||
| delete properties!.property[member.name]; | ||
| properties!.namesakes![member.name] = [existing, prop]; | ||
| } else { | ||
| properties!.property[member.name] = prop; | ||
| } | ||
| } | ||
| else if (member.type === "operation" && member.idlType) { | ||
| const operation = convertOperation(member, result.exposed); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just a bugfix right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my intention but looks like this is completely redundant. I'll remove this.