Bug report
I created a new project with the --typescript flag, and added a type for my component's props like so:
typeAppProps={name: string};classAppextendsComponent<AppProps>{render(){return(
...
);}}In index.tsx when I write something like (note the missing prop):
ReactDOM.render(<App/>,document.getElementById('root'));// name prop is missingI get an error in both my editor (VSCode) and on my console when I run yarn start.
However in my tests if I have something like:
it('renders without crashing',()=>{constdiv=document.createElement('div');ReactDOM.render(<App/>,div);ReactDOM.unmountComponentAtNode(div);});I get the type error in my editor but NOT when I run yarn test, the tests run successfully in fact.
Is this intended?
Bug report
I created a new project with the
--typescriptflag, and added a type for my component's props like so:In index.tsx when I write something like (note the missing prop):
I get an error in both my editor (VSCode) and on my console when I run
yarn start.However in my tests if I have something like:
I get the type error in my editor but NOT when I run
yarn test, the tests run successfully in fact.Is this intended?