Currently, I'm enrolled in an online Angular course to brush up on my skills. However, during one of the initial classes, I encountered an error while declaring an interface.
interface face{
name: string;
address: string;
}
The error message "Uncaught SyntaxError: unexpected token: identifier" appeared in both Firefox and Chrome, but strangely, my code worked fine in an online editor. Could it be a compatibility issue with an outdated version?
Edit: Below is the HTML code snippet:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Intro ducción</title>
</head>
<body>
<script src="app.ts"></script>
</body>
</html>
And here is the tsconfig.json configuration:
{
"compilerOptions": {
"target": "es2020",
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}
}