forked from 1Password/typeshare
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[typeshare] Support external tags for enums (#7)
## Description * For complex enums the default serde serialization is externally tagged, to avoid having to re-write our rust logic to use internal tags via `#[serde(tag = "type", content = "content")]` we are going to add manual support for it in `typescript` * Bumping version to `1.12.1` * Adding a `--dry-run` flag to allow building locally ### Before ``` # Rust enum MyEnum { blahblah { name: String } blahblah2 { age: u64 } } ``` ``` # Typescript export type MyEnum = { "type": "blahblah", content: { "name": string }} | { "type": "blahblah2", content: { "age": number }} ``` ### After ``` export type MyEnum = { "blahblah": { "name": string }} | { "blahblah2": { "age": number }} ``` ## Test Plan * CI passes ## Revert Plan * Revert
- Loading branch information
1 parent
a8ea230
commit 49b811a
Showing
7 changed files
with
78 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ dist/ | |
uploads.txt | ||
dist-manifest.json | ||
.intentionally-empty-file.o | ||
.DS_Store |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters