Dalinar
06/27/2017, 11:15 AMmaciekjanusz
06/27/2017, 11:16 AMMaciej
🙂Dalinar
06/27/2017, 11:18 AMmg6maciej
06/27/2017, 11:19 AMDalinar
06/27/2017, 11:20 AMmg6maciej
06/27/2017, 11:20 AMDalinar
06/27/2017, 11:20 AMtypealias NullableMatchedSelector = Action<JQuery?>
fun ready(whenReady: NullableMatchedSelector, notFound: Callback?=null) {
if (performNavigation) {
navigate?.invoke()
Wait(selector!!, whenReady, notFound).wait()
} else whenReady(null) // this is where default could help, i.e. whenReady()
}
as you can see it's pretty trivial, the benefits I mean - saving one null
word.. since I can't think of any other use cases for now - I suspect that people rarely would benefit from default parameters in function types