Enhance Spina class typing and expose utility types.
Review Request #13524 — Created Feb. 6, 2024 and submitted
This change improves typing support throughout Spina, helping to cement
some patterns, improve code maintenance, and correct typing issues in
SpinaClassis now a generic
SpinaClass<TBase>, which takes in the
class being typed, merges with it, and sets the prototype to it. This
SpinaClass & TBasewe had internally in several places,
and gives us a proper up-front type to avoid some casting. Untyped, it
behaves like it did before.
__super__is now mapped to
object, avoiding type
errors when looking for attributes/functions on parents.
_Result<T>is now exported in Spina as
us a non-private, stable type we can use when we need to reference a
type or callable returning the type.
Unit tests pass.