title: TypeScript: Index signature of object type implicitly has an 'any' type
body: <p>I am having an issue with my function:</p>
  
  <pre><code>    copyObject&lt;T&gt; (object:T):T {
          var objectCopy = &lt;T&gt;{};
          for (var key in object) {
              if (object.hasOwnProperty(key)) {
                  objectCopy[key] = object[key];
              }
          }
          return objectCopy;
      }
  </code></pre>
  
  <p>And I have following error:</p>
  
  <pre><code>Index signature of object type implicitly has an 'any' type.
  </code></pre>
  
  <p>How can I fix it?</p>