Argument of type 'X' is not assignable to parameter of type 'X'
You miss parenthesis:
var value: string = dataObjects[i].getValue();
var id: number = dataObjects[i].getId();
For what it worth, if anyone has this problem only in VSCode, just restart VSCode and it should fix it. Sometimes, Intellisense seems to mess up with imports or types.
Related to Typescript: Argument of type 'RegExpMatchArray' is not assignable to parameter of type 'string'