Open dherman opened 1 year ago
It would be nice to have convenience types for common globals like console, process, and JSON. We could imagine it might look something like:
console
process
JSON
struct Console<'a> { /* ... */ } impl<'a> Console<'a> { pub fn log<'cx, C: Context<'cx>, A: Arguments>(cx: &mut C, args: A) -> NeonResult<()> { todo!() } } let console: Console = cx.console()?; let hello = cx.string("Hello, World!"); console.log(&mut cx, (hello,));
It would be nice to have convenience types for common globals like
console
,process
, andJSON
. We could imagine it might look something like: