MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / createLayoutItem

Function createLayoutItem

static/components.ts:1084–1094  ·  view source on GitHub ↗
(
    type: 'row' | 'column' | 'stack',
    content: ItemConfig[],
    options?: Pick<LayoutItem, 'isClosable' | 'reorderEnabled' | 'width' | 'height' | 'activeItemIndex'>,
)

Source from the content-addressed store, hash-verified

1082 * Helper function to create a typed layout item
1083 */
1084export function createLayoutItem(
1085 type: 'row' | 'column' | 'stack',
1086 content: ItemConfig[],
1087 options?: Pick<LayoutItem, 'isClosable' | 'reorderEnabled' | 'width' | 'height' | 'activeItemIndex'>,
1088): LayoutItem {
1089 return {
1090 type,
1091 content,
1092 ...options,
1093 };
1094}
1095
1096/**
1097 * Helper to convert from GoldenLayout's internal config to our typed config.

Callers 2

startFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected