title: How to import typescript module from interactive console in intellij
body: <p>I come from vanilla JavaScript, and I just don't get this. Usually I work directly from the interactive console in chrome or firefox and I can access all my resources to try them out manually.</p>
  
  <p>Right now I have an Angular project with Intellij and I want to try out code inside a module. To be specific I'm busy implementing a queue pattern. So I made a <code>Queue</code> class.</p>
  
  <p>When I type in the name of my class inside the javascript console, Intellij finds it as a suggestion. When I use their suggestion it inserts the import statement like <code>import {Queue} from "./Queue";</code>. </p>
  
  <p>But when I try this it spews <code>SyntaxError: Cannot use import statement outside a module</code>. Which I understand, but how can I import the module from the console? (I figure that there is a compiled .js file somewhere, which I can import, right!?).</p>
  
  <p><a href="https://i.stack.imgur.com/W3DIE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W3DIE.png" alt="enter image description here"></a></p>