My goal is to perform type checking on my existing JavaScript code. I have set up a tsconfig file with the specifications below. When I run tsc
, it generates hundreds of errors that appear in Visual Studio during the build process. These errors are currently causing the build to fail, but since the code is still functioning properly, I would like to postpone resolving them for now. Instead, I want these errors to be treated as warnings so that the build can proceed and we can gradually enhance the JavaScript code.
// tsconfig.json
{
"compilerOptions": {
"noImplicitAny": false,
"noEmitOnError": true,
"removeComments": false,
"sourceMap": true,
"target": "es5",
"checkJs": true,
"allowJs": true,
"noEmit": true
}
}
//csproj (abbreviated)
<Project>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props')" />
<PropertyGroup>
<TypeScriptToolsVersion>3.6</TypeScriptToolsVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets')" />
</Project>
...
Sample output from msbuild:
...
file.js:153:33 - error TS2769: No overload matches this call.
========== Build: 14 succeeded, 1 failed, 23 up-to-date, 0 skipped ==========