Skip to content

Commit

Permalink
dirty fix for specta-rs#174 (temp)
Browse files Browse the repository at this point in the history
  • Loading branch information
bennobuilder committed Nov 22, 2023
1 parent 8614c3c commit df9dfa3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ glam = { version = "0.24", optional = true, default-features = false, features =
tokio = { version = "1.30", optional = true, default-features = false, features = ["sync"] }
url = { version = "2.4.0", optional = true, default-features = false }
either = { version = "1.9.0", optional = true, default-features = false }
bevy_ecs = { version = "0.12", optional = true, default-features = false }
bevy_ecs = { version = "0.12.0", optional = true, default-features = false }
thiserror = "1.0.44"
paste = "1.0.14"
ctor = { version = "0.2.4", optional = true }
Expand Down
4 changes: 3 additions & 1 deletion src/lang/ts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,9 @@ fn struct_datatype(ctx: ExportContext, key: &str, s: &StructType, type_map: &Typ
let fields = skip_fields_named(s.fields()).collect::<Vec<_>>();

if fields.is_empty() {
return Ok(format!("Record<{STRING}, {NEVER}>"));
// Temp dirty fix until https://github.com/oscartbeaumont/specta/issues/174 resolved
return Ok(String::from("{ /* empty */ }"));
// return Ok(format!("Record<{STRING}, {NEVER}>"));
}

let (flattened, non_flattened): (Vec<_>, Vec<_>) =
Expand Down

0 comments on commit df9dfa3

Please sign in to comment.