When creating a fresh React Native project and opening the default app.js file in VSCode, this line;
const App: () => React$Node = () => {
returns
Type annotations can only be used in TypeScript files.
as a VSCode problem.
Am I suppose to have typescript installed with React Native, or is this some kind of other issue with VSCode or something? Surely React Native isn't releasing their default app.js file with an error.
Here's the contents of the problem.
{
"resource": "/d:/App/sw_lbi_app/App.js",
"owner": "typescript",
"code": "8010",
"severity": 8,
"message": "Type annotations can only be used in TypeScript files.",
"source": "ts",
"startLineNumber": 27,
"startColumn": 12,
"endLineNumber": 27,
"endColumn": 28
}
