-
Notifications
You must be signed in to change notification settings - Fork 788
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(d.ts): improve axe.d.ts types (#4081)
* fix(d.ts): target selector type for shadow dom Before shadow dom support string[] was the correct type for the returned selectors. From code we can see that SerialDqElement.selector is used to populate this, so the type should also be the same. * feat(d.ts): add missing properties to the RelatedNode interface RelatedNode should have the same selectors and the same element reference as NodeResult. These are populated in process-aggregate.js. * fix(d.ts): incomplete message should be optional I think this was unintentionally changed in #3966. From check definitions we can see that many of them don't specify the incomplete message, because they don't have incomplete as a possible result. * feat(d.ts): add stronger typing to Check evaluate and after functions More precise types make it easier to write these function in typescript. With this change, complier knows about this.data, this.async, etc. * feat(d.ts): allow rule.matches to be a function Like evaluate and after, matches can also be a string or a function, but this is not currently represented in types. * fix(d.ts): tags and actIds should be on Rule and not RuleMetadata The rule metadata object expected in this.configure and the one returned by getRules are not the same. From the code we can see that tags and actIds are read from the rule itself and not from the metadata object. * feat(d.ts): add types for more utils and commons functions
- Loading branch information
Showing
2 changed files
with
105 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters