Commit Graph
221 Commits
Author SHA1 Message Date
Moritz Bischof f9bba02cc7 rename TS::Generics to TS::WithoutGenerics 2024-02-23 17:03:53 +01:00
Gustavo ee733be294 Implement TS::Generics 2024-02-23 08:45:39 -03:00
Moritz Bischof 9a385d29ce adjust impl_wrapper!, fix clippy warning 2024-02-22 20:23:26 +01:00
Moritz Bischof 44998d4f92 implement proposed fix 2024-02-22 19:53:06 +01:00
Gustavo 01615feb3a Replace if Some else None with bool::then 2024-02-21 14:59:00 -03:00
Gustavo 268742d479 Fix inverted condition and separate the two checks 2024-02-19 11:43:52 -03:00
Gustavo 3354dc744c Remove unused Option 2024-02-19 11:43:18 -03:00
Gustavo 6d9a21f43c Remove redundant clones 2024-02-19 11:42:40 -03:00
Gustavo b4f6b01b21 Prefer renaming Enum to using all variants 2024-02-19 10:56:59 -03:00
Gustavo a693b60683 use DerivedTS::ts_name instead of rust_ty 2024-02-16 11:21:55 -03:00
Gustavo bae3df8a9b Add dummy type to allow exporting types that use ToString as a generic trait bound 2024-02-16 11:17:43 -03:00
Gustavo 3e31a3a95a Add ident method 2024-02-16 11:02:00 -03:00
Gustavo 5ab4aa9d7c Use type_params to simplify capture of Generics' identifiers 2024-02-16 08:57:42 -03:00
Moritz Bischof cab0908d1b Dependency::from_ty - remove generic params from name 2024-02-16 10:55:58 +01:00
Moritz Bischof 5daeed248d re-implement handeling of generics 2024-02-15 22:18:34 +01:00
escritorio-gustavo ed9abd3067 Update format_docs doc comment 2024-02-12 14:02:35 -03:00
Tim Guggenmos c7094375a7 feat: Add functionality to export doc strings on struct fields and enum variants (#229)
* exporting docs on struct fields now works
* trim trailing whitespace at the end of doc comments
2024-02-12 11:02:21 -03:00
Sammy Harris 823abfd488 Feat: add default export directory override (#195)
* feat: default export path
* added docs
* document why __private mod is pub
* add default env dir test to ci
* add export_to to crate1 dependency for tests
2024-02-12 08:37:29 -03:00
NyxCode 660deddf7e Fix #[ts(skip)] in newtype variants (#231)
* add tests

* apply fix

* update changelog
2024-02-10 18:19:21 +01:00
Tim Guggenmos e7a462a43a feat: Add functionality to export doc strings on types (#187)
* Added implementation and tests for type docs
* Added `docs` to `EnumAttr` and `StrucAttr`
* Added `DOCS` to `TS`
2024-02-09 08:21:02 -03:00
escritorio-gustavo dd32308cb5 Add support for #[serde(rename_all_fields = "...")] attribute (#225)
* Add support for #[serde(rename_all_fields = ...)] attribute
* Change VariantAttr constructor
* Document the new attribute
* Update CHANGELOG.md
* Update tests
* Run cargo +nightly fmt
2024-02-08 17:12:16 -03:00
Gustavo db6af98bbd Merge remote-tracking branch 'refs/remotes/origin/support_untagged_variant' 2024-02-08 14:17:43 -03:00
escritorio-gustavo 9ace87fcbd Merge branch 'main' into support_untagged_variant 2024-02-08 14:18:18 -03:00
Gustavo b358ffa0c7 Parse #[ts(untagged)] on enum variants 2024-02-08 14:16:47 -03:00
Gustavo 63c889fc1a Run cargo +nightly fmt 2024-02-08 14:15:35 -03:00
Gustavo 61030c27b0 Implement #[ts(untagged)] #[ts(tag = ...)] and #[ts(tag = ..., content = ...)] 2024-02-08 10:42:59 -03:00
Gustavo b54c1e1a6f Add support for #[serde(untagged)] on enum variants 2024-02-05 14:38:18 -03:00
Gustavo 3de39ab39a Separate recursive exporting into mod 2024-02-01 15:07:55 -03:00
Moritz Bischof 2375fbf50a remove old dependency implementation, fix warnings 2024-02-01 17:03:56 +01:00
Moritz Bischof 3fa1d4bec1 implement POC 2024-02-01 15:47:17 +01:00
escritorio-gustavo 3b3fbf8a63 Merge pull request #174 from josema03/main
add "as" derive helper attribute
2024-01-31 16:18:34 -03:00
Moritz Bischof 5773e28cb6 fix interaction with #[ts(optional)], expand tests 2024-01-30 21:08:42 +01:00
escritorio-gustavo 50f74b51a0 Merge pull request #209 from escritorio-gustavo/array_as_ts_tuple
Convert fixed size Rust array to fixed size TS tuple
2024-01-30 16:25:18 -03:00
escritorio-gustavo c7bcb73dc4 Use parsed_ty 2024-01-30 16:19:05 -03:00
escritorio-gustavo c12d956db6 Merge branch 'main' into main 2024-01-30 15:36:52 -03:00
escritorio-gustavo a0a3e1336a Merge pull request #216 from escritorio-gustavo/inline_generics_default
Inline generics with default types works, as long as there are no trait bounds
2024-01-30 15:23:45 -03:00
escritorio-gustavo 5a5b5184c1 Merge pull request #213 from Aleph-Alpha/optional-nullable
Implement `#[ts(optional = nullable)]`
2024-01-30 15:09:14 -03:00
Gustavo 94bb2673f1 Inline generics with default types works, as long as there are no trait bounds 2024-01-30 14:47:58 -03:00
escritorio-gustavo 81f3205393 Merge branch 'Aleph-Alpha:main' into array_as_ts_tuple 2024-01-30 11:45:18 -03:00
escritorio-gustavo d5d202614f Apply requested changes to tuple.rs 2024-01-30 11:12:24 -03:00
escritorio-gustavo 76ea907551 Apply requested changes to newtype.rs 2024-01-30 11:11:40 -03:00
escritorio-gustavo f9a7ee423a Apply requested changes to named.rs 2024-01-30 11:08:52 -03:00
escritorio-gustavo 96a664a160 Remove duplicated check 2024-01-30 10:28:30 -03:00
escritorio-gustavo 836e145b92 Fix expected &Type found Type 2024-01-30 10:24:58 -03:00
escritorio-gustavo 979ea9b475 Fix expected &str found String 2024-01-30 10:23:03 -03:00
escritorio-gustavo cff9c5bfa5 Merge branch 'main' into main 2024-01-30 10:16:09 -03:00
Gustavo 3f79932398 Merge remote-tracking branch 'refs/remotes/origin/array_as_ts_tuple' 2024-01-30 09:40:10 -03:00
Gustavo e7215abd87 Add limit to ts tuple size and simplify array case in generics.rs 2024-01-30 09:39:54 -03:00
Gustavo ef56d7a89b Use inline instead of name, Vec<string> was turning into Array 2024-01-29 17:59:34 -03:00
escritorio-gustavo 857e860c06 Merge branch 'Aleph-Alpha:main' into array_as_ts_tuple 2024-01-29 17:34:30 -03:00