Common import mistake with typescript vs javascript



I really need to get this right, once and for all. Seems to be making simple mistakes when it comes to typescripts import vs javascript import.


For example,

The javascript way


import =renderer from 'react-test-renderer';

The typescript way, 


import * as renderer from 'react-test-renderer';

Comments

Popular posts from this blog

Solving Sonarqube :- Project was never analyzed. A regular analysis is required before a branch analysis

spark - pyspark reading from excel files