axe-core icon indicating copy to clipboard operation
axe-core copied to clipboard

feat(axe.d.ts): add nodeSerializer API

Open hamax opened this issue 1 year ago • 1 comments

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

hamax avatar Aug 01 '24 14:08 hamax

@straker Hey, can you take another look? See inline comment above.

hamax avatar Aug 27 '24 19:08 hamax

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.

straker avatar Aug 29 '24 14:08 straker

Approved for security and validated formatting

dbjorge avatar Sep 24 '24 17:09 dbjorge