title: How to apply IIFE in ReactJS + Typescript?
body: <p>I would like to use IIFE in ReactJS + Typescript environment. So i rewrite this code with ReactJS + Typescript</p>
  
  <p><strong>IIFE</strong></p>
  
  <pre><code>(function() { 
          //Constructor
          this.Radio = function(){ 
  
              var defaults = { 
                  locale: "en-US", 
              }
  
          } 
  
          // Public Methods   
          Radio.prototype.load = function() { 
  
          } 
        }());
  </code></pre>
  
  <p><strong>ReactJS + Typescript</strong></p>
  
  <pre><code>    export default class Radio{
      options: any = { 
          locale: "en-US", 
  
      };
      constructor(props: any) {
          var defaults = { 
              locale: "en-US", 
          }
  
      }       
  
      // Public Methods   
      load = () =&gt; { 
      }
  } 
  </code></pre>
  
  <p>What i try to achieve is when the bundle.js load from html page i'm able to instantiate by passing some value in like below</p>
  
  <pre><code>&lt;script src="main.js"&gt;&lt;/script&gt;
  &lt;body&gt; 
  
  
      &lt;div id="app"&gt;&lt;/div&gt;
  
  &lt;/body&gt; 
  
  &lt;script&gt;
      $(function() {
          var test = new Radio({   &lt;----error on this line         
              locale: "en-US",            
          });
          test.load();
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>But when i run above code i got this error <strong>Uncaught ReferenceError: Radio is not defined</strong></p>
  
  <p>Is that possible to implement IIFE like above?</p>
  
  <p>Thanks</p>