Open
Description
Type assertions are everywhere in our code (eg. stepper/stepper.ts).
They defeat the point of having a type system by silencing the compiler on type errors. Type assertions only affect the static semantics of a program but not the dynamic semantics, meaning that even though the TypeScript compiler doesn't complain, our program could run into runtime type errors. Instead, we should make use of type narrowing.
See pull request #1453
