Closed

extend a javascript class

I want to extend the 'Promise' class to follow the following structure:

export default class extends Promise{

constructor(executor){

run(()=>{ //function run(fn){return fn();}

super(); //executing the super constructor must be inside run()

//don't create a new instance, i.e this.promise=new Promise(..)

// method implementation and other methods (except wait()) is not required, only the

structure withoute TypeScript errors

});

return this;

}

then(...args){

run(()=>{

//some adjustments for args

return [login to view URL](...args)

});

}

wait(seconds){

//wait some time

return this

}

}

//just executes fn() and returns its value

function run(fn){return fn();}

Skills: Angular.js, Javascript, Software Development, Typescript, Web Development

See more: javascript extend class es6, javascript class inheritance, javascript extend prototype, es6 class properties, javascript extends object, javascript extend function, javascript extend class override function, javascript super, javascript class dice game, php extend mail class, javascript class transition, javascript class expand table code, javascript internet explorer object doesnt support property method, vbnet parce javascript class, extend css class, unity 3d javascript class object, javascript class radio, convert class javascript class, extend wordpress class, javascript class diagram

About the Employer:
( 2 reviews ) Florida, United States

Project ID: #19308048

4 freelancers are bidding on average $2/hour for this job

dkgupta0808cs

Have a good experience in scripting Language. Currently working on Angular 6 base project in company from last 1.5+ Years Relevant Skills and Experience Have 4 years of Experience in Full Stack web development. C More

$3 USD / hour
(0 Reviews)
0.0
maqa1996

low salary. high quality profissionall self-esteem low salary. high quality profissionall self-esteem

$2 USD / hour
(0 Reviews)
0.0
flance9

Hi there, Thank you for sharing your requirement. Hope you are doing good and having a nice day. We are a team of technocrats having 8+ years of experience in Web and Mobile design plus development and primarily More

$2 USD / hour
(0 Reviews)
0.0
jeansidharta

Hello! I'm a very experienced javascript and typescript programmer, with thousands of lines written in both languages. I believe to be totally capable for the task. I am, however, somewhat confused on what you're More

$2 USD / hour
(0 Reviews)
0.0