Skip to content

Commit b185bc6

Browse files
authored
fix: export missing WASM types (#263)
## 🎟️ Tracking <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> ## 📔 Objective Fixes: errors introduced by #223 ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes
1 parent 0872274 commit b185bc6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

crates/bitwarden-generators/src/username.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ use reqwest::StatusCode;
55
use schemars::JsonSchema;
66
use serde::{Deserialize, Serialize};
77
use thiserror::Error;
8+
#[cfg(feature = "wasm")]
9+
use tsify_next::Tsify;
810

911
use crate::util::capitalize_first_letter;
1012

@@ -26,6 +28,7 @@ pub enum UsernameError {
2628
#[derive(Serialize, Deserialize, Debug, JsonSchema)]
2729
#[serde(rename_all = "camelCase", deny_unknown_fields)]
2830
#[cfg_attr(feature = "uniffi", derive(uniffi::Enum))]
31+
#[cfg_attr(feature = "wasm", derive(Tsify), tsify(into_wasm_abi, from_wasm_abi))]
2932
pub enum AppendType {
3033
/// Generates a random string of 8 lowercase characters as part of your username
3134
Random,
@@ -36,6 +39,11 @@ pub enum AppendType {
3639
#[derive(Serialize, Deserialize, Debug, JsonSchema)]
3740
#[serde(rename_all = "camelCase", deny_unknown_fields)]
3841
#[cfg_attr(feature = "uniffi", derive(uniffi::Enum))]
42+
#[cfg_attr(
43+
feature = "wasm",
44+
derive(tsify_next::Tsify),
45+
tsify(into_wasm_abi, from_wasm_abi)
46+
)]
3947
/// Configures the email forwarding service to use.
4048
/// For instructions on how to configure each service, see the documentation:
4149
/// <https://bitwarden.com/help/generator/#username-types>

0 commit comments

Comments
 (0)