(
componentName: K,
componentState: ComponentStateMap[K],
options?: Pick<AnyComponentConfig, 'title' | 'isClosable' | 'reorderEnabled' | 'width' | 'height'>,
)
| 1066 | * Helper function to create a typed component configuration |
| 1067 | */ |
| 1068 | export function createComponentConfig<K extends keyof ComponentStateMap>( |
| 1069 | componentName: K, |
| 1070 | componentState: ComponentStateMap[K], |
| 1071 | options?: Pick<AnyComponentConfig, 'title' | 'isClosable' | 'reorderEnabled' | 'width' | 'height'>, |
| 1072 | ): ComponentConfig<K> { |
| 1073 | return { |
| 1074 | type: 'component', |
| 1075 | componentName, |
| 1076 | componentState, |
| 1077 | ...options, |
| 1078 | }; |
| 1079 | } |
| 1080 | |
| 1081 | /** |
| 1082 | * Helper function to create a typed layout item |
no outgoing calls
no test coverage detected