aurelia / dialog

A dialog plugin for Aurelia.
MIT License
106 stars 115 forks source link

docs(hooks): canDeactivate result parameter #345

Closed pape87 closed 6 years ago

pape87 commented 6 years ago

Add information about the result parameter

Fixes issue: https://github.com/aurelia/dialog/issues/344

CLAassistant commented 6 years ago

CLA assistant check
All committers have signed the CLA.

Alexander-Taran commented 6 years ago

I'm afraid that won't cut it. If I remember right deactivate() also receives dialogResult. And you might want to annotate the code with typing info. Last one I'm not sure of. Because there is no inheritance.

zewa666 commented 6 years ago

Right so deactivate takes result: DialogCloseResult | DialogCloseError https://github.com/aurelia/dialog/blob/458477cf7ad3a517280bd97efb62045aa5ea5bba/src/interfaces.ts

This should be updated in the docs PR as well, but I wouldn't annotate any code or so as this is solely a docs PR, so that people reading the documentation immediately figure out there is something passed into the lifecycle hooks.

Alexander-Taran commented 6 years ago

@zewa666 agreed. There are interfaces already in place. https://github.com/aurelia/framework/issues/874#issuecomment-374226001

Alexander-Taran commented 6 years ago

PR looks good. can be merged