10359 success && success()
10360 })
10361 }))
10362 : success && success()10363 })
10364})(typedoc || (typedoc = {})),
10365(function (typedoc) {
10356 $el.on(typedoc.transition.endEvent, function () {
10357 noTransition($el, function () {
10358 $el.off(typedoc.transition.endEvent).css('height', ''),
10359 success && success()10360 })
10361 }))
10362 : success && success()
8121 var G = function (t, e) {
8122 const i = e.error
8123 e.error = function (n) {
8124 i && i.call(e.context, t, n, e), t.trigger('error', t, n, e) 8125 }
8126 }
8127 return e
7866 )
7867 },
7868 execute: function (t, e, i) {
7869 t && t.apply(this, e) 7870 },
7871 navigate: function (t, i) {
7872 return e.history.navigate(t, i), this
7820 r.error = function (t, e, i) {
7821 (r.textStatus = e),
7822 (r.errorThrown = i),
7823 h && h.call(r.context, t, e, i) 7824 }
7825 const u = (r.xhr = e.ajax(i.extend(a, r)))
7826 return n.trigger('request', n, u, r), u
The optional chaining operator can be used to perform null checks before accessing a property, or calling a function.
Using &&
for this purpose is no longer required.
function getUsernameFromId(id: number): string | undefined {
const user = db.getUser(id)
return user && user.name
}
someFunc && someFunc()
// ^~~~ not necessary
maybeArray && maybeArray[index]
// ^~~~ not necessary
function getUsernameFromId(id: number): string | undefined {
const user = db.getUser(id)
return user?.name
}
someFunc?.()
maybeArray?.[index]