I'm a bit confused by the logic that's been used to arrive at the current API for addLayoutComponent()
.
There's two methods, one that takes a string and a component, and the other that takes an object and a component (but fails at runtime unless that object is a string.)
However, the one deprecated is the one that takes the string, not the one that takes the object. In my mind this is the wrong way around - why not keep the typesafe method that takes a string and deprecate the other?
And following on from this, is it better to, in this case, use the deprecated method and suppress the warning when it comes with the type safe guarantee?