title: Typescript : TS7017 Index signature of object type implicitly has an 'any' type in a loop
body: <p>I am having the following code in typescript : </p>
  
  <pre><code>export class Custom {
       [k: string]: any // Index Signature
  
       // parameters example
       // let o:Object = {"blah":1, "foo": "lol"}
       // let arr: Array&lt;string&gt; = ["blah", "foo"]
      constructor(o: Object, p: Array&lt;string&gt;)
       for(let prop of arr) {
          let p: any = (&lt;any&gt;o)[prop]
          if (p !== undefined) {
              this[prop] = p
          }
        }
  }
  </code></pre>
  
  <p>I keep having <code>TS7017 Index signature of object type implicitly has an 'any' type</code> on <code>this[prop] = p</code></p>
  
  <p>Thanks !</p>
  
  <p>Edit : Adding the index signature solved my problem.</p>