0

Using Typescript 2.0.10 in Visual Studio 2015, I can build my project fine, but when editing a *.ts file, Visual Studio complains every time I use Promise:

VS Intellisense Error

Any idea how to convince VS2015 that yes, Promise is a real thing?

Josh M.
  • 26,437
  • 24
  • 119
  • 200
  • In your compile options, are you targeting ES6? ES5 doesn't have Promises built in so you will need a PolyFiller. – Dan Def Nov 18 '16 at 12:24
  • I'm targeting ES5 and it builds fine without complaining about `Promise` because TS 2+ has built-in support for promises AFAIK. This is more an issue with VS giving me different compile errors than when I build using tsc/gulp/etc. – Josh M. Nov 18 '16 at 16:14
  • @ Josh M, can you share me the detailed VS2015 version information? Do you mean it works well if you use ES5, the similar issue has been asked before: http://stackoverflow.com/questions/37030963/angular-2-2-0-0-rc-1-property-map-does-not-exist-on-type-observableresponse and http://stackoverflow.com/questions/27573365/how-to-use-typescript-with-native-es6-promises, it would be related to the es6-promise package . – Jack Zhai Nov 21 '16 at 08:05

0 Answers0