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

Function getEditorWith

static/components.ts:205–221  ·  view source on GitHub ↗
(
    id: number,
    source: string,
    options: ParseFiltersAndOutputOptions,
    langId: string,
)

Source from the content-addressed store, hash-verified

203
204/** Get an editor component with the given configuration. */
205export function getEditorWith(
206 id: number,
207 source: string,
208 options: ParseFiltersAndOutputOptions,
209 langId: string,
210): ComponentConfig<typeof EDITOR_COMPONENT_NAME> {
211 return {
212 type: 'component',
213 componentName: EDITOR_COMPONENT_NAME,
214 componentState: {
215 id,
216 source,
217 options,
218 lang: langId,
219 },
220 };
221}
222
223/**
224 * Get an empty tree component.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected