banira
    Preparing search index...

    Function transpileToEsm

    • Transpiles a single TypeScript source string to a browser-ready ES module: type annotations stripped and relative imports rewritten with a .js extension (via the shared transformer), without type-checking or touching disk. This is the per-file transform behind banira serve --ts, producing the same module shape as a full banira compile of one file.

      The output carries an inline source map (with the original TypeScript embedded) so breakpoints in devtools resolve to the .ts — there is no separate .map file to serve. See #47.

      Parameters

      • source: string
      • fileName: string = 'module.ts'
      • options: CompilerOptions = Compiler.DEFAULT_COMPILER_OPTIONS

      Returns string