guide: Add bool example to supported types section

This commit is contained in:
Nick Fitzgerald
2018-08-13 16:55:05 -07:00
parent 975a122d6d
commit fedd1a5440
4 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,9 @@
import {
take_char_by_value,
return_char,
} from './guide_supported_types_examples';
take_bool_by_value(true);
let b = return_bool();
console.log(typeof b); // "boolean"

View File

@ -0,0 +1,9 @@
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
pub fn take_bool_by_value(x: bool) {}
#[wasm_bindgen]
pub fn return_bool() -> bool {
true
}

View File

@ -8,3 +8,4 @@ pub mod exported_types;
pub mod str;
pub mod string;
pub mod char;
pub mod bool;