(content: string, tag: "ts" | "jsx" | "tsx")
| 65 | } |
| 66 | |
| 67 | function transpileJavaScript(content: string, tag: "ts" | "jsx" | "tsx"): string { |
| 68 | try { |
| 69 | return transformJavaScriptSync(content, tag); |
| 70 | } catch (error: any) { |
| 71 | throw new SyntaxError(error.message); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | function getLiveSource(content: string, tag: string, attributes: Record<string, string>): string | undefined { |
| 76 | return tag === "js" |
no test coverage detected