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

[core] Extract MuiPage interface to separate file #32715

Merged
merged 2 commits into from
May 12, 2022

Conversation

cherniavskii
Copy link
Member

@cherniavskii cherniavskii commented May 10, 2022

In MUI X, we want to use MuiPage interface, but since we have noImplicitAny enabled, TS compiler throws the following error:

../node_modules/@mui/monorepo/docs/src/pages.ts(1,22): error TS7016: Could not find a declaration file for module './pagesApi'.

To solve this issue, I've extracted interfaces to a separate file, so that we can use them in MUI X without issues.
pages.ts still exports those interfaces to avoid changes in other parts of the codebase.

I've also updated scopePathnames description to mention that it can use partial pathname (see mui/mui-x#4816)

so that it can be imported without touching pagesApi.js
@cherniavskii cherniavskii added the core Infrastructure work going on behind the scenes label May 10, 2022
@cherniavskii cherniavskii requested a review from mnajdova May 10, 2022 11:17
@mui-bot
Copy link

mui-bot commented May 10, 2022

No bundle size changes

Generated by 🚫 dangerJS against 637f44a

@cherniavskii cherniavskii merged commit a71c55e into mui:master May 12, 2022
@cherniavskii cherniavskii deleted the extract-muipage-type branch May 12, 2022 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants