Skip to content

Instantly share code, notes, and snippets.

@bialikover
Created March 16, 2016 07:07
Show Gist options
  • Save bialikover/15975bf176b1c3c1618d to your computer and use it in GitHub Desktop.
Save bialikover/15975bf176b1c3c1618d to your computer and use it in GitHub Desktop.
vscode settings for quick ts support

#VSCode Quick TS setup:

on .vscode/tasks.json root folder:

// create js from ts file
{
    "version": "0.1.0",
    // The command is tsc. Assumes that tsc has been installed using npm install -g typescript
    "command": "tsc",
    // The command is a shell script
    "isShellCommand": true,
    // Show the output window only if unrecognized errors occur.
    "showOutput": "always",
    // args is the HelloWorld program to compile.
    "args": [
        "${file}"
    ],
    // use the standard tsc problem matcher to find compile problems
    // in the output.
    "problemMatcher": "$tsc"
}

on root folder: `tsconfig.js``

{
    "compilerOptions": {
        "target": "ES5",
        "noImplicitAny": true,
        "removeComments": true,
        "preserveConstEnums": true,
        "sourceMap": true
    },
    "files": [
    ]
}

on cmd + shift + b it creates a js transpiled file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment