Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow multiple types to set #[ts(export_to = "...")] to the same file #316

Merged
merged 36 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
dfaa802
Allow for multiple types to be exported to the same file
escritorio-gustavo May 10, 2024
784eecd
Allow for multiple types to be exported to the same file
escritorio-gustavo May 10, 2024
f4f59e9
Merge remote-tracking branch 'refs/remotes/origin/export_same_file'
escritorio-gustavo May 10, 2024
294126c
Prevent duplication
escritorio-gustavo May 10, 2024
7312fa1
If types exported to the same file depend on each other, they should …
escritorio-gustavo May 10, 2024
4dc1c17
Fix import-esm case
escritorio-gustavo May 10, 2024
892b11b
Fix import-esm case
escritorio-gustavo May 10, 2024
27832ee
Change read_exact for seek
escritorio-gustavo May 10, 2024
c7b170e
Remove unneded clone
escritorio-gustavo May 10, 2024
8d32a0e
Merge branch 'main' into export_same_file
escritorio-gustavo May 20, 2024
fbe8e72
Merge branch 'main' into export_same_file
escritorio-gustavo May 20, 2024
939041e
Remove duplicate declaration
escritorio-gustavo May 20, 2024
a3ed6d8
Reduce amount of syscalls and memory allocations
escritorio-gustavo May 22, 2024
121ac37
Replace negated condition with guard clause
escritorio-gustavo May 22, 2024
70a3c12
Merge branch 'main' into export_same_file
escritorio-gustavo Jun 5, 2024
8e3e59f
Fix compiler error
escritorio-gustavo Jun 5, 2024
5f41c0d
Merge branch 'main' into export_same_file
gustavo-shigueo Jul 24, 2024
9db3a90
Merge branch 'main' into export_same_file
gustavo-shigueo Jul 24, 2024
b80240e
Fix double blank line
gustavo-shigueo Jul 24, 2024
4344480
Make test more robust by checking if all exports are in file
gustavo-shigueo Jul 24, 2024
6a962c0
Update CHANGELOG
gustavo-shigueo Jul 24, 2024
a5a3fba
Failure report
gustavo-shigueo Jul 24, 2024
cd37d20
Account for the format feature
gustavo-shigueo Jul 24, 2024
04c1ec4
Make type order deterministic
gustavo-shigueo Jul 24, 2024
9db2c1c
Ignore JSDoc when sorting declarations
gustavo-shigueo Jul 24, 2024
419044f
Only consider type name when sorting declarations
gustavo-shigueo Jul 24, 2024
8a43254
Fix slice index
gustavo-shigueo Jul 24, 2024
bc10807
Get type name without index math
gustavo-shigueo Jul 24, 2024
25434df
Attempt to fix duplicated NOTE
gustavo-shigueo Jul 24, 2024
dedfba5
Guarantee that the type name will be used
gustavo-shigueo Jul 24, 2024
ad1b46e
Fix double header error
gustavo-shigueo Jul 25, 2024
d124d7b
Allocate less space for buffer by having the note from the original f…
gustavo-shigueo Jul 25, 2024
6ec0871
Merge branch 'main' into export_same_file
gustavo-shigueo Jul 25, 2024
a107e97
Merge branch 'main' into export_same_file
gustavo-shigueo Jul 25, 2024
5c889c9
Merge branch 'main' into export_same_file
gustavo-shigueo Jul 25, 2024
5374370
Revert rename to avoid conflicts with other branches
gustavo-shigueo Aug 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### Features

- The `bson-uuid-impl` feature now supports `bson::oid::ObjectId` as well
- Allow multile types to have the same `#[ts(export_to = "...")]` attribute and be exported to the same file

### Fixes

Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions ts-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,5 @@ thiserror = "1"
indexmap = { version = "2", optional = true }
ordered-float = { version = ">= 3, < 5", optional = true }
serde_json = { version = "1", optional = true }
lazy_static = { version = "1", default-features = false }

Loading