locked
Visual Studio 2017 Typescript Ignore Error RRS feed

  • Question

  • User-1132163444 posted

    Hi,

    Please help me, before i'm using VS 2015 and my TS works fine, all of my changes to any TS file gets generated to JS, but when i upgrade to VS2017, more than 2000 TS errors shows up from the same Project that i used to work from the old VS2015, and i can't generate the JS files anymore.

    can anyone please help me.

    Thank you very much  in advance

    Tuesday, December 5, 2017 2:49 PM

Answers

  • User-1132163444 posted

    Hi,

    What i did is i just Upgrade my TS version from 2.3 to 2.6, add the tsconfig.json file with the following contents and that's it, it generates the JS file even with errors

    {
        "compileOnSave": true,
        "compilerOptions": {
            "module": "commonjs",
            "noImplicitAny": true,
            "removeComments": true,
            "preserveConstEnums": true,
            "sourceMap": true
        }
    }
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, December 5, 2017 11:49 PM

All replies

  • User-474980206 posted

    vs2015 used a global typescript install, vs2017 uses a local. most likely you need to change your project to an earlier version (maybe 1.3). You will need to set both the typescript build and intellisense setting.

    note: I use ES7 instead of typescript, so I only deal with the intellisense settings.

    Tuesday, December 5, 2017 4:09 PM
  • User-1132163444 posted

    Hi,

    Thanks for your reply, is there a way that we can just let type generate the JS file regardless if there is an error? without downgrading?

    Tuesday, December 5, 2017 10:38 PM
  • User-1132163444 posted

    Hi,

    What i did is i just Upgrade my TS version from 2.3 to 2.6, add the tsconfig.json file with the following contents and that's it, it generates the JS file even with errors

    {
        "compileOnSave": true,
        "compilerOptions": {
            "module": "commonjs",
            "noImplicitAny": true,
            "removeComments": true,
            "preserveConstEnums": true,
            "sourceMap": true
        }
    }
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, December 5, 2017 11:49 PM