首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >VSCode TypeScript problemMatcher `$tsc-watch`没有在看

VSCode TypeScript problemMatcher `$tsc-watch`没有在看
EN

Stack Overflow用户
提问于 2018-03-12 08:51:29
回答 1查看 1.8K关注 0票数 5

我正在努力避免在tsconfig.json配置中使用watch: true

通过VSCode的任务,我使用了基本问题匹配器$tsc-watch,但它在构建时不会在监视模式下启动tsc。我正在添加gulp支持,我看到有gulp-watch,但我想知道为什么$tsc-watch不能像我认为的那样工作。

EN

回答 1

Stack Overflow用户

发布于 2018-03-12 13:50:26

我通过查看typescript扩展的taskProvider.js发现了这一点。为了让tsc-watch正常工作,任务需要设置option: "watch"

代码语言:javascript
复制
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "type": "typescript",
            "tsconfig": "tsconfig.json",
            "isBackground": true,
            "problemMatcher": ["$tsc-watch"],
            "option": "watch",
            "presentation": {
                "echo": true,
                "reveal": "silent",
                "focus": false,
                "panel": "shared"
            },
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}
票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49226705

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档