title: How can I separate my typescript code into multiple files?
body: <p>Previously I'm mostly experienced in C++ development, where including another file is pretty easy. In typescript it doesn't seem to be so much trivial.</p>
  
  <p>There are a few huge arrays, which I'd like to declare only once as const and then use them later in my core logic. Because of the size of those arrays I wouldn't like to pollute my main code with it, I'd like to put it into an external ts file. I've tried to google and include every single possibility, but it seems I can't get it right.</p>
  
  <p>My tsconfig.json:</p>
  
  <pre><code>{
      "compilerOptions": {
          "module": "commonjs",
          "target": "es6",
          "outDir": "out",
          "lib": [
              "es6"
          ],
          "sourceMap": true,
          "rootDir": "src",
          "strict": true,   /* enable all strict type-checking options */
          /* Additional Checks */
          "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
          "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
          // "noUnusedParameters": true,  /* Report errors on unused parameters. */
      },
      "include": [
          "src/*"
      ],
      "exclude": [
          "node_modules",
          ".vscode-test"
      ],
      "files": [
          "src/extension.ts",
          "src/templates.ts",
          "src/intellisense.ts",
      ]
  }
  </code></pre>
  
  <p>Main code is the extension.ts, the other two should only contain some constant variables. Sample code from intellisense.ts:</p>
  
  <pre><code>import * as vscode from 'vscode';
  
  const completionTypes = [
      new vscode.CompletionItem('text1'),
      new vscode.CompletionItem('text2'),
      new vscode.CompletionItem('text3'),
      ... // A hundred more entry
      ];
  </code></pre>
  
  <p>But when I try to use that <code>completionTypes</code> in my code in extension.ts the linter says <code>Cannot find name 'completionTypes'.ts(2304)</code></p>
  
  <p>How is it possible to organize my code in typescript?</p>