нельзя это юзать? Ведь LSP не нарушается в этом случае
написано же зачем впиливали Implementing this RFC would allow libraries to be upgraded to use type declarations in their method signatures. Currently adding types to a method of a class in a library would break any code that extends that class. This would provide an easier upgrade path for libraries to start using scalar types, to replace manual checks being done inside the methods, without requiring an update for all sub-classes.
Обсуждают сегодня