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

Removing sniptt/monads for lemmy-js-client. #2644

Merged
merged 4 commits into from
Jan 4, 2023

Conversation

dessalines
Copy link
Member

No description provided.

Copy link
Member

@Nutomic Nutomic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dont know what it means but its fine as long as tests are passing. Feel free to merge.

@dessalines
Copy link
Member Author

So I recently removed all the optionals and weird serializing necessary due to them from lemmy-js-client: LemmyNet/lemmy-js-client#99

And lemmy-ui: LemmyNet/lemmy-ui#886

I love the monads / rust-style options, but since they aren't the "native" way for nulls / optionals to work in typescript, they required a ton of annoying workarounds.

There was also a typescript flag I was unaware of, strictNullChecks, which makes sure everything must have a value if its used.

The lemmy-ui rework touched every component and took a few days, but it was worth it.

@dessalines dessalines merged commit 0630d21 into main Jan 4, 2023
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.

2 participants