Re:Tricks I wish I knew when I learned TypeScript
by JoBrad on Tuesday October 12, 2021 @07:17AM
(#28838361)
I really like this package, because it not only uses the method you mentioned for checking types, but is written in TS, so you get the type checking feedback.
any => Object.prototype.toString.call(any).slice(8, -1)