( source: string, loader: "ts" | "jsx" | "tsx", sourcePath?: string )
| 255 | } |
| 256 | |
| 257 | export async function transformJavaScript( |
| 258 | source: string, |
| 259 | loader: "ts" | "jsx" | "tsx", |
| 260 | sourcePath?: string |
| 261 | ): Promise<string> { |
| 262 | return (await transform(source, getTransformOptions(loader, sourcePath))).code; |
| 263 | } |
| 264 | |
| 265 | export function transformJavaScriptSync(source: string, loader: "ts" | "jsx" | "tsx", sourcePath?: string): string { |
| 266 | return transformSync(source, getTransformOptions(loader, sourcePath)).code; |
no test coverage detected