Skip to content

Commit

Permalink
rename quit-serde to no-serde-warnings, add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
NyxCode committed Jan 11, 2024
1 parent 9657feb commit 3a79cea
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ When running `cargo test`, the TypeScript bindings will be exported to the file

Implement `TS` for `Vec` from heapless

- `no-serde-warnings`

When `serde-compat` is enabled, warnings are printed during build if unsupported serde
attributes are encountered. Enabling this feature silences these warnings.


If there's a type you're dealing with which doesn't implement `TS`, use `#[ts(type = "..")]` or open a PR.

Expand All @@ -127,7 +132,7 @@ Supported serde attributes:
- `flatten`
- `default`

When ts-rs encounters an unsupported serde attribute, a warning is emitted.
When ts-rs encounters an unsupported serde attribute, a warning is emitted, unless the feature `no-serde-warnings` is enabled.

### contributing
Contributions are always welcome!
Expand Down
2 changes: 1 addition & 1 deletion macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repository = "https://github.com/Aleph-Alpha/ts-rs"

[features]
serde-compat = ["termcolor"]
quiet-serde = []
no-serde-warnings = []

[lib]
proc-macro = true
Expand Down
2 changes: 1 addition & 1 deletion ts-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ default = ["serde-compat"]
indexmap-impl = ["indexmap"]
ordered-float-impl = ["ordered-float"]
heapless-impl = ["heapless"]
quiet-serde = ["ts-rs-macros/quiet-serde"]
no-serde-warnings = ["ts-rs-macros/no-serde-warnings"]

[dev-dependencies]
serde = { version = "1.0", features = ["derive"] }
Expand Down
7 changes: 6 additions & 1 deletion ts-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@
//!
//! Implement `TS` for `Vec` from heapless
//!
//! - `no-serde-warnings`
//!
//! When `serde-compat` is enabled, warnings are printed during build if unsupported serde
//! attributes are encountered. Enabling this feature silences these warnings.
//!
//!
//! If there's a type you're dealing with which doesn't implement `TS`, use `#[ts(type = "..")]` or open a PR.
//!
Expand All @@ -125,7 +130,7 @@
//! - `flatten`
//! - `default`
//!
//! When ts-rs encounters an unsupported serde attribute, a warning is emitted.
//! When ts-rs encounters an unsupported serde attribute, a warning is emitted, unless the feature `no-serde-warnings` is enabled.
//!
//! ## contributing
//! Contributions are always welcome!
Expand Down

0 comments on commit 3a79cea

Please sign in to comment.