function foo(opts) { var _opts$foo; var foo = (_opts$foo = opts.foo) !== null && _opts$foo !== void 0 ? _opts$foo : "default"; }