yob / pdf-reader

The PDF::Reader library implements a PDF parser conforming as much as possible to the PDF specification from Adobe.
MIT License
1.81k stars 271 forks source link

Avoid providing a initial value for instance var type hints in RBI file #416

Closed yob closed 2 years ago

yob commented 2 years ago

These type hints were added in #415 while changing some files to typed: strict. It felt weird providing an initial value that I knew wasn't used, and in a follow up comment on the PR it was suggested that I can use this form to be clear that I'm annotating the ivar type without setting a value.

T.unsafe(nil) also feels a bit weird. So much syntax for so little value. It'd be nice if sorbet had a way to only specify the ivar type in an RBI files, without the value argument at all 🤷‍♂️