Skip to content

Commit 0120987

Browse files
authored
Merge pull request #55 from nickbabcock/feature-compile
Emit a compiler error if neither the json or the js features are enabled
2 parents dfc1d32 + 86e03dd commit 0120987

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#![allow(clippy::wrong_self_convention)]
22

3+
#[cfg(not(any(feature = "json", feature = "js")))]
4+
compile_error!(
5+
"Either the \"json\" or \"js\" feature must be enabled for tsify to function properly"
6+
);
7+
38
#[cfg(all(feature = "json", not(feature = "js")))]
49
pub use gloo_utils::format::JsValueSerdeExt;
510
#[cfg(feature = "js")]

0 commit comments

Comments
 (0)