To fix Promise is not recolized in TypeScript, we can choose to use a lib:

npm i @types/es6-promise

we can also use built-in libs:

{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"noImplicitAny": true,
"sourceMap": true,
"strictNullChecks": true,
"noEmitOnError": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"lib": ["es6"],
"skipLibCheck": true
},
"exclude": [
"client/node_modules"
]
}

Inside "es6" have Promise already, so that we don't need to install other devdependices.

[Typescript] Installing Promise Type Definitions Using the lib Built-In Types的更多相关文章

  1. Hex-Rays decompiler type definitions and convenience macros

    /****************************************************************************************** Copyrigh ...

  2. The repository for high quality TypeScript type definitions

    Best practices This is a guide to the best practices to follow when creating typing files. There are ...

  3. [TypeScript] Type Definitions and Modules

    For example you are building your own module, the same as Lodash: my-lodash.d.ts declare module &quo ...

  4. [TypeScript] Avoid any type

    To avoid using "any" type is a best pratice. The reason for that is it disable the power o ...

  5. [TypeScript] Use TypeScript’s never Type for Exhaustiveness Checking

    TypeScript 2.0 introduced a new primitive type called never, the type of values that never occur. It ...

  6. [TypeScript] Represent Non-Primitive Types with TypeScript’s object Type

    ypeScript 2.2 introduced the object, a type that represents any non-primitive type. It can be used t ...

  7. [TypeScript] Define Custom Type Guard Functions in TypeScript

    One aspect of control flow based type analysis is that the TypeScript compiler narrows the type of a ...

  8. [TypeScript] Installing TypeScript and Running the TypeScript Compiler (tsc)

    This lesson shows you how to install TypeScript and run the TypeScript compiler against a .ts file f ...

  9. 【typedef】Type definitions 自定义类型

随机推荐

  1. ElasticSearch启动报错,bootstrap checks failed

    修改elasticsearch.yml配置文件,允许外网访问. vim config/elasticsearch.yml# 增加 network.host: 0.0.0.0 启动失败,检查没有通过,报 ...

  2. Android开发进度05

    1,今日:目标:完成后台用户的增删改查 2,昨天:完成登录和注册功能 3,收获:熟练了SQLite操作 4,问题:无

  3. CRM系统 - 总结 (二) stark组件

    介绍: stark组件,是一个帮助开发者快速实现数据库表的增删改查+的组件.目标: 10s 中完成一张表的增删改查. 前戏: django项目启动时,自定义执行某个py文件. django启动时,且在 ...

  4. win10开机时内存使用率达到99%以上

    开始,运行,输入msconfig回车就能看到自启的项目. 搞定! 其实,感觉特别像是输入法的某个监听程序导致内存泄漏,造成的系统问题. 再遇到的时候要认真检查下.

  5. maven也是Apache开发的,也是java开发的。maven需要你本地系统JDK的支持

    1. 3. 添加 M2_HOME 和 MAVEN_HOME 添加 M2_HOME 和 MAVEN_HOME 环境变量到 Windows 环境变量,并将其指向你的 Maven 文件夹. M2_HOME ...

  6. 【POJ 2485】 Highways

    [POJ 2485] Highways 最小生成树模板 Prim #include using namespace std; int mp[501][501]; int dis[501]; bool ...

  7. scp报错:Host key verification failed. REMOTE HOST IDENTIFICATION HAS CHANGED!

    1 scp报错:REMOTE HOST IDENTIFICATION HAS CHANGED! [root@xx ~]# scp yum-3.4.3.tar.gz 10.xx.xx.12:/root ...

  8. 剑指offer_面试题_从上往下打印二叉树

    题目:从上往下打印出二叉树的每一个结点.同一层的结点依照从左到右的顺序打印.比如输入图4.5中的二叉树.则依次打印出8.6.10.5.7.9.11. 8 /     \ 6     10 /   \ ...

  9. swift -函数、函数指针

    // // main.swift // FunctionTest-04 // import Foundation println("函数測试!") testFunction() / ...

  10. 使用LSTM做电影评论负面检测——使用朴素贝叶斯才51%,但是使用LSTM可以达到99%准确度

    基本思路: 每个评论取前200个单词.然后生成词汇表,利用词汇index标注评论(对 每条评论的前200个单词编号而已),然后使用LSTM做正负评论检测. 代码解读见[[[评论]]]!embeddin ...