Stencil version:
v0.0.6-11
I'm submitting a ... (check one with "x")
[ ] bug report
[x] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com
I think would be fine Stencil has typescript interfaces for implement life cycle hooks in component. That feature will bring more secure for the typescript code forcing the programmer to implement the exact life cycle method.
For example:
import { Component, ComponentWillLoad } from '@stencil/core'
@Component({
tag: 'my-component'
})
export class MyComponent implements ComponentWillLoad {
componentWillLoad() {
}
}
I think it is an interesting feature. If necessary I can send a PR :smile:
Thanks!
Yes I think we could add this, it'd be just like how Angular does their lifecycle events. I also like that it's an opt in thing and the developer has to add it if they want. Would be happy to merge a PR, thanks!
Yeah, I am an Angular developer haha typescript interfaces is a great feature. Well, tonight I'll try send a PR adding the life cycle interfaces. Thanks.
Most helpful comment
Yes I think we could add this, it'd be just like how Angular does their lifecycle events. I also like that it's an opt in thing and the developer has to add it if they want. Would be happy to merge a PR, thanks!