Deno.emit()
Deno.bundle, Deno.compile, Deno.transpileOnly の 3 APIs が一つになって Deno.emit になった (Deno@v1.7.0〜)
TSC の出力をラップする 3つの API が一つの API に統合された
使用上の注意
要--unstable
使い方
deno run
deno bundle
remoteからmoduleをとってくる場合は--allow-netが必要
code:ts
const { files, diagnostics } = await Deno.emit('./your-script.ts', {bundle: 'module',});
References
公式manual
refactor(cli): runtime compiler APIs consolidated to Deno.emit() by kitsonk · Pull Request #8799 · denoland/deno