MCPcopy Create free account
hub / github.com/observablehq/framework / transformJavaScriptSync

Function transformJavaScriptSync

src/javascript/module.ts:265–267  ·  view source on GitHub ↗
(source: string, loader: "ts" | "jsx" | "tsx", sourcePath?: string)

Source from the content-addressed store, hash-verified

263}
264
265export function transformJavaScriptSync(source: string, loader: "ts" | "jsx" | "tsx", sourcePath?: string): string {
266 return transformSync(source, getTransformOptions(loader, sourcePath)).code;
267}
268
269function getTransformOptions(loader: "ts" | "jsx" | "tsx", sourcePath?: string): TransformOptions {
270 switch (loader) {

Callers 2

transpileJavaScriptFunction · 0.85
readJavaScriptSyncFunction · 0.85

Calls 1

getTransformOptionsFunction · 0.85

Tested by

no test coverage detected