diff --git a/crates/cli/tests/reference/echo.d.ts b/crates/cli/tests/reference/echo.d.ts index d5b187aa985..7f72b5e2d34 100644 --- a/crates/cli/tests/reference/echo.d.ts +++ b/crates/cli/tests/reference/echo.d.ts @@ -57,5 +57,6 @@ export function echo_option_vec_string(a?: (string)[]): (string)[] | undefined; export function echo_option_struct(a?: Foo): Foo | undefined; export function echo_option_vec_struct(a?: (Foo)[]): (Foo)[] | undefined; export class Foo { + private constructor(); free(): void; } diff --git a/crates/typescript-tests/src/getters_setters.rs b/crates/typescript-tests/src/getters_setters.rs index a58a64ed028..7bc14119199 100644 --- a/crates/typescript-tests/src/getters_setters.rs +++ b/crates/typescript-tests/src/getters_setters.rs @@ -3,9 +3,9 @@ use wasm_bindgen::prelude::*; #[wasm_bindgen] pub struct ColorWithGetters { r: f64, - g: f64, - b: f64, - a: u8, + _g: f64, + _b: f64, + _a: u8, } #[wasm_bindgen] @@ -14,9 +14,9 @@ impl ColorWithGetters { pub fn new() -> Self { Self { r: 0.0, - g: 0.0, - b: 0.0, - a: 0, + _g: 0.0, + _b: 0.0, + _a: 0, } } @@ -34,8 +34,8 @@ impl ColorWithGetters { #[wasm_bindgen] pub struct ColorWithSetters { r: f64, - g: f64, - b: f64, + _g: f64, + _b: f64, a: u8, } @@ -45,8 +45,8 @@ impl ColorWithSetters { pub fn new() -> Self { Self { r: 0.0, - g: 0.0, - b: 0.0, + _g: 0.0, + _b: 0.0, a: 0, } } @@ -70,8 +70,8 @@ impl ColorWithSetters { #[wasm_bindgen] pub struct ColorWithGetterAndSetter { r: f64, - g: f64, - b: f64, + _g: f64, + _b: f64, a: u8, } @@ -81,8 +81,8 @@ impl ColorWithGetterAndSetter { pub fn new() -> Self { Self { r: 0.0, - g: 0.0, - b: 0.0, + _g: 0.0, + _b: 0.0, a: 0, } }