Skip to content

Commit

Permalink
Expose correct types to TS
Browse files Browse the repository at this point in the history
  • Loading branch information
TimDiekmann committed Jan 31, 2025
1 parent 673d8b2 commit 66a0371
Show file tree
Hide file tree
Showing 12 changed files with 354 additions and 26 deletions.
19 changes: 2 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ bumpalo = { version = "=3.16.0", default-features = false }
bytes = { version = "=1.9.0" }
clap_builder = { version = "=4.5.27", default-features = false, features = ["std"] }
criterion = { version = "=0.5.1" }
dashu = { version = "=0.4.2", default-features = false }
dashu-base = { version = "=0.4.1", default-features = false }
dashu-float = { version = "=0.4.3", default-features = false }
deadpool = { version = "=0.12.1", default-features = false }
Expand Down Expand Up @@ -160,7 +159,6 @@ async-scoped = { version = "=0.9.0", default-features = false }
async-trait = { version = "=0.1.85", default-features = false }
aws-config = { version = "=1.5.15" }
aws-sdk-s3 = { version = "=1.71.0", default-features = false }
bigdecimal = { version = "=0.4.7", default-features = false }
bitvec = { version = "=1.0.1", default-features = false }
bytes-utils = { version = "=0.1.4", default-features = false }
clap = { version = "=4.5.27", features = ["color", "error-context", "help", "std", "suggestions", "usage"] }
Expand All @@ -186,7 +184,6 @@ lexical = { version = "=7.0.4", default-features = false }
libp2p = { version = "=0.55.0", default-features = false }
libp2p-stream = { version = "=0.3.0-alpha", default-features = false }
logos = { version = "=0.15.0", default-features = false }
malachite-float = { version = "=0.4.18", default-features = false }
memchr = { version = "=2.7.4", default-features = false }
mimalloc = { version = "=0.1.43", default-features = false }
mime = { version = "=0.3.17", default-features = false }
Expand Down Expand Up @@ -275,7 +272,6 @@ strip = "none"
future_incompatible = { level = "warn", priority = -1 }
nonstandard_style = { level = "warn", priority = -1 }

linker_messages = "allow"
unreachable_pub = "warn"
unsafe_code = "deny"

Expand Down
1 change: 0 additions & 1 deletion libs/@blockprotocol/type-system/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ uuid = { workspace = true, public = true, features = ["v5", "serde",
# Private workspace dependencies

# Private third-party dependencies
bigdecimal = { workspace = true, features = ["serde"] }
derive_more = { workspace = true, features = ["display", "error", "from"] }
futures = { workspace = true }
itertools = { workspace = true, features = ["use_alloc"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ mod codec {
Variable(Variable),
Constant {
#[serde(rename = "const")]
#[cfg_attr(target_arch = "wasm32", tsify(type = "number"))]
value: Real,
#[cfg_attr(feature = "utoipa", schema(inline))]
r#type: NumberTypeTag,
Expand Down
2 changes: 2 additions & 0 deletions libs/@local/codec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ serde = { workspace = true, public = true, optional = true }
bytes = { workspace = true, public = true }
regex = { workspace = true, public = true, optional = true }
tokio-util = { workspace = true, public = true, optional = true, features = ["codec"] }
utoipa = { workspace = true, public = true, optional = true }

# Private workspace dependencies

Expand All @@ -43,6 +44,7 @@ serde = ["dep:serde", "dep:time", "dep:regex"]
harpc = ["dep:harpc-wire-protocol", "dep:tokio-util", "dep:error-stack"]
numeric = ["dep:dashu-base", "dep:dashu-float", "dep:derive_more"]
postgres = ["dep:postgres-types"]
utoipa = ["dep:utoipa"]

[lints]
workspace = true
3 changes: 3 additions & 0 deletions libs/@local/codec/src/numeric/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pub use self::real::{ConversionError, Real};

mod real;
Loading

0 comments on commit 66a0371

Please sign in to comment.