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

IsNullable support for C# 8 nullable reference types #1

Merged
merged 1 commit into from Oct 13, 2021
Merged

IsNullable support for C# 8 nullable reference types #1

merged 1 commit into from Oct 13, 2021

Conversation

RudeySH
Copy link

@RudeySH RudeySH commented Oct 13, 2021

In bae691d, you fixed the bug that C# 8 nullable reference types introduced. But, TypeWriter's IsNullable returned false for these types. This pull request changes IsNullable so that it also returns true for nullable reference types.

Technically, nullable reference types aren't System.Nullable<>, but instead have [Nullable] attributes that the compiler generates. However, this distinction is not relevant for Typewriter's purposes. Users of Typewriter are likely using IsNullable to determine if a C# property should be optional (?) in TypeScript, and optional properties in Typescript work for both value types and reference types. So this is why I decided to improve the existing IsNullable implementation instead of adding something new like "IsNullableReferenceType".

@AdaskoTheBeAsT
Copy link
Owner

Thanks :)

@AdaskoTheBeAsT AdaskoTheBeAsT merged commit 09ed3ea into AdaskoTheBeAsT:master Oct 13, 2021
@AdaskoTheBeAsT
Copy link
Owner

@RudeySH
Copy link
Author

RudeySH commented Oct 14, 2021

Thank you for fixing many bugs of the original Typewriter. Your fork is my go-to version of Typewriter now. :)

Would you consider enabling GitHub issues on your fork?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants