2.5.9
https://jsfiddle.net/Toilal/q976rqrw/
Open JSFiddle and see
Handler from component options should be invoked immediatly like handler from $watch method
Handler from component options is not invoked initially
For watch option, just write in this way:
watch: {
message: {
immediate: true,
handler: function ()聽{
...
}
}
}
Oops sorry for noise. Strange that TypeScript didn't catched this though.
Most helpful comment
For watch option, just write in this way:
https://jsfiddle.net/q976rqrw/4/