title: Override variables defined in lib.d.ts
body: <p>I've got the typing below for WebWorkers API. In the very bottom of the file is a line that describes self object. The same variable name is used in lib.d.ts and when I add the reference to WebWorker.d.ts I see that self has type Window, not DedicatedWorkerGlobalScope.
  What should I fix to override this definition ? </p>
  
  <pre><code>interface WorkerNavigator extends NavigatorID, NavigatorOnLine {
  }
  
  interface WorkerUtils extends WindowTimers, WindowBase64 {
      importScripts: (...urls: string[]) =&gt; void;
      navigator: WorkerNavigator;
  }
  
  interface WorkerLocation {
      href: string;
      protocol: string;
      host: string;
      hostname: string;
      port: string;
      pathname: string;
      search: string;
      hash: string;
  }
  
  interface WorkerGlobalScope extends EventTarget, WorkerUtils {
      self: WorkerGlobalScope;
      location: WorkerLocation;
  
      close: () =&gt; void;
      onerror: Function;
      onoffline: Function;
      ononline: Function;
  }
  
  interface DedicatedWorkerGlobalScope extends WorkerGlobalScope {
      postMessage:(message:any, ...args:any[])=&gt;void;
      onmessage: Function;
  }
  
  declare var self: DedicatedWorkerGlobalScope;
  </code></pre>
  
  <p><strong>UPD:</strong>
  Despite the code above, I have to use the following way. Looks like the definition of self wasn't overriden</p>
  
  <pre><code>/// &lt;reference name="WebWorkers.d.ts" /&gt;
  
  declare var self: DedicatedWorkerGlobalScope;
  </code></pre>