Skip to content

Repo: v6 branch regression for adding to JSX.IntrinsicAttributes in typecheck task #7166

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Suggestion

On the v6 branch, we now get typecheck (tsc) complaints in ast-spec's fixture for augmenting JSX.IntrinsicElements:

 ~/repos/typescript-eslint/packages/ast-spec $ yarn typecheck
yarn run v1.22.19
$ tsc -p tsconfig.json --noEmit
src/jsx/JSXNamespacedName/fixtures/component-dashed/fixture.tsx:8:24 - error TS2339: Property 'foo' does not exist on type 'JSX.IntrinsicElements'.

8 const componentBasic = <foo />;
                         ~~~~~~~

src/jsx/JSXNamespacedName/fixtures/component-dashed/fixture.tsx:9:25 - error TS2339: Property 'foo-bar:baz-bam' does not exist on type 'JSX.IntrinsicElements'.

9 const componentDashed = <foo-bar:baz-bam />;
                          ~~~~~~~~~~~~~~~~~~~


Found 2 errors in the same file, starting at: src/jsx/JSXNamespacedName/fixtures/component-dashed/fixture.tsx:8

It happens both for traditional names (e.g. foo) and for TypeScript 5.1's new namespaced names (e.g. 'foo-bar:baz-bam') added in #7088. So I don't think it's specific to TS 5.1's namespace changes.

But... why is this happening? Why is the fixture not allowing augmentation of JSX.IntrinsicElements?

I'm 80% confident this is a silly little mistake I made in merging main -> v6, but can't figure it out... :sob

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workingrepo maintenancethings to do with maintenance of the repo, and not with code/docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy