zoukankan      html  css  js  c++  java
  • [TypeScript] Using Exclude and RootDir until File Globs Lands in 2.0.

    Files globs will be available in TypeScript 2.0, so in the meantime, we need to use "exclude" and "rootDir" to configure which files to load. This lesson shows how to switch from "files" to "exclude".

    Curently, in tsconfig.json, we use "files" to tell the main entry file as "src/main". And import other file into main.ts. But the problem is if you want add each files manually into "files" config setting, IDEs cannot give the autocomplete for the rest of files.
     
    From TypeScript 2.0 We will be able to get the auto complete by just current setting, but for now we need to use "exclude" and "rootDir" to tell TypeScript which files we want to use.
     
    {
        "compilerOptions": {
            "rootDir": "src",
            "module": "commonjs",
            "target": "es5",
            "noImplicitAny": false,
            "sourceMap": false,
            "outDir": "./dist",
            "noEmitOnError": true
        },
        "exclude": [
            "node_modules"
        ]
    }
  • 相关阅读:
    hdu1233
    zoj 3529
    hdu 2516 取石子游戏
    组合博弈理论
    博弈——sg函数的原理和优化
    博弈及sg函数
    poj2039
    hdu 1250
    C# 类的继承和访问
    C# 索引
  • 原文地址:https://www.cnblogs.com/Answer1215/p/5571893.html
Copyright © 2011-2022 走看看