MCPcopy Index your code
hub / github.com/compiler-explorer/compiler-explorer / createComponentConfig

Function createComponentConfig

static/components.ts:1068–1079  ·  view source on GitHub ↗
(
    componentName: K,
    componentState: ComponentStateMap[K],
    options?: Pick<AnyComponentConfig, 'title' | 'isClosable' | 'reorderEnabled' | 'width' | 'height'>,
)

Source from the content-addressed store, hash-verified

1066 * Helper function to create a typed component configuration
1067 */
1068export 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

Callers 3

getExplainViewFunction · 0.85
getExplainViewWithFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected