2020-01-02 15:13:47 -05:00
|
|
|
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
2020-01-05 11:56:18 -05:00
|
|
|
use deno_core::ErrBox;
|
2019-07-31 13:16:03 -04:00
|
|
|
use futures::Future;
|
|
|
|
|
|
|
|
mod js;
|
|
|
|
mod json;
|
|
|
|
mod ts;
|
2019-11-14 08:31:39 -05:00
|
|
|
mod wasm;
|
2019-07-31 13:16:03 -04:00
|
|
|
|
|
|
|
pub use js::JsCompiler;
|
|
|
|
pub use json::JsonCompiler;
|
|
|
|
pub use ts::TsCompiler;
|
2019-11-14 08:31:39 -05:00
|
|
|
pub use wasm::WasmCompiler;
|
2019-07-31 13:16:03 -04:00
|
|
|
|
|
|
|
#[derive(Debug, Clone)]
|
|
|
|
pub struct CompiledModule {
|
|
|
|
pub code: String,
|
|
|
|
pub name: String,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub type CompiledModuleFuture =
|
2019-11-16 19:17:47 -05:00
|
|
|
dyn Future<Output = Result<CompiledModule, ErrBox>> + Send;
|