transform

Function transform 

Source
pub fn transform(
    filename: String,
    source_text: String,
    options: Option<TransformOptions>,
) -> TransformResult
Expand description

Transpile a JavaScript or TypeScript into a target ECMAScript version.

@param filename The name of the file being transformed. If this is a relative path, consider setting the {@link TransformOptions#cwd} option.. @param sourceText the source code itself @param options The options for the transformation. See {@link TransformOptions} for more information.

@returns an object containing the transformed code, source maps, and any errors that occurred during parsing or transformation.