MCPcopy
hub / github.com/lingodotdev/lingo.dev / createPayload

Function createPayload

packages/compiler/src/_base.ts:163–172  ·  view source on GitHub ↗
(input: CompilerInput)

Source from the content-addressed store, hash-verified

161}
162
163export function createPayload(input: CompilerInput): CompilerPayload {
164 const ast = parser.parse(input.code, {
165 sourceType: "module",
166 plugins: ["jsx", "typescript"],
167 });
168 return {
169 ...input,
170 ast,
171 };
172}
173
174export function createOutput(payload: CompilerPayload): CompilerOutput {
175 const generationResult = generate(payload.ast, {}, payload.code);

Callers 15

runFunction · 0.90
runFunction · 0.90
runMutationFunction · 0.90
runMutationFunction · 0.90
runMutationFunction · 0.90
runMutationFunction · 0.90
runMutationFunction · 0.90
runMutationFunction · 0.90
runMutationFunction · 0.90

Calls 1

parseMethod · 0.80

Tested by 12

runFunction · 0.72
runFunction · 0.72
runMutationFunction · 0.72
runMutationFunction · 0.72
runMutationFunction · 0.72
runMutationFunction · 0.72
runMutationFunction · 0.72
runMutationFunction · 0.72
runMutationFunction · 0.72
runMutationFunction · 0.72
getFirstJsxFunction · 0.72
parseFunction · 0.72