title: typescript definition from lib.d.ts
body: <p>Please see the code <a href="http://www.typescriptlang.org/Playground/#src=var%20IQuery%20=%20%7B%0D%0A%20%20%20%20idxName%3a%20%27session%27,%0D%0A%20%20%20%20//keyRange%3a%20window.IDBKeyRange.only%28%271%27%29%0D%0A%20%20%20%20keyRange%3a%20IDBKeyRange.only%28%271%27%29%0D%0A%7D;" rel="nofollow">here</a></p>
  
  <pre><code>var IQuery = {
      idxName: 'session',
      //keyRange: window.IDBKeyRange.only('1')
      keyRange: IDBKeyRange.only('1')
  };
  </code></pre>
  
  <p>why it doesn't recognize <code>IDBKeyRange</code> ?</p>
  
  <p>in <code>lib.d.ts</code>, I see these definitions.</p>
  
  <pre><code>interface IDBKeyRange {
      upper: any;
      upperOpen: boolean;
      lower: any;
      lowerOpen: boolean;
      bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
      only(value: any): IDBKeyRange;
      lowerBound(bound: any, open?: boolean): IDBKeyRange;
      upperBound(bound: any, open?: boolean): IDBKeyRange;
  }
  declare var IDBKeyRange: {
      prototype: IDBKeyRange;
      new (): IDBKeyRange;
  }
  </code></pre>