Ionic 2: I can not find the name "Promise after upgrading to RC.0

I just upgraded my Ionic 2 project to RC.0 and now I have a few typescript errors that I think are related to each other:

  • Cannot find Promise
  • The 'find' property does not exist in the array (rephrased, as it happens with any types of arrays).

Q) How can I fix this to compile my code?

I am using Visual Studio Code.

Thank.

+4
source share
2 answers

The Visual Studio code is fixed and reinstalled.

Then follow these steps:

https://code.visualstudio.com/docs/languages/typescript#_using-newer-typescript-versions

!

+1

, typescript . .json , typescript, :

"typescript": "2.0.3"

package.json, , , . angular.io docs, .

NPM

, VS , Microsoft , VS .

+1

Source: https://habr.com/ru/post/1656590/


All Articles