File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
packages/x-tree-view/src/internals Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,9 @@ export type TreeViewPluginSignature<
6767 > ;
6868 }
6969 : { } ;
70- experimentalFeatures : T [ 'experimentalFeatures' ] ;
70+ experimentalFeatures : T extends { experimentalFeatures : string }
71+ ? { [ key in T [ 'experimentalFeatures' ] ] ?: boolean }
72+ : { } ;
7173 dependencies : T extends { dependencies : Array < any > } ? T [ 'dependencies' ] : [ ] ;
7274 optionalDependencies : T extends { optionalDependencies : Array < any > }
7375 ? T [ 'optionalDependencies' ]
Original file line number Diff line number Diff line change @@ -38,4 +38,5 @@ export type TreeViewPublicAPI<
3838
3939export type TreeViewExperimentalFeatures <
4040 TSignatures extends readonly TreeViewAnyPluginSignature [ ] ,
41- > = { [ key in MergeSignaturesProperty < TSignatures , 'experimentalFeatures' > ] ?: boolean } ;
41+ TOptionalSignatures extends readonly TreeViewAnyPluginSignature [ ] = [ ] ,
42+ > = MergeSignaturesProperty < [ ...TSignatures , ...TOptionalSignatures ] , 'experimentalFeatures' > ;
Original file line number Diff line number Diff line change @@ -71,6 +71,6 @@ export const extractPluginParamsFromProps = <
7171 pluginParams : defaultizedPluginParams ,
7272 slots : slots ?? ( { } as any ) ,
7373 slotProps : slotProps ?? ( { } as any ) ,
74- experimentalFeatures : experimentalFeatures ?? { } ,
74+ experimentalFeatures : experimentalFeatures ?? ( { } as any ) ,
7575 } ;
7676} ;
You can’t perform that action at this time.
0 commit comments