Typescript definition of "Promise" not found

Recently I’ve updated to ionic rc0. since then I see there is no typings folder or typings.json . The upgrade phase at
link here step 26 specifies that typings folder and json should be removed , after I removed it in webstorm all Promise types are changed to red indicating that the type is not defined , sorry to tell that I see no documentation regarding this .

If you can please answer this question regarding promise not found .

Hav you typed your Promise<T>.
And sometimes, with some libs, you have to change the Promise (ex. firebase.Promise<void>)

import { Injectable } from ‘@angular/core’;
import { Storage } from ‘@ionic/storage’;
import {ILocalStorageService} from “./local-storage.interface”;

export class LocalStorageService implements ILocalStorageService{
private local:Storage;

constructor() {
    this.local = new Storage();

get(key: string): Promise<any>{
    return this.local.get(key);
set(key: string, value: any): Promise<any>{
    return this.local.set(key,value);
remove(key: string): Promise<any>{
    return this.local.remove(key);
clear(): Promise<any>{
    return this.local.clear();


all the places where there is “Promise” I get it in red for the IDE can’t recognize this type , bare in mind I deleted (as instructed by ionic2 rc0 upgrade ) the typings folder and json .

Your code works for me, but I’m on rc1. Maybe there is a difference, I don’t know, but try with rc1, there is no big change between rc0 and rc1 (unlike beta.11 and rc0).

Do you have any typings folder in your project ? … I’ve moved to rc1 still same problem .

No. Not any typings folder. That’s weird. What does your compiler show ?

The compile process works , the problem is with intelisense and go to definition .

Oh oay. I tought the problem that it was not compiling.
I won’t be able to help you in this case if it is a problem with your IDE.

I have webstorm , but as I see it the project has no definition for “Promise” , how did your IDE identifies the “Promise” definition ? or if you click on “Promise” to check definition ( go to definition ) does it shows you the def ? you see the problem is that def needs to come from some source ( d.ts file or js ) and since ionic2 rc1 removed the typings folder I don’t understand how they want types like “Promise” to be defined .

See if you can change which TypeScript Webstorm is using, and point it at some >=2.0.0 version.

Same here, I manually changed webstorm to point to the local Typescript libs 2.0.3 and nothing changed.
If I add es6 promise typing the compiler complaints about duplicated definitions.

UPDATE: Changing JavaScript to ECMAScript 6 fixes the problem.


How do you do that ?

Found it , settings -> Languages & Frameworks -> JavaScript -> set language version .