Create a
package.json file with only { } as the content (if you don't have a package.json already. Call npm install --save @types/es6-promise and tsc --init. The first npm install command will change your package.json to include the es6-promise as a dependency. tsc --init will create a tsconfig.json file for you.
You can now use the promise in your typescript file
var x: Promise<any>;. Execute tsc -p . to compile your project. You should have no errors.
Комментариев нет:
Отправить комментарий