title: What is the meaning of error TS2584 (TS) .... Try changing the 'lib' compiler option to include 'dom'?
body: <p>I use VS and write Typescript</p>
  
  <p>I would like simply to type the command "document.write" without having an error code.
  what I having now is an error code of this commmand "document". I just don't want to get into something complecated as there can be a simple solution ( I didn't experience this problem on my previous PC and VS).</p>
  
  <p>Error message:
  Error   TS2584  (TS) Cannot find name 'document'. Do you need to change your target library? Try changing the <code>lib</code> compiler option to include 'dom'.   C:\web development\studies\typescript\replaceCharsInArray\replaceCharsInArray (tsconfig or jsconfig project)    C:\web development\studies\typescript\replaceCharsInArray\replaceCharsInArray\app.ts    9   Active</p>
  
  <pre><code>let arr: string[] = ['black ofram','american walnut'];
  function replaceCharsInStringArray(arr: string[], oldChar:string, newChar:string): string[] {
      for (let i = 0; i &gt;= arr.length - 1, i++;) {
          arr[i] = arr[i].replace(newChar, oldChar);
          return arr;
      };
  }
  arr = replaceCharsInStringArray(arr, ' ', '_');
  document.write
  
  </code></pre>