There is nothing wrong with your code. You can restart typescript server or reload vscode window in case typescript is still throwing old errors.