3 ms·
Yep - all non-primitive types in Java are `TheType | null` - TypeScript actually allows you to strip out the `| null`, which then means that sometimes you want
by svieira 2y ago
Yep - all non-primitive types in Java are `TheType | null` - TypeScript actually allows you to strip out the `| null`, which then means that sometimes you want to add it back in. So Java doesn't have a need for `Partial<T>`, it has a need for `NonNull<T>` and it can't express that at the type system level very easily right now (you can do it with type tagging and runtime checks inserted explicitly, but it's not very ergonomic right now)
https://gist.github.com/svieira/9f8beeafb7bf4aa55d40c638532f4fd7 https://gist.github.com/svieira/9f8beeafb7bf4aa55d40c638532f...