TypeScript 6.0で非推奨化されるオプションたち – Speaker Deck

ES5へのトランスパイルは大変 トランスパイル後: function getMenuItems(user) { return __generator(this, function (_a) {

switch (_a.label) { case 0: return [4 /*yield*/, “Home”]; case 1: _a.sent(); return [4 /*yield*/, “Search”]; case 2: _a.sent(); if (!user.isAdmin) return [3 /*break*/, 4]; return [4 /*yield*/, “Admin”]; case 3: _a.sent(); _a.label = 4; case 4: return [4 /*yield*/, “Settings”]; case 5: _a.sent(); return [2 /*return*/]; } }); 24




元の記事を確認する

関連記事