COMMUNITY

How to use Promise function new(init:(resolve:(value:T) -> Void, reject:(reason:Dynamic) -> Void) -> Void):Void;

how to use Promise in nodejs?

function new(init:(resolve:(value:T) -> Void, reject:(reason:Dynamic) -> Void) -> Void):Void;

var p=new Promise(?);
I don’t understand this, how to use?

 return 	new Promise<String>(function(resolve:String->Void, reject:Dynamic->Void) {
		

		resolve("ok");
	});
}

oh. I got it.