Argument of type 'X' is not assignable to parameter of type 'X'
<p>Good day. I'm new to Type Script, using VSCode.</p>

<p>Getting following errors:</p>

<ol>
<li><blockquote>
  <p>error TS2322: Type '() => string' is not assignable to type 'string'.</p>
</blockquote></li>
<li><blockquote>
  <p>error TS2322: Type '() => number' is not assignable to type 'number'.</p>
</blockquote></li>
</ol>

<p>The Code: </p>

<p><strong>DTO.ts</strong></p>

<pre><code>interface DTO {

    getId(): number;
    getValue(): string;
}
export = DTO;
</code></pre>

<p><strong>LinkedObject.ts</strong></p>

<pre><code>class LinkedObject {

    public value: string = "Not Set";
    public id: number = 0;

    constructor(value?: string, id?: number) {
        this.value = value;
        this.id = id;
    }
}
export = LinkedObject;
</code></pre>

<p>I am trying to instantiate <code>LinkedObject</code> class using above mentioned interface methods: </p>

<p><strong>TravelClientFormPopulator.ts</strong></p>

<pre><code>class TravelClientFormPopulator {

    public populateComboBoxUsingDTOs(dataObjects: Array&lt;DTO&gt;, comboBoxID: string): void {

        // Get the combo box
        var selectElement = &lt;HTMLSelectElement&gt; document.getElementById(comboBoxID);
        // Reset the options 
        selectElement.options.length = 0;

        var linkedObjectsToAdd: LinkedObject[] = new Array&lt;LinkedObject&gt;();

        var defaultLinkedObject: LinkedObject = new LinkedObject("Not Selected", 0);

        linkedObjectsToAdd.push(defaultLinkedObject);

        for (var i = 0; i &lt; dataObjects.length; i++) {
            var value: string = dataObjects[i].getValue; // Error here
            var id: number = dataObjects[i].getId; // And here
            var linkedObject: LinkedObject = new LinkedObject(value, id);
        }
    }
}
</code></pre>

<p>Any help will be highly appreciated. </p>