From 8987dbf8d26ae7b23b4b499db403dc1ad2b557d7 Mon Sep 17 00:00:00 2001 From: Halid Odat Date: Sun, 15 Aug 2021 04:46:40 +0200 Subject: [PATCH] Feature prelude module (#1451) --- boa/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/boa/src/lib.rs b/boa/src/lib.rs index ec46f90ad2..c7f31081ed 100644 --- a/boa/src/lib.rs +++ b/boa/src/lib.rs @@ -62,6 +62,13 @@ 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::{ + object::GcObject as JsObject, Context, JsBigInt, JsString, JsValue, Result as JsResult, + }; +} + use std::result::Result as StdResult; pub(crate) use crate::{exec::Executable, profiler::BoaProfiler};