Typescript (an extension to JS that adds type-safety) essentially does option 3 as well.<p>As the sibling noted, there are instances during runtime where the type checking fails, especially because Typescript is compiling to Javascript. I have had moments where a numeric observable in KnockoutJS had to be forced to a number when receiving a new value; the form that the observable is bound to is simply returning a string, and while the TS interface for KnockoutJS <i>says</i> the observable is a number, the actual JS doesn&#x27;t care and just returns what the form gives it.<p>In some ways this is a failing of Typescript; it shouldn&#x27;t allow strongly-type interfaces to be wrapped around JS that can return varying types.