It's bad practice to cast types as any just to circumvent TS compiler errors; that kind of defeats the purpose of type-checking if we disable its functionality every time we run into a problem. i read this article here:
which talks about how the TS compiler has difficulty inferring types in the Vue framework. Explicitly specifying them with an interface is the preferred method of resolution.
Motivation 🏁
It's bad practice to cast types as
any
just to circumvent TS compiler errors; that kind of defeats the purpose of type-checking if we disable its functionality every time we run into a problem. i read this article here:https://v3.vuejs.org/guide/typescript-support.html#using-with-options-api
which talks about how the TS compiler has difficulty inferring types in the Vue framework. Explicitly specifying them with an interface is the preferred method of resolution.
Originally posted by @diracs-delta in https://github.com/grey-software/Material-Math/pull/79#issuecomment-718180597
Describe your refactoring solution 🛠️
any
to circumvent TS compiler errorstsconfig.json
that disable casts toany