Skip to content

Commit

Permalink
Feature prelude module
Browse files Browse the repository at this point in the history
  • Loading branch information
HalidOdat committed Jul 31, 2021
1 parent 9e14cb8 commit 6457598
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions boa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ pub mod bytecompiler;
#[cfg(feature = "vm")]
pub mod vm;

/// A convenience module that re-exports the most commonly-used Boa APIs
pub mod prelude {
pub use crate::{
bigint::JsBigInt, object::GcObject as JsObject, string::JsString, value::Value as JsValue,
Context, Result as JsResult,
};
}

use std::result::Result as StdResult;

pub(crate) use crate::{exec::Executable, profiler::BoaProfiler};
Expand Down

0 comments on commit 6457598

Please sign in to comment.