A common misconception is that TypeScript "knows" what every JS function does. It doesn't -- it just has type definitions in .d.ts files, and type definitions can't always represent all the semantic information about a function's behavior

Comments