Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript error with skipLibCheck false #1311

Closed
eps1lon opened this issue Apr 24, 2024 · 4 comments · Fixed by #1313
Closed

TypeScript error with skipLibCheck false #1311

eps1lon opened this issue Apr 24, 2024 · 4 comments · Fixed by #1313
Assignees
Labels
bug Something isn't working

Comments

@eps1lon
Copy link
Member

eps1lon commented Apr 24, 2024

          @eps1lon we see type errors since this change:
node_modules/@testing-library/react/types/index.d.ts:129:52 - error TS2344: Type 'Container' does not satisfy the constraint 'Element | DocumentFragment'.
  Type 'Document | Container' is not assignable to type 'Element | DocumentFragment'.
    Type 'Document' is not assignable to type 'Element | DocumentFragment'.
      Type 'Document' is missing the following properties from type 'Element': attributes, classList, className, clientHeight, and 100 more.
        Type 'Container' is not assignable to type 'DocumentFragment'.
          Type 'Document | Container' is not assignable to type 'DocumentFragment'.
            Type 'Document' is not assignable to type 'DocumentFragment'.
              Types of property 'ownerDocument' are incompatible.
                Type 'null' is not assignable to type 'Document'.

can be reproduced with:

mkdir check-testinglib
cd check-testinglib
npm init -y
npm i react react-dom @types/react @types/react-dom typescript @testing-library/react
npx tsc --init --outDir dist --skipLibCheck false
echo "export * from '@testing-library/react';" > test.ts
npx tsc --noEmit

Originally posted by @AviVahl in #1304 (comment)

@eps1lon eps1lon self-assigned this Apr 24, 2024
@AviVahl
Copy link

AviVahl commented Apr 24, 2024

Ah, I should have probably opened the issue. Thanks for that. Much appreciated.

@AviVahl
Copy link

AviVahl commented Apr 26, 2024

thanks for the fix. any chance for a patch release?

@MatanBobi
Copy link
Member

thanks for the fix. any chance for a patch release?

This should be automatic but looks like our CI failed, I'll have a look.

@MatanBobi
Copy link
Member

@AviVahl Re-running did the trick, version 15.0.5 is released with that fix :) Sorry about that and thanks for the ping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants