Skip to main content
Module

x/ts_serve/mod.ts

Transpile TypeScript on the fly and deliver it from your server as ES Modules.
Latest
import * as tsServe from "https://deno.land/x/ts_serve@v1.4.4/mod.ts";

Enums

File type. You can pass it as an option to the transpile function to tell it what media type the source is.

Functions

Calling this function will load the wasm file used in the deno_emit of the dependency. Even if you don't call this function, if you call the transpile function, the wasm file will be read automatically at that timing. However, performance can be an issue on the server as loading the wasm file takes time. In that case, calling this function in advance can speed up later calls to the transpile function.

This can be used in the same way as the serveDir function of the standard library, but if the file is TypeScript, it will be rewritten to JavaScript.

This can be used in the same way as the serveFile function of the standard library, but if the file is TypeScript, it will be rewritten to JavaScript.

Transpile the given TypeScript code into JavaScript code.

Oak middleware that rewrites TypeScript response to JavaScript response.

Interfaces

Interface for serveDir options.

Interface for serveFile options.