Skip to content

Commit

Permalink
Added Todo placeholder type
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierm02 committed Dec 4, 2023
1 parent 8b56315 commit 6307cb4
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions jstz_api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ mod kv;
pub mod encoding;
pub mod http;
pub mod idl;
mod todo;
pub mod url;
pub mod urlpattern;
pub use console::ConsoleApi;
Expand Down
40 changes: 40 additions & 0 deletions jstz_api/src/todo.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
use boa_engine::value::TryFromJs;
use boa_gc::{custom_trace, Finalize, Trace};
use jstz_core::value::IntoJs;

/// A placeholder for types that have yet to be defined
#[derive(Debug)]
pub enum Todo {
Todo,
}

impl Finalize for Todo {
fn finalize(&self) {
todo!()
}
}

#[allow(unused_variables)]
unsafe impl Trace for Todo {
custom_trace!(this, todo!());
}

#[allow(unused_variables)]
impl IntoJs for Todo {
fn into_js(
self,
context: &mut boa_engine::prelude::Context<'_>,
) -> boa_engine::prelude::JsValue {
todo!()
}
}

#[allow(unused_variables)]
impl TryFromJs for Todo {
fn try_from_js(
value: &boa_engine::prelude::JsValue,
context: &mut boa_engine::prelude::Context<'_>,
) -> boa_engine::prelude::JsResult<Self> {
todo!()
}
}

0 comments on commit 6307cb4

Please sign in to comment.