-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ea7502
commit 5d0347a
Showing
5 changed files
with
83 additions
and
42 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#[allow(deprecated)] | ||
#[derive(Type)] | ||
#[specta(export = false)] | ||
#[deprecated] | ||
struct DeprecatedType { | ||
a: i32, | ||
} | ||
|
||
#[derive(Type)] | ||
#[specta(export = false)] | ||
#[deprecated = "Look at you big man using a deprecation message"] | ||
struct DeprecatedTypeWithMsg { | ||
a: i32, | ||
} | ||
|
||
#[derive(Type)] | ||
#[specta(export = false)] | ||
#[deprecated(note = "Look at you big man using a deprecation message")] | ||
struct DeprecatedTypeWithMsg2 { | ||
a: i32, | ||
} | ||
|
||
#[derive(Type)] | ||
#[specta(export = false)] | ||
struct DeprecatedFields { | ||
a: i32, | ||
#[deprecated] | ||
b: String, | ||
#[deprecated = "This field is cringe!"] | ||
c: String, | ||
#[deprecated(note = "This field is cringe!")] | ||
d: String, | ||
} | ||
|
||
#[derive(Type)] | ||
#[specta(export = false)] | ||
pub struct DeprecatedTupleVariant( | ||
#[deprecated] String, | ||
#[deprecated = "Nope"] String, | ||
#[deprecated(note = "Nope")] i32, | ||
); | ||
|
||
#[test] | ||
fn test_deprecated_types() { | ||
assert_ts_export!(DeprecatedType, ""); | ||
assert_ts_export!(DeprecatedTypeWithMsg, ""); | ||
assert_ts_export!(DeprecatedTypeWithMsg2, ""); | ||
assert_ts_export!(DeprecatedFields, ""); | ||
assert_ts_export!(DeprecatedTupleVariant, ""); | ||
} |
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