MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / getDeviceViewWith

Function getDeviceViewWith

static/components.ts:1023–1043  ·  view source on GitHub ↗
(
    id: number,
    source: string,
    devices: unknown,
    compilerName: string,
    editorid: number,
    treeid: number,
)

Source from the content-addressed store, hash-verified

1021
1022/** Get a device view with the given configuration. */
1023export function getDeviceViewWith(
1024 id: number,
1025 source: string,
1026 devices: unknown,
1027 compilerName: string,
1028 editorid: number,
1029 treeid: number,
1030): ComponentConfig<typeof DEVICE_VIEW_COMPONENT_NAME> {
1031 return {
1032 type: 'component',
1033 componentName: DEVICE_VIEW_COMPONENT_NAME,
1034 componentState: {
1035 id: id,
1036 source: source,
1037 devices: devices,
1038 compilerName: compilerName,
1039 editorid: editorid,
1040 treeid: treeid,
1041 },
1042 };
1043}
1044
1045/** Get an empty explain view component. */
1046export function getExplainView(): ComponentConfig<typeof EXPLAIN_VIEW_COMPONENT_NAME> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected