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"
]
}

[TypeScript] Using Exclude and RootDir until File Globs Lands in 2.0.的更多相关文章

  1. org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [/Users/lonecloud/tomcat/apache-tomcat-7.0.70 2/webapps/myproject/WEB-INF/classes/cn/lone

    解决这个报错的解决办法: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidat ...

  2. mysql5.7.12/13在安装新实例时报错:InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero

    .bin/mysqld --initialize-insecure --basedir=xxx --datadir=xxx 然后 .bin/mysqld_safe --defaults-file=xx ...

  3. Warning: File upload error - unable to create a temporary file in Unknown on line 0

    upload_tmp_dir 临时文件夹问题 上传文件提示 Warning: File upload error - unable to create a temporary file in Unkn ...

  4. InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!

    问题描述: centos 安装MySQL $yum install mysql-server 安装之后执行命令mysql 报错: 查看mysql的启动日志: [ERROR] InnoDB: auto- ...

  5. PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0

    代码在本地运行一切都OK,放到服务器上,网站访问正常,上传就出现该错误. 提示:PHP Warning: File upload error - unable to create a temporar ...

  6. InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pa

    2016-09-14T09:17:37.713955Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleane ...

  7. peomethues 参数设置 监控网站 /usr/local/prometheus-2.13.0.linux-amd64/prometheus --config.file=/usr/local/prometheus-2.13.0.linux-amd64/prometheus.yml --web.listen-address=:9999 --web.enable-lifecycle

    probe_http_status_code{instance="xxxx",job="web_status"} probe_http_status_code{ ...

  8. Local IIS 7.0 - CS0016: Could not write to output file / Microsoft.Net > Framework > v4.0.30319 > Temporary ASP.NET Files

    This week I went nuts over my local IIS. I have never swore to a machine that much in my whole life. ...

  9. How to create a zip file in NetSuite SuiteScript 2.0 如何在现有SuiteScript中创建和下载ZIP压缩文档

    Background We all knows that: NetSuite filecabinet provided a feature to download a folder to a zip ...

随机推荐

  1. maven的安装,maven库配置和Eclipse插件的安装

    maven的安装,maven库配置和Eclipse插件的安装 1.下载并解压maven 2.配置环境变量 3.配置maven配置文件 1.下载链接 Downloading Apache Maven 2 ...

  2. HTML DOM Select 对象

    Select 对象 Select 对象代表 HTML 表单中的一个下拉列表. 在 HTML 表单中,<select> 标签每出现一次,一个 Select 对象就会被创建. 您可通过遍历表单 ...

  3. hdu 4454 Stealing a Cake

    简单的计算几何: 可以把0-2*pi分成几千份,然后找出最小的: 也可以用三分: #include<cstdio> #include<cmath> #include<al ...

  4. 【2011 Greater New York Regional 】Problem G: Rancher's Gift

    计算几何的题目,很简单: 自己随手敲了个,纪念下! #include<cstdio> #include<cmath> using namespace std; struct p ...

  5. 两种方法,获取磁盘剩余空间--PYTHON

    import ctypes import os import platform import sys def get_free_space_mb(folder): """ ...

  6. CAS单点登录配置[4]:客户端配置

    本节介绍一下客户端如何配置,客户端配置没有服务端那么复杂... 客户端Tomcat配置 1 首先确认证书文件已经拷贝到Tomcat的目录下,我们新建两个客户端的web应用,分别命名为Client1,C ...

  7. leetcode面试准备: Substring with Concatenation of All Words

    leetcode面试准备: Substring with Concatenation of All Words 1 题目 You are given a string, s, and a list o ...

  8. 【HDOJ】1753 大明A+B

    注意数据格式,可以是整数,并且注意输出最简化浮点数. #include <stdio.h> #include <string.h> #define MAXNUM 420 cha ...

  9. 【HDOJ】2955 Robberies

    01背包.将最大金额作为容量v.概率做乘法. #include <stdio.h> #include <string.h> #define mymax(a, b) (a> ...

  10. Apache Struts 安全措施绕过漏洞(CVE-2013-4310)

    漏洞版本: Apache Group Struts < 2.3.15.2 漏洞描述: BUGTRAQ ID: 62584 CVE(CAN) ID: CVE-2013-4310 Struts2 是 ...