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

Function fromGoldenLayoutConfig

static/components.ts:1110–1120  ·  view source on GitHub ↗
(config: GoldenLayout.Config)

Source from the content-addressed store, hash-verified

1108 * @throws Error if the configuration is invalid (should be caught and handled)
1109 */
1110export function fromGoldenLayoutConfig(config: GoldenLayout.Config): GoldenLayoutConfig {
1111 if (!config || typeof config !== 'object') {
1112 throw new Error('Invalid configuration: must be an object');
1113 }
1114
1115 // Validate the root structure
1116 return {
1117 ...config,
1118 content: config.content ? validateItemConfigs(config.content) : undefined,
1119 };
1120}
1121
1122/**
1123 * Validates an array of item configurations (recursive)

Callers 1

Calls 1

validateItemConfigsFunction · 0.85

Tested by

no test coverage detected