-
Notifications
You must be signed in to change notification settings - Fork 30.4k
parse5.d.ts : Wrong interface or method return type. #9235
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
Comments
@Supamiu please send a pull request. I'll review it. |
@vvakame problem is that I don't know which one would be the good fix, since I'm not a parse5 developer, I don't know if I should edit |
Supamiu
pushed a commit
to Supamiu/DefinitelyTyped
that referenced
this issue
May 30, 2016
…able to add attributes to a node, getAttrList() returns an ASTAttribute[] not an Attribute[] because its entries does not contain property 'key' but they do have property 'name'. Fixes DefinitelyTyped#9235
Supamiu
pushed a commit
to Supamiu/DefinitelyTyped
that referenced
this issue
May 30, 2016
…able to add attributes to a node, getAttrList() returns an ASTAttribute[] not an Attribute[] because its entries does not contain property 'key' but they do have property 'name'. Fixes DefinitelyTyped#9235
vvakame
pushed a commit
that referenced
this issue
Jun 2, 2016
* [Fix] Edited getAttrList() signature to fix an issue making parse5 unable to add attributes to a node, getAttrList() returns an ASTAttribute[] not an Attribute[] because its entries does not contain property 'key' but they do have property 'name'. Fixes #9235 * [Fix] Edited getAttrList() signature to fix an issue making parse5 unable to add attributes to a node, getAttrList() returns an ASTAttribute[] not an Attribute[] because its entries does not contain property 'key' but they do have property 'name'. Fixes #9235
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
parse5/parse5.d.ts
file in this repo and had problems.xxxx/xxxx.d.ts
.When you call
treeAdapters.default.getAttrList(node)
you get anAttribute[]
. So, if you want to add an attribute to this node, you have to do something liketreeAdapters.default.getAttrList(node).push({key: 'foo', value:'bar'})
.Problem is that
key
property is ignored, because this should be anASTAttribute[]
orAttribute
interface should havename
instead ofkey
. Since I don't know which one is the good fix, created an issue instead of a PR.The text was updated successfully, but these errors were encountered: