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

[docs] Enable synthetic default imports in TypeScript config #43747

Merged
merged 8 commits into from
Sep 14, 2024

Conversation

morozow
Copy link
Contributor

@morozow morozow commented Sep 13, 2024

Added allowSyntheticDefaultImports to TypeScript configuration for better compatibility with CommonJS modules. This helps to simplify imports and improves integration with various libraries.

Fix #43700

Added `allowSyntheticDefaultImports` to TypeScript configuration for better compatibility with CommonJS modules. This helps to simplify imports and improves integration with various libraries.
Copy link
Member

@Janpot Janpot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable. Thank you!

@Janpot Janpot added the docs Improvements or additions to the documentation label Sep 13, 2024
@morozow
Copy link
Contributor Author

morozow commented Sep 14, 2024

@Janpot I’ve partially tested a solution to comply with a GitHub build checks as I do not have permissions to re-run. However, I haven’t found any information on how to run the expected checks. I tried it locally on CircleCI but the credentials don’t permit some actions. Can we run the remaining checks or is the PR now waiting due to some external reason?

@Janpot Janpot merged commit a24c124 into mui:master Sep 14, 2024
22 checks passed
@morozow
Copy link
Contributor Author

morozow commented Sep 15, 2024

@Janpot It seems that the markdown hasn't been deployed to the website https://mui.com/material-ui/guides/typescript/. The documentation link points to a corrected version yet the production still shows an outdated default tsconfig.json value. Could we re-run circleci or simply update production as the current situation is somewhat confusing?

@Janpot
Copy link
Member

Janpot commented Sep 15, 2024

To avoid having documentation online for unreleased features, we only deploy the docs when we publish a new release. It will be live on the next release.

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have learned a few things here:

1 import React from 'react';
~~~~~

node_modules/.pnpm/@types[email protected]/node_modules/@types/react/index.d.ts:46:1
46 export = React;
~~~~~~~~~~~~~~~
This module is declared with 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Error] Incorrect Import of PropTypes Causes Compilation Error
3 participants