axe-core
axe-core copied to clipboard
feat(axe.d.ts): add nodeSerializer API
This API was added in pr #4093, but TS definitions were never added.
For simplicity I'm using SerialDqElement in the API. We could introduce a generic for the custom serialized type (T extends SerialDqElement), but it's hard to consistently use it everywhere (AxeReporter, NodeSerializer.dqElmToSpec).
I also fixed DqElement.mergeSpecs which is needed to implement a custom node serializer: it exists on the constructor and not on the individual instances
@straker Hey, can you take another look? See inline comment above.
Apologies, didn't see the reply you gave earlier. I'm currently working on fixing our broken unit tests and then I can take another look at this.
Approved for security and validated formatting