Teasim heavily encourages the use of method chaining.
Because Teasim's type system is complex, methods usually introduce a new type to the instance.
Using method chaining will help save that new type reference.
For example:
Using this, state
now returns new TeasimInstance
type, introducing build
into store and replace the current one.
Method chaining now saves that new type and passes it to get
, which is why get
now has type access of build
.
Without using method chaining, Teasim doesn't save the new type when introduced, leading to no type inference.
That's why Teasim encourage use of method chaining, not only that it reduces redundant usage of the app.
prefix, but also to provide better type inference.