With the checkJs enabled on vscode settings, the following error comes up on a JavaScript file but not on a TypeScript file-
checkJs
Could not figure out the reason. Also if the comment out the line this.firstName = '';, the error disappears. What is the cause of this error?
this.firstName = '';