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
derived classes.
SpinaClassis now a genericSpinaClass<TBase>, which takes in the
class being typed, merges with it, and sets the prototype to it. This
replaces theSpinaClass & 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 toanyinstead ofobject, avoiding type
errors when looking for attributes/functions on parents.Backbone's
_Result<T>is now exported in Spina asResult<T>, giving
us a non-private, stable type we can use when we need to reference a
type or callable returning the type.
Unit tests pass.
| Summary | ID |
|---|---|
| 6b8cfd9aa1bef207ed1b855b740e1c8b67333977 |