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

[pickers] Cannot compile in TypeScript with skipLibCheck: false #14895

Closed
jcrang opened this issue Oct 9, 2024 · 4 comments · Fixed by #14896
Closed

[pickers] Cannot compile in TypeScript with skipLibCheck: false #14895

jcrang opened this issue Oct 9, 2024 · 4 comments · Fixed by #14896
Assignees
Labels
component: pickers This is the name of the generic UI component, not the React module! regression A bug, but worse typescript

Comments

@jcrang
Copy link

jcrang commented Oct 9, 2024

Steps to reproduce

Link to live example: (required)

https://stackblitz.com/edit/react-5frnjq?file=tsconfig.json,Demo.tsx,node_modules%2F%40mui%2Fx-date-pickers-pro%2FDateRangePicker%2Findex.d.ts,node_modules%2F%40mui%2Fx-date-pickers-pro%2FDateRangePicker%2FDateRangePickerToolbar.d.ts

Steps:

  1. Open DateRangePickerToolbar.d.ts

Make sure to have skipLibCheck set to false in tsconfig.json.

Current behavior

TypeScript compiler errors shown under import("luxon") and import("moment")

image

Expected behavior

No TypeScript compiler errors

Context

No response

Your environment

npx @mui/envinfo
  System:
    OS: Windows 11 10.0.22631
  Binaries:
    Node: 22.9.0 - ~\AppData\Local\fnm_multishells\2744_1728469629967\node.EXE
    npm: 10.8.3 - ~\AppData\Local\fnm_multishells\2744_1728469629967\npm.CMD
    pnpm: 9.4.0 - ~\AppData\Local\pnpm\pnpm.EXE
  Browsers:
    Chrome: Not Found
    Edge: Chromium (128.0.2739.54)
  npmPackages:
    @emotion/react: 11.13.3 => 11.13.3
    @emotion/styled: 11.13.0 => 11.13.0
    @mui/core-downloads-tracker:  6.1.2
    @mui/icons-material: 6.1.2 => 6.1.2
    @mui/material: 6.1.2 => 6.1.2
    @mui/private-theming:  6.1.2
    @mui/styled-engine:  6.1.2
    @mui/system:  6.1.2
    @mui/types:  7.2.17
    @mui/utils:  5.16.6
    @mui/x-data-grid:  7.19.0
    @mui/x-data-grid-pro: 7.19.0 => 7.19.0
    @mui/x-date-pickers:  7.19.0
    @mui/x-date-pickers-pro: 7.19.0 => 7.19.0
    @mui/x-internals:  7.18.0
    @mui/x-license:  7.18.0
    @types/react: 18.3.11 => 18.3.11
    react: 18.3.1 => 18.3.1
    react-dom: 18.3.1 => 18.3.1
    typescript: 5.6.2 => 5.6.2

Search keywords: skipLibCheck luxon moment pickers

@jcrang jcrang added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 9, 2024
@github-actions github-actions bot added the component: pickers This is the name of the generic UI component, not the React module! label Oct 9, 2024
@jcrang jcrang changed the title Cannot compile TypeScript with skipLibCheck: false Cannot compile in TypeScript with skipLibCheck: false Oct 9, 2024
@flaviendelangle
Copy link
Member

flaviendelangle commented Oct 9, 2024

Hey
Thanks for your report
I can confirm that we have mention of all the date libraries on our bundle and that it's a clear regression..

This has probably been introduced in #14771, I see how we can keep the improvement without having this issue

@flaviendelangle flaviendelangle added regression A bug, but worse typescript and removed bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Oct 9, 2024
@flaviendelangle flaviendelangle changed the title Cannot compile in TypeScript with skipLibCheck: false [pickers] Cannot compile in TypeScript with skipLibCheck: false Oct 9, 2024
@flaviendelangle
Copy link
Member

Weirdly enough #14896 fixes it...

Copy link

github-actions bot commented Oct 9, 2024

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

@jcrang How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

@flaviendelangle
Copy link
Member

flaviendelangle commented Oct 9, 2024

The fix should be released tomorrow or on Friday 👍
Until then, staying on version 7.18.0 or below should fix your issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! regression A bug, but worse typescript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants