npm i -D @types/react npm i -D @types/react-dom
Now, when we try something stupid with any of these modules, we get immediately notified about the problem:
import * as React from "react"; import * as ReactDOM from "react-dom"; ReactDOM.render( <div></div>, "root" );
On compiling or even while typing, you will get the error:
error TS2345: Argument ...