Created
August 2, 2019 17:27
-
-
Save smeijer/b720db1f15f24a5e9759ae4566431580 to your computer and use it in GitHub Desktop.
medium-costs-of-optional-chaining-5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var can = user?.can || {}; | |
var canEdit = can.edit; | |
var canDelete = can.delete; | |
// transpiles to: | |
"use strict"; | |
var _user; | |
var can = | |
((_user = user) === null || _user === void 0 ? void 0 : _user.can) || {}; | |
var canEdit = can.edit; | |
var canDelete = can.delete; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment