Skip to content

Breaking test for SVG#878

Closed
machty wants to merge 1 commit intomainfrom
fix-svg
Closed

Breaking test for SVG#878
machty wants to merge 1 commit intomainfrom
fix-svg

Conversation

@machty
Copy link
Copy Markdown
Contributor

@machty machty commented Apr 4, 2025

Issue reported in Discord that SVG is yielding incorrect diagnostics for attributes like class.

https://discord.com/channels/480462759797063690/1357364002258424059/1357394721999425748

@patricklx you did work on this stuff recently, do you see an obvious fix?

Undesired diagnostics from this breaking test:

[
        {
          "category": "error",
          "code": 2353,
          "end": {
            "line": 7,
            "offset": 14,
          },
          "start": {
            "line": 7,
            "offset": 9,
          },
          "text": "Object literal may only specify known properties, and 'xmlns' does not exist in type 'Partial<WithDataAttributes<SVGSVGElementAttributes>>'.",
        },
        {
          "category": "error",
          "code": 2353,
          "end": {
            "line": 9,
            "offset": 56,
          },
          "start": {
            "line": 9,
            "offset": 51,
          },
          "text": "Object literal may only specify known properties, and 'class' does not exist in type 'Partial<WithDataAttributes<SVGRectElementAttributes>>'.",
        },
      ]

@patricklx
Copy link
Copy Markdown
Contributor

I think extends GenericAttributes might not be working correctly here?

interface SVGAElementAttributes extends GenericAttributes {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants