mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
4.15k stars 1.3k forks source link

[data grid] type and must be imported using a type-only import when `verbatimModuleSyntax` is enabled. #14147

Closed damisparks closed 2 months ago

damisparks commented 2 months ago

Steps to reproduce

No response

Current behavior

When we run our type-check: We have the following errors.

> tsc

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.itemPlugin.ts:3:3 - error TS1484: 'MuiCancellableEvent' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

3   MuiCancellableEvent,
    ~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.itemPlugin.ts:4:3 - error TS1484: 'TreeViewItemPlugin' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

4   TreeViewItemPlugin,
    ~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.itemPlugin.ts:6:3 - error TS1484: 'UseTreeViewItemsSignature' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

6   UseTreeViewItemsSignature,
    ~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.itemPlugin.ts:9:10 - error TS1484: 'TreeItem2Props' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

9 import { TreeItem2Props } from '@mui/x-tree-view/TreeItem2';
           ~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.itemPlugin.ts:11:3 - error TS1484: 'UseTreeItem2DragAndDropOverlaySlotPropsFromItemsReordering' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

11   UseTreeItem2DragAndDropOverlaySlotPropsFromItemsReordering,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.itemPlugin.ts:12:3 - error TS1484: 'UseTreeItem2RootSlotPropsFromItemsReordering' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

12   UseTreeItem2RootSlotPropsFromItemsReordering,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.itemPlugin.ts:13:3 - error TS1484: 'UseTreeViewItemsReorderingSignature' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

13   UseTreeViewItemsReorderingSignature,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.itemPlugin.ts:14:3 - error TS1484: 'TreeViewItemItemReorderingValidActions' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

14   TreeViewItemItemReorderingValidActions,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.itemPlugin.ts:15:3 - error TS1484: 'UseTreeItem2ContentSlotPropsFromItemsReordering' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

15   UseTreeItem2ContentSlotPropsFromItemsReordering,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.ts:2:20 - error TS1484: 'TreeViewPlugin' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

2 import { warnOnce, TreeViewPlugin } from '@mui/x-tree-view/internals';
                     ~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.ts:3:10 - error TS1484: 'TreeViewItemsReorderingAction' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

3 import { TreeViewItemsReorderingAction } from '@mui/x-tree-view/models';
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.ts:5:3 - error TS1484: 'TreeViewItemItemReorderingValidActions' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

5   TreeViewItemItemReorderingValidActions,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.ts:6:3 - error TS1484: 'TreeViewItemReorderPosition' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

6   TreeViewItemReorderPosition,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.ts:7:3 - error TS1484: 'UseTreeViewItemsReorderingInstance' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

7   UseTreeViewItemsReorderingInstance,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.ts:8:3 - error TS1484: 'UseTreeViewItemsReorderingSignature' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

8   UseTreeViewItemsReorderingSignature,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.types.ts:3:3 - error TS1484: 'DefaultizedProps' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

3   DefaultizedProps,
    ~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.types.ts:4:3 - error TS1484: 'TreeViewPluginSignature' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

4   TreeViewPluginSignature,
    ~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.types.ts:5:3 - error TS1484: 'UseTreeViewItemsSignature' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

5   UseTreeViewItemsSignature,
    ~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.types.ts:6:3 - error TS1484: 'MuiCancellableEventHandler' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

6   MuiCancellableEventHandler,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.types.ts:8:10 - error TS1484: 'TreeViewItemId' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

8 import { TreeViewItemId, TreeViewItemsReorderingAction } from '@mui/x-tree-view/models';
           ~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.types.ts:8:26 - error TS1484: 'TreeViewItemsReorderingAction' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

8 import { TreeViewItemId, TreeViewItemsReorderingAction } from '@mui/x-tree-view/models';
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.types.ts:9:10 - error TS1484: 'TreeItem2DragAndDropOverlayProps' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

9 import { TreeItem2DragAndDropOverlayProps } from '@mui/x-tree-view/TreeItem2DragAndDropOverlay';
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.utils.ts:2:3 - error TS1484: 'TreeViewInstance' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

2   TreeViewInstance,
    ~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.utils.ts:3:3 - error TS1484: 'UseTreeViewItemsSignature' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

3   UseTreeViewItemsSignature,
    ~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.utils.ts:4:3 - error TS1484: 'UseTreeViewItemsState' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

4   UseTreeViewItemsState,
    ~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.utils.ts:8:10 - error TS1484: 'TreeViewItemId' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

8 import { TreeViewItemId, TreeViewItemsReorderingAction } from '@mui/x-tree-view/models';
           ~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.utils.ts:8:26 - error TS1484: 'TreeViewItemsReorderingAction' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

8 import { TreeViewItemId, TreeViewItemsReorderingAction } from '@mui/x-tree-view/models';
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.utils.ts:10:3 - error TS1484: 'TreeViewItemItemReorderingValidActions' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

10   TreeViewItemItemReorderingValidActions,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.utils.ts:11:3 - error TS1484: 'TreeViewItemReorderPosition' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

11   TreeViewItemReorderPosition,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.plugins.ts:3:3 - error TS1484: 'UseTreeViewItemsParameters' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

3   UseTreeViewItemsParameters,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.plugins.ts:5:3 - error TS1484: 'UseTreeViewExpansionParameters' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

5   UseTreeViewExpansionParameters,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.plugins.ts:7:3 - error TS1484: 'UseTreeViewSelectionParameters' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

7   UseTreeViewSelectionParameters,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.plugins.ts:9:3 - error TS1484: 'UseTreeViewFocusParameters' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

9   UseTreeViewFocusParameters,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.plugins.ts:12:3 - error TS1484: 'UseTreeViewIconsParameters' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

12   UseTreeViewIconsParameters,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.plugins.ts:13:3 - error TS1484: 'ConvertPluginsIntoSignatures' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

13   ConvertPluginsIntoSignatures,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.plugins.ts:14:3 - error TS1484: 'MergeSignaturesProperty' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

14   MergeSignaturesProperty,
     ~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.plugins.ts:15:3 - error TS1484: 'TreeViewCorePluginParameters' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

15   TreeViewCorePluginParameters,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.plugins.ts:19:3 - error TS1484: 'UseTreeViewItemsReorderingParameters' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

19   UseTreeViewItemsReorderingParameters,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.tsx:6:20 - error TS1484: 'TreeItemProps' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

6 import { TreeItem, TreeItemProps } from '@mui/x-tree-view/TreeItem';
                     ~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.tsx:10:10 - error TS1484: 'RichTreeViewProProps' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

10 import { RichTreeViewProProps } from './RichTreeViewPro.types';
            ~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.tsx:13:3 - error TS1484: 'RichTreeViewProPluginSignatures' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

13   RichTreeViewProPluginSignatures,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.types.ts:2:10 - error TS1484: 'Theme' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

2 import { Theme } from '@mui/material/styles';
           ~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.types.ts:3:10 - error TS1484: 'SxProps' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

3 import { SxProps } from '@mui/system';
           ~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.types.ts:4:10 - error TS1484: 'SlotComponentProps' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

4 import { SlotComponentProps } from '@mui/utils';
           ~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.types.ts:5:20 - error TS1484: 'TreeItemProps' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

5 import { TreeItem, TreeItemProps } from '@mui/x-tree-view/TreeItem';
                     ~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.types.ts:6:10 - error TS1484: 'TreeItem2Props' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

6 import { TreeItem2Props } from '@mui/x-tree-view/TreeItem2';
           ~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.types.ts:7:10 - error TS1484: 'TreeViewItemId' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

7 import { TreeViewItemId } from '@mui/x-tree-view/models';
           ~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.types.ts:8:10 - error TS1484: 'TreeViewPublicAPI' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

8 import { TreeViewPublicAPI, TreeViewExperimentalFeatures } from '@mui/x-tree-view/internals';
           ~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.types.ts:8:29 - error TS1484: 'TreeViewExperimentalFeatures' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

8 import { TreeViewPublicAPI, TreeViewExperimentalFeatures } from '@mui/x-tree-view/internals';
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.types.ts:9:10 - error TS1484: 'RichTreeViewProClasses' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

9 import { RichTreeViewProClasses } from './richTreeViewProClasses';
           ~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.types.ts:11:3 - error TS1484: 'RichTreeViewProPluginParameters' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

11   RichTreeViewProPluginParameters,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.types.ts:12:3 - error TS1484: 'RichTreeViewProPluginSlotProps' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

12   RichTreeViewProPluginSlotProps,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.types.ts:13:3 - error TS1484: 'RichTreeViewProPluginSlots' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

13   RichTreeViewProPluginSlots,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.types.ts:14:3 - error TS1484: 'RichTreeViewProPluginSignatures' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled.

14   RichTreeViewProPluginSignatures,
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 54 errors in 7 files.

Errors  Files
     9  node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.itemPlugin.ts:3
     6  node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.ts:2
     7  node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.types.ts:3
     7  node_modules/@mui/x-tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.utils.ts:2
     9  node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.plugins.ts:3
     3  node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.tsx:6
    13  node_modules/@mui/x-tree-view-pro/src/RichTreeViewPro/RichTreeViewPro.types.ts:2

Expected behavior

The expected behaviour is that our type-check should not throw an error. We are using DataGridPro, Date and Time Pickers Pro, and we do not have types issues.

Context

In our tsconfig.json we have the following configuration.

{
  "$schema": "https://json.schemastore.org/tsconfig",
  "compilerOptions": {
    "allowJs": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true,
    "verbatimModuleSyntax": true, // NOTE THIS
    "maxNodeModuleJsDepth": 10,
    "module": "esnext",
    "moduleResolution": "bundler",
    "noEmit": true,
    "strict": true,
    "target": "es2022",
    "jsx": "react-jsx"
  },
  "typeAcquisition": {
    "enable": false
  },
  "include": ["**/.*", "**/.*/**/*", "**/*"],
  "exclude": ["components", "constants", "utils", "storybook-static"]
}

If we remove the verbatimModuleSyntax or set it to false in our tsconfig.json, there are no errors.

Question

If those imports are used as types, why not add the type modifier or are there any side effects?

Your environment

npx @mui/envinfo ``` System: OS: macOS 14.6.1 Binaries: Node: 20.14.0 - ~/.nvm/versions/node/v20.14.0/bin/node npm: 10.8.1 - ~/.nvm/versions/node/v20.14.0/bin/npm pnpm: 8.12.0 - ~/.nvm/versions/node/v20.14.0/bin/pnpm Browsers: Chrome: 127.0.6533.100 Edge: 127.0.2651.98 Safari: 17.6 npmPackages: @emotion/react: 11.13.0 @emotion/styled: ^11.11.5 => 11.13.0 @mui/base: ^5.0.0-beta.46 => 5.0.0-dev.20240529-082515-213b5e33ab @mui/core-downloads-tracker: 5.16.6 @mui/icons-material: ^5.15.18 => 5.16.6 @mui/material: ^5.15.18 => 5.16.6 @mui/private-theming: 5.16.6 @mui/styled-engine: 5.16.6 @mui/system: 5.16.6 @mui/types: 7.2.15 @mui/utils: ^5.15.14 => 5.16.6 @mui/x-data-grid: 7.12.0 @mui/x-data-grid-pro: ^7.7.0 => 7.12.0 @mui/x-date-pickers: 7.12.0 @mui/x-date-pickers-pro: ^7.11.1 => 7.12.0 @mui/x-internals: 7.12.0 @mui/x-license: ^7.0.0 => 7.12.0 @mui/x-tree-view: 7.12.0 @mui/x-tree-view-pro: ^7.12.0 => 7.12.0 @types/react: ^18.2.79 => 18.3.3 react: ^18.2.0 => 18.3.1 react-dom: ^18.2.0 => 18.3.1 typescript: ^5.2.2 => 5.5.4 ```

Search keywords: [tree view] type-only Order ID: 79397

alexfauquette commented 2 months ago

We are using DataGridPro, Date and Time Pickers Pro, and we do not have types issues.

That's a bit weird because the data grid uses the same pattern to import from the internals with a mix of interfaces and functions. And if I add the verbatimModuleSyntax in the tsconfig.json of the data grid pro, I get similar errors

https://github.com/mui/mui-x/blob/668a1c6713e72bface1b6684a4a8949190dc1ee4/packages/x-data-grid-pro/src/hooks/features/columnPinning/useGridColumnPinningPreProcessors.ts#L2-L9

Maybe because the tree-view-pro publish it's current directory and not the build one πŸ™ˆ

alexfauquette commented 2 months ago

@damisparks could you try again with fthe following version of the package?

"@mui/x-tree-view-pro": "https://pkg.csb.dev/mui/mui-x/commit/1122e42d/@mui/x-tree-view"

To do so, you can copy the previous line in you package.json and run the installation command. It would help to know if the PR solves your issue or if we need to continue investigating

damisparks commented 2 months ago

@alexfauquette Thanks for the swift response. I appreciate you. LGTM πŸ‘πŸΎ No more errors

github-actions[bot] commented 2 months ago

:warning: 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.

@damisparks: 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.