{"id":83248,"date":"2025-01-01T16:48:43","date_gmt":"2025-01-01T09:48:43","guid":{"rendered":"https:\/\/itviec.com\/blog\/?p=83248"},"modified":"2025-01-01T16:48:43","modified_gmt":"2025-01-01T09:48:43","slug":"lo-trinh-hoc-typescript","status":"publish","type":"post","link":"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/","title":{"rendered":"H\u1ecdc TypeScript t\u1eeb c\u01a1 b\u1ea3n \u0111\u1ebfn n\u00e2ng cao v\u1edbi l\u1ed9 tr\u00ecnh h\u1ecdc 2025"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">N\u1ed9i dung b\u00e0i vi\u1ebft<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/#TypeScript_la_gi\" >TypeScript l\u00e0 g\u00ec?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/#Vi_sao_nen_hoc_TypeScript\" >V\u00ec sao n\u00ean h\u1ecdc TypeScript?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/#Bat_dau_hoc_TypeScript_nhu_the_nao\" >B\u1eaft \u0111\u1ea7u h\u1ecdc TypeScript nh\u01b0 th\u1ebf n\u00e0o?\u00a0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/#Cac_chu_de_hoc_TypeScript_co_ban\" >C\u00e1c ch\u1ee7 \u0111\u1ec1 h\u1ecdc TypeScript c\u01a1 b\u1ea3n\u00a0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/#Cac_chu_de_hoc_TypeScript_nang_cao\" >C\u00e1c ch\u1ee7 \u0111\u1ec1 h\u1ecdc TypeScript n\u00e2ng cao<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/#5_nguon_tai_nguyen_tu_hoc_TypeScript_tham_khao\" >5+ ngu\u1ed3n t\u00e0i nguy\u00ean t\u1ef1 h\u1ecdc TypeScript tham kh\u1ea3o<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/#Cau_hoi_thuong_gap_ve_hoc_TypeScript\" >C\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p v\u1ec1 h\u1ecdc TypeScript<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/#Tong_ket_ve_hoc_TypeScript\" >T\u1ed5ng k\u1ebft v\u1ec1 h\u1ecdc TypeScript\u00a0<\/a><\/li><\/ul><\/nav><\/div>\n<p><em><strong>TypeScript l\u00e0 ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh \u0111\u01b0\u1ee3c ph\u00e1t tri\u1ec3n \u0111\u1ec3 m\u1edf r\u1ed9ng JavaScript, mang l\u1ea1i tr\u1ea3i nghi\u1ec7m l\u1eadp tr\u00ecnh hi\u1ec7u qu\u1ea3 h\u01a1n. H\u1ecdc TypeScript kh\u00f4ng ch\u1ec9 gi\u00fap b\u1ea1n t\u1ed1i \u01b0u h\u00f3a m\u00e3 ngu\u1ed3n hi\u1ec7u qu\u1ea3, n\u00e2ng cao kh\u1ea3 n\u0103ng x\u00e2y d\u1ef1ng c\u00e1c d\u1ef1 \u00e1n l\u1edbn d\u1ec5 d\u00e0ng h\u01a1n m\u00e0 c\u00f2n mang l\u1ea1i m\u1ed9t s\u1ef1 nghi\u1ec7p IT ph\u00e1t tri\u1ec3n trong n\u0103m 2025.<\/strong><\/em><\/p>\n<p><span style=\"font-weight: 400;\">\u0110\u1ecdc b\u00e0i vi\u1ebft sau \u0111\u00e2y \u0111\u1ec3 \u0111\u01b0\u1ee3c gi\u1ea3i \u0111\u00e1p chi ti\u1ebft h\u01a1n v\u1ec1:\u00a0<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">L\u00e0m th\u1ebf n\u00e0o \u0111\u1ec3 b\u1eaft \u0111\u1ea7u h\u1ecdc TypeScript<\/span><\/li>\n<li aria-level=\"1\">Nh\u1eefng l\u00fd do v\u00ec sao n\u00ean h\u1ecdc TypeScript trong n\u0103m 2025<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u00e1c ch\u1ee7 \u0111\u1ec1 h\u1ecdc TypeScript c\u01a1 b\u1ea3n v\u00e0 n\u00e2ng cao c\u1ea7n bi\u1ebft<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">M\u1ed9t s\u1ed1 ngu\u1ed3n t\u00e0i nguy\u00ean t\u1ef1 h\u1ecdc TypeScript uy t\u00edn<\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"TypeScript_la_gi\"><\/span><b>TypeScript l\u00e0 g\u00ec?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">TypeScript l\u00e0 m\u1ed9t ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh m\u00e3 ngu\u1ed3n m\u1edf \u0111\u01b0\u1ee3c ph\u00e1t tri\u1ec3n v\u00e0 duy tr\u00ec b\u1edfi Microsoft v\u00e0o n\u0103m 2012. TypeScript \u0111\u01b0\u1ee3c xem l\u00e0 m\u1ed9t ph\u1ea7n m\u1edf r\u1ed9ng c\u1ee7a <a href=\"https:\/\/itviec.com\/blog\/javascript-la-gi\/\" target=\"_blank\" rel=\"noopener\">JavaScript<\/a>, s\u1eed d\u1ee5ng c\u00fa ph\u00e1p c\u1ee7a JavaScript v\u00e0 b\u1ed5 sung th\u00eam m\u1ed9t s\u1ed1 t\u00ednh n\u0103ng nh\u01b0 ki\u1ec3u t\u0129nh, class, h\u01b0\u1edbng \u0111\u1ed1i t\u01b0\u1ee3ng,\u2026<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Nh\u1eefng t\u00ednh n\u0103ng n\u00e0y s\u1ebd gi\u00fap qu\u00e1 tr\u00ecnh vi\u1ebft m\u00e3 v\u00e0 v\u1eadn h\u00e0nh \u1ee9ng d\u1ee5ng m\u1ed9t c\u00e1ch d\u1ec5 d\u00e0ng h\u01a1n.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">M\u1ed9t s\u1ed1 t\u00ednh n\u0103ng n\u1ed5i b\u1eadt c\u1ee7a TypeScript c\u00f3 th\u1ec3 k\u1ec3 \u0111\u1ebfn nh\u01b0:\u00a0<\/span><\/p>\n<ul>\n<li><b>Ki\u1ec3u t\u0129nh (Static Typing):<\/b><span style=\"font-weight: 400;\"> TypeScript cho ph\u00e9p b\u1ea1n ki\u1ec3m tra v\u00e0 g\u00e1n ki\u1ec3u cho c\u00e1c bi\u1ebfn, tham s\u1ed1 v\u00e0 gi\u00e1 tr\u1ecb tr\u1ea3 v\u1ec1 c\u1ee7a h\u00e0m. B\u01b0\u1edbc n\u00e0y s\u1ebd gi\u00fap c\u1ea3i thi\u1ec7n \u0111\u00e1ng k\u1ec3 ch\u1ea5t l\u01b0\u1ee3ng c\u1ee7a \u0111o\u1ea1n m\u00e3. Ki\u1ec3u t\u0129nh c\u0169ng gi\u00fap gi\u1ea3m thi\u1ec3u l\u1ed7i v\u00e0 l\u00e0m cho m\u00e3 c\u1ee7a b\u1ea1n d\u1ec5 \u0111\u1ecdc h\u01a1n.<\/span><\/li>\n<li><b>Class-Based Object:<\/b><span style=\"font-weight: 400;\"> JavaScript hi\u1ec7n \u0111\u1ea1i (t\u1eeb ES6) c\u0169ng h\u1ed7 tr\u1ee3 l\u1eadp tr\u00ecnh h\u01b0\u1edbng \u0111\u1ed1i t\u01b0\u1ee3ng v\u1edbi classes. TypeScript m\u1edf r\u1ed9ng th\u00eam c\u00e1c t\u00ednh n\u0103ng OOP nh\u01b0 access modifiers (public, private, protected). TypeScript cho ph\u00e9p b\u1ea1n vi\u1ebft m\u00e3 h\u01b0\u1edbng \u0111\u1ed1i t\u01b0\u1ee3ng th\u1ef1c s\u1ef1. B\u1ea1n c\u00f3 th\u1ec3 t\u1ea1o c\u00e1c l\u1edbp, \u0111\u1ecbnh ngh\u0129a c\u00e1c h\u00e0m t\u1ea1o v\u00e0 s\u1eed d\u1ee5ng c\u00e1c tr\u00ecnh s\u1eeda \u0111\u1ed5i k\u1ebf th\u1eeba v\u00e0 truy c\u1eadp (public, private, protected).<\/span><\/li>\n<li><b>M\u00f4-\u0111un:<\/b><span style=\"font-weight: 400;\"> B\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng m\u00f4-\u0111un, b\u1ea1n c\u00f3 th\u1ec3 s\u1eafp x\u1ebfp m\u00e3 c\u1ee7a m\u00ecnh th\u00e0nh c\u00e1c ph\u1ea7n nh\u1ecf h\u01a1n v\u00e0 c\u00f3 th\u1ec3 t\u00e1i s\u1eed d\u1ee5ng. T\u00ednh m\u00f4-\u0111un n\u00e0y gi\u00fap t\u0103ng c\u01b0\u1eddng kh\u1ea3 n\u0103ng b\u1ea3o tr\u00ec m\u00e3 hi\u1ec7u qu\u1ea3 h\u01a1n.\u00a0<\/span><\/li>\n<li><b>T\u00ednh n\u0103ng ES6:<\/b><span style=\"font-weight: 400;\"> TypeScript bao g\u1ed3m c\u00e1c t\u00ednh n\u0103ng c\u1ee7a ES6 (ECMAScript 6). Do \u0111\u00f3, n\u1ebfu b\u1ea1n quen thu\u1ed9c v\u1edbi c\u00e1c c\u00fa ph\u00e1p c\u01a1 b\u1ea3n c\u1ee7a ES6 (arrow function, template literals, destructuring,..) th\u00ec b\u1ea1n c\u00f3 th\u1ec3 d\u1ec5 d\u00e0ng l\u00e0m quen v\u1edbi TypeScript h\u01a1n.\u00a0<\/span><\/li>\n<li><b>C\u00fa ph\u00e1p: <\/b><span style=\"font-weight: 400;\">C\u01a1 b\u1ea3n c\u00fa ph\u00e1p c\u1ee7a TypeScript v\u1eabn d\u1ef1a tr\u00ean Javascript gi\u00fap l\u1eadp tr\u00ecnh m\u00e3 \u0111\u01b0\u1ee3c ng\u1eafn g\u1ecdn v\u00e0 d\u1ec5 di\u1ec5n \u0111\u1ea1t h\u01a1n.<\/span><\/li>\n<\/ul>\n<blockquote><p><i><span style=\"font-weight: 400;\">&gt;&gt; Xem th\u00eam: <\/span><\/i><strong><a href=\"https:\/\/itviec.com\/blog\/typescript-la-gi\/\"><i>TypeScript l\u00e0 g\u00ec? Top 20 c\u00e2u h\u1ecfi v\u00e0 \u0111\u00e1p \u00e1n v\u1ec1 TypeScript c\u1ea7n bi\u1ebft<\/i><\/a><\/strong><\/p><\/blockquote>\n<h2><span class=\"ez-toc-section\" id=\"Vi_sao_nen_hoc_TypeScript\"><\/span><strong>V\u00ec sao n\u00ean h\u1ecdc TypeScript?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><b>\u01afu \u0111i\u1ec3m c\u1ee7a TypeScript<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">TypeScript s\u1edf h\u1eefu c\u00e1c \u01b0u \u0111i\u1ec3m ch\u00ednh c\u1ee7a JavaScript, \u0111\u1ed3ng th\u1eddi c\u0169ng cung c\u1ea5p c\u00e1c l\u1ee3i \u00edch b\u1ed5 sung \u0111\u1ebfn t\u1eeb vi\u1ec7c nh\u1eadp t\u0129nh v\u00e0 c\u00e1c kh\u00e1i ni\u1ec7m kh\u00e1c d\u00e0nh ri\u00eang cho TypeScript.\u00a0<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>S\u1eeda l\u1ed7i nhanh:<\/b><span style=\"font-weight: 400;\"> TypeScript c\u00f3 th\u1ec3 ph\u00e1t hi\u1ec7n c\u00e1c l\u1ed7i \u1edf giai \u0111o\u1ea1n bi\u00ean d\u1ecbch gi\u00fap ti\u1ebft ki\u1ec7m th\u1eddi gian cho l\u1eadp tr\u00ecnh vi\u00ean v\u00e0 cho ph\u00e9p h\u1ecd t\u1eadp trung v\u00e0o vi\u1ec7c s\u1eeda ch\u1eefa c\u00e1c l\u1ed7i trong logic.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Kh\u1ea3 n\u0103ng d\u1ef1 \u0111o\u00e1n:<\/b><span style=\"font-weight: 400;\"> N\u1ebfu m\u1ed9t bi\u1ebfn \u0111\u01b0\u1ee3c khai b\u00e1o d\u01b0\u1edbi d\u1ea1ng m\u1ed9t chu\u1ed7i, TypeScript s\u1ebd lu\u00f4n l\u00e0 m\u1ed9t chu\u1ed7i v\u00e0 s\u1ebd kh\u00f4ng bi\u1ebfn th\u00e0nh Boolean. \u0110i\u1ec1u n\u00e0y l\u00e0m t\u0103ng kh\u1ea3 n\u0103ng c\u00e1c ch\u1ee9c n\u0103ng ho\u1ea1t \u0111\u1ed9ng theo c\u00e1ch d\u1ef1 \u0111\u1ecbnh ban \u0111\u1ea7u.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>T\u00e1i c\u1ea5u tr\u00fac m\u00e3:<\/b><span style=\"font-weight: 400;\"> TypeScript gi\u00fap qu\u00e1 tr\u00ecnh t\u00e1i c\u1ea5u tr\u00fac ho\u1eb7c c\u1eadp nh\u1eadt \u1ee9ng d\u1ee5ng ho\u1ea1t \u0111\u1ed9ng tr\u01a1n tru m\u00e0 v\u1eabn gi\u1eef \u0111\u01b0\u1ee3c c\u01a1 s\u1edf m\u00e3 ban \u0111\u1ea7u. B\u00ean c\u1ea1nh \u0111\u00f3, TypeScript c\u0169ng c\u00f3 th\u1ec3 ph\u00e1t hi\u1ec7n l\u1ed7i t\u1ef1 \u0111\u1ed9ng, gi\u00fap \u0111\u01a1n gi\u1ea3n ho\u00e1 v\u00e0 t\u0103ng t\u1ed1c t\u00e1i c\u1ea5u tr\u00fac m\u00e3. \u0110i\u1ec1u n\u00e0y s\u1ebd \u0111\u1eb7c bi\u1ec7t c\u00f3 l\u1ee3i n\u1ebfu b\u1ea1n x\u1eed l\u00fd ph\u1ea7n l\u1edbn c\u1ee7a c\u01a1 s\u1edf m\u00e3.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>T\u01b0\u01a1ng th\u00edch \u0111a n\u1ec1n t\u1ea3ng:<\/b><span style=\"font-weight: 400;\"> M\u1ecdi thi\u1ebft b\u1ecb, n\u1ec1n t\u1ea3ng ho\u1eb7c tr\u00ecnh duy\u1ec7t t\u01b0\u01a1ng th\u00edch JavaScript c\u0169ng ho\u1ea1t \u0111\u1ed9ng \u0111\u01b0\u1ee3c v\u1edbi TypeScript, sau khi tr\u00ecnh bi\u00ean d\u1ecbch chuy\u1ec3n \u0111\u1ed5i m\u00e3 th\u00e0nh JavaScript.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>H\u1ed7 tr\u1ee3 c\u00f4ng c\u1ee5:<\/b><span style=\"font-weight: 400;\"> Cung c\u1ea5p c\u00e1c c\u00f4ng c\u1ee5 ph\u00e1t tri\u1ec3n tuy\u1ec7t v\u1eddi nh\u01b0 IntelliSense, g\u1ee3i \u00fd th\u1ef1c khi vi\u1ebft m\u00e3.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>IDE:<\/b><span style=\"font-weight: 400;\"> N\u00e2ng cao tr\u1ea3i nghi\u1ec7m c\u1ee7a l\u1eadp tr\u00ecnh vi\u00ean v\u1edbi m\u00f4-\u0111un tr\u00ecnh ch\u1ec9nh s\u1eeda v\u01b0\u1ee3t tr\u1ed9i.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>T\u00e0i li\u1ec7u API:<\/b><span style=\"font-weight: 400;\"> \u0110\u1ea3m b\u1ea3o t\u00e0i li\u1ec7u t\u1ed1t h\u01a1n cho c\u00e1c API \u0111\u1ed3ng b\u1ed9 v\u1edbi m\u00e3 ngu\u1ed3n, c\u00f3 kh\u1ea3 n\u0103ng gi\u1ea3m l\u1ed7i.<\/span><\/li>\n<\/ul>\n<h3><strong>H\u1ecdc TypeScript \u0111\u1ec3 s\u1edf h\u1eefu m\u1ee9c l\u01b0\u01a1ng h\u1ea5p d\u1eabn tr\u00ean th\u1ecb tr\u01b0\u1eddng<\/strong><\/h3>\n<p>Theo <a href=\"https:\/\/itviec.com\/bao-cao\/luong-it-va-thi-truong-tuyen-dung-it-vietnam\" target=\"_blank\" rel=\"noopener\"><strong>B\u00e1o c\u00e1o L\u01b0\u01a1ng v\u00e0 Th\u1ecb tr\u01b0\u1eddng Tuy\u1ec3n d\u1ee5ng IT t\u1ea1i Vi\u1ec7t Nam 2024 &#8211; 2025<\/strong><\/a> m\u1edbi nh\u1ea5t, sau \u0111\u00e2y l\u00e0 m\u1ee9c l\u01b0\u01a1ng trung v\u1ecb c\u1ee7a ng\u00f4n ng\u1eef TypeScript:<\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>Kho\u1ea3ng n\u0103m kinh nghi\u1ec7m<\/strong><\/td>\n<td><strong>M\u1ee9c l\u01b0\u01a1ng TypeScript trung v\u1ecb<\/strong><\/p>\n<p><strong>(\u0111\u01a1n v\u1ecb: VND\/ th\u00e1ng)<\/strong><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">&lt; 1<\/span><\/td>\n<td><span style=\"font-weight: 400;\">10.650.000<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">1-2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">21.150.000<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">3-4<\/span><\/td>\n<td><span style=\"font-weight: 400;\">27.100.000<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">5-8<\/span><\/td>\n<td><span style=\"font-weight: 400;\">45.600.000<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">&gt; 8<\/span><\/td>\n<td><span style=\"font-weight: 400;\">52.900.000<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Ngo\u00e0i ra, v\u00ec TypeScript \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng ph\u1ed5 bi\u1ebfn trong l\u0129nh v\u1ef1c ph\u00e1t tri\u1ec3n web, c\u1ea3 Front-end v\u00e0 Back-end, sau \u0111\u00e2y l\u00e0 m\u1ee9c l\u01b0\u01a1ng trung v\u1ecb c\u1ee7a c\u00e1c v\u1ecb tr\u00ed c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng TypeScript:<\/p>\n<table>\n<tbody>\n<tr>\n<td rowspan=\"2\"><strong>Kho\u1ea3ng n\u0103m kinh nghi\u1ec7m<\/strong><\/td>\n<td colspan=\"3\"><strong>M\u1ee9c l\u01b0\u01a1ng trung v\u1ecb (\u0111\u01a1n v\u1ecb: VND\/ th\u00e1ng)<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>Back-end Developer<\/strong><\/td>\n<td><strong>Front-end Developer<\/strong><\/td>\n<td><strong>Full-stack Developer<\/strong><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">&lt; 1<\/span><\/td>\n<td><span style=\"font-weight: 400;\">N\/A<\/span><\/td>\n<td><span style=\"font-weight: 400;\">N\/A<\/span><\/td>\n<td><span style=\"font-weight: 400;\">14.700.000<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">1-2<\/span><\/td>\n<td><span style=\"font-weight: 400;\">19.200.000<\/span><\/td>\n<td><span style=\"font-weight: 400;\">16.100.000<\/span><\/td>\n<td><span style=\"font-weight: 400;\">16.650.000<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">3-4<\/span><\/td>\n<td><span style=\"font-weight: 400;\">26.000.000<\/span><\/td>\n<td><span style=\"font-weight: 400;\">23.300.000<\/span><\/td>\n<td><span style=\"font-weight: 400;\">29.900.000<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">5-8<\/span><\/td>\n<td><span style=\"font-weight: 400;\">45.300.000<\/span><\/td>\n<td><span style=\"font-weight: 400;\">34.950.000<\/span><\/td>\n<td><span style=\"font-weight: 400;\">39.700.000<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">&gt; 8<\/span><\/td>\n<td><span style=\"font-weight: 400;\">54.500.000<\/span><\/td>\n<td><span style=\"font-weight: 400;\">50.950.000<\/span><\/td>\n<td><span style=\"font-weight: 400;\">50.000.000<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span class=\"ez-toc-section\" id=\"Bat_dau_hoc_TypeScript_nhu_the_nao\"><\/span><b>B\u1eaft \u0111\u1ea7u h\u1ecdc TypeScript nh\u01b0 th\u1ebf n\u00e0o?\u00a0<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">B\u01b0\u1edbc \u0111\u1ea7u ti\u00ean \u0111\u1ec3 l\u00e0m vi\u1ec7c v\u1edbi TypeScript c\u1ee5c b\u1ed9 (t\u1ee9c l\u00e0 ngo\u1ea1i tuy\u1ebfn) l\u00e0 thi\u1ebft l\u1eadp m\u00f4i tr\u01b0\u1eddng. TypeScript c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c thi\u1ebft l\u1eadp theo nhi\u1ec1u c\u00e1ch kh\u00e1c nhau, tuy nhi\u00ean c\u00e1ch c\u00e0i \u0111\u1eb7t TypeScript ph\u1ed5 bi\u1ebfn c\u00f3 th\u1ec3 n\u00f3i v\u1ec1 s\u1eed d\u1ee5ng th\u00f4ng qua npm.\u00a0<\/span><\/p>\n<h3><b>C\u00e0i \u0111\u1eb7t<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">\u0110\u1ea7u ti\u00ean, b\u1ea1n ph\u1ea3i c\u00e0i \u0111\u1eb7t Nodejs \u0111\u1ec3 ch\u1ea1y m\u00f4i tr\u01b0\u1eddng v\u00e0 NPM \u0111\u1ec3 qu\u1ea3n l\u00fd ph\u1ee5 thu\u1ed9c. Nodejs b\u1ea1n c\u00f3 th\u1ec3 t\u1ea3i v\u1ec1 t\u1eeb trang website ch\u00ednh th\u1ee9c c\u1ee7a Nodejs.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Sau \u0111\u00f3, b\u1ea1n s\u1eed d\u1ee5ng IDE nh\u01b0 VSCode v\u00e0 kh\u1edfi t\u1ea1o d\u1ef1 \u00e1n m\u1edbi b\u1eb1ng npm, b\u1eb1ng c\u00e1ch ch\u1ea1y npminit-y, l\u1ec7nh n\u00e0y s\u1ebd t\u1ea1o package.json cho d\u1ef1 \u00e1n. Trong d\u1ef1 \u00e1n, h\u00e3y ch\u1ea1y npm install typescript &#8211;save-dev \u0111\u1ec3 c\u00e0i \u0111\u1eb7t TypeScript. Sau \u0111\u00f3, t\u1ea1o tsconfig.json b\u1eb1ng l\u1ec7nh <\/span><span style=\"font-weight: 400;\">npx tsc &#8211;init<\/span><\/p>\n<h3><b>Vi\u1ebft m\u00e3 TypeScript<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Vi\u1ebft ch\u01b0\u01a1ng tr\u00ecnh TypeScript \u0111\u1ea7u ti\u00ean b\u1eb1ng c\u00e1ch t\u1ea1o t\u1ec7p c\u00f3 t\u00ean app.ts. \u0110u\u00f4i ts l\u00e0 ph\u1ea7n m\u1edf r\u1ed9ng cho TypeScript v\u00ec .js l\u00e0 ph\u1ea7n m\u1edf r\u1ed9ng cho t\u1ec7p JavaScript. Sau \u0111\u00f3, th\u00eam m\u00e3 n\u00e0y \u0111\u1ec3 \u0111\u1ecbnh ngh\u0129a giao di\u1ec7n admin v\u1edbi thu\u1ed9c t\u00ednh name v\u00e0 id v\u00e0o t\u1ec7p app.ts:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">interface Admin {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0name: string;<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0id: number;<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0}<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0function createAdmin(name: string, id: number): Admin {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0return { name, id}; \u00a0 \u00a0 }<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0const admin1 = createAdmin(\"ITviec Blog\", 1);\u00a0<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0const admin2 = createAdmin(\"ITviec\", 2);<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Trong \u0111o\u1ea1n m\u00e3 tr\u00ean, sau khi \u0111\u1ecbnh ngh\u0129a giao di\u1ec7n, b\u1ea1n h\u00e3y t\u1ea1o m\u1ed9t h\u00e0m createAdmin \u0111\u1ec3 t\u1ea1o c\u00e1c \u0111\u1ed1i t\u01b0\u1ee3ng \u201cAdmin\u201d<\/span><\/p>\n<h3><b>Tr\u00ecnh bi\u00ean d\u1ecbch TypeScript\u00a0<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Tr\u00ecnh duy\u1ec7t ch\u1ec9 hi\u1ec3u v\u00e0 th\u1ef1c thi m\u00e3 JavaScript. Do \u0111\u00f3, \u0111\u1ec3 ch\u1ea1y m\u00e3 TypeScript trong tr\u00ecnh duy\u1ec7t, tr\u01b0\u1edbc ti\u00ean m\u00e3 c\u1ea7n \u0111\u01b0\u1ee3c bi\u00ean d\u1ecbch ho\u1eb7c chuy\u1ec3n \u0111\u1ed5i sang JavaScript b\u1eb1ng Tr\u00ecnh bi\u00ean d\u1ecbch TypeScript (tsc). Tr\u00ecnh bi\u00ean d\u1ecbch n\u00e0y s\u1ebd chuy\u1ec3n \u0111\u1ed5i m\u1ecdi t\u00ednh n\u0103ng d\u00e0nh ri\u00eang cho TypeScript th\u00e0nh m\u00e3 t\u01b0\u01a1ng th\u00edch v\u1edbi c\u00f4ng c\u1ee5 JavaScript.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Qu\u00e1 tr\u00ecnh bi\u00ean d\u1ecbch \u0111\u01b0\u1ee3c th\u1ef1c hi\u1ec7n nh\u01b0 sau:\u00a0<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Ph\u00e2n t\u00edch c\u00fa ph\u00e1p:<\/b><span style=\"font-weight: 400;\"> B\u1eaft \u0111\u1ea7u b\u1eb1ng c\u00e1ch \u0111\u1ecdc m\u00e3 TypeScript v\u00e0 ph\u00e2n t\u00edch c\u00fa ph\u00e1p, sau \u0111\u00f3 chuy\u1ec3n \u0111\u1ed5i th\u00e0nh c\u1ea5u tr\u00fac d\u1eef li\u1ec7u g\u1ecdi l\u00e0 AST, bi\u1ec3u di\u1ec5n c\u1ea5u tr\u00fac m\u00e3 v\u00e0 m\u1ed1i quan h\u1ec7 gi\u1eefa c\u00e1c ph\u1ea7n t\u1eed.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Ki\u1ec3m tra ki\u1ec3u (type):<\/b><span style=\"font-weight: 400;\"> Tr\u00ecnh bi\u00ean d\u1ecbch th\u1ef1c hi\u1ec7n ki\u1ec3m tra type d\u1ef1a tr\u00ean ch\u00fa th\u00edch v\u00e0 suy lu\u1eadn \u0111\u1ec3 \u0111\u1ea3m b\u1ea3o m\u00e3 tu\u00e2n th\u1ee7 c\u00e1c ki\u1ec3u \u0111\u00e3 \u0111\u01b0\u1ee3c x\u00e1c \u0111\u1ecbnh.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Chuy\u1ec3n \u0111\u1ed5i: <\/b><span style=\"font-weight: 400;\">Chuy\u1ec3n \u0111\u1ed5i m\u00e3 d\u1ef1a tr\u00ean AST v\u00e0 ki\u1ec3m tra k\u1ebft<\/span> <span style=\"font-weight: 400;\">qu\u1ea3<\/span> <span style=\"font-weight: 400;\">c\u1ee7a type.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>T\u1ea1o m\u00e3:<\/b><span style=\"font-weight: 400;\"> Tr\u00ecnh bi\u00ean d\u1ecbch t\u1ea1o m\u00e3 JavaScript t\u01b0\u01a1ng \u0111\u01b0\u01a1ng d\u1ef1a tr\u00ean AST \u0111\u00e3 chuy\u1ec3n \u0111\u1ed5i tr\u01b0\u1edbc \u0111\u00f3 v\u00e0 v\u1eabn gi\u1eef nguy\u00ean ch\u1ee9c n\u0103ng c\u1ee7a TypeScript.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">V\u00ed d\u1ee5 \u0111o\u1ea1n m\u00e3 TypeScript sau \u0111\u01b0\u1ee3c \u0111\u1ecbnh ngh\u0129a giao di\u1ec7n Admin v\u00e0 h\u00e0m createAdmin kh\u1edbp v\u1edbi thu\u1ed9c t\u00ednh c\u1ee7a giao di\u1ec7n:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">interface Admin {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0name: string;<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0id: number;<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0}<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0function createAdmin(name: string, id: number): Admin {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0return { name, id};<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0const admin1 = createAdmin(\"ITviec Blog\", 1);\u00a0<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0const admin2 = createAdmin(\"ITviec\", 2);<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">V\u00e0 \u0111o\u1ea1n m\u00e3 t\u01b0\u01a1ng t\u1ef1 sau khi \u0111\u01b0\u1ee3c bi\u00ean d\u1ecbch sang JavaScript:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">function createAdmin(name, id) {<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return { name, id }<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0 const admin1 = createAdmin(\"ITviec Blog\", 1)<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0const admin2 = createAdmin(\"ITviec\", 2)<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">\u0110\u1ec3 bi\u00ean d\u1ecbch file n\u00e0y b\u1eb1ng tr\u00ecnh bi\u00ean d\u1ecbch tsc TypeScript, b\u1ea1n h\u00e3y ch\u1ea1y npx tsc app.ts trong terminal. Thao t\u00e1c n\u00e0y s\u1ebd t\u1ea1o m\u1ed9t t\u1ec7p c\u00f3 t\u00ean app.js c\u00f9ng v\u1edbi file app.ts<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0110\u1ec3 theo d\u00f5i c\u00e1c thay \u0111\u1ed5i v\u00e0 t\u1ef1 \u0111\u1ed9ng bi\u00ean d\u1ecbch l\u1ea1i file TypeScript, h\u00e3y ch\u1ea1y <\/span><span style=\"font-weight: 400;\">npx tsc app.ts \u2013watch<\/span><span style=\"font-weight: 400;\">\u00a0 trong terminal. B\u1ea1n c\u00f3 th\u1ec3 s\u1eeda \u0111\u1ed5i v\u00e0 vi\u1ebft th\u00eam m\u00e3 TypeScript b\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng m\u1ed9t s\u1ed1 t\u00ednh n\u0103ng t\u01b0\u01a1ng t\u1ef1. Ngo\u00e0i ra, t\u00f9y ch\u1ecdn \u2013watch s\u1ebd gi\u00fap t\u1ef1 \u0111\u1ed9ng bi\u00ean d\u1ecbch code khi c\u00f3 thay \u0111\u1ed5i.<\/span><\/p>\n<h3><strong>L\u00e0m quen v\u1edbi c\u00e1c TypeScript framework<\/strong><\/h3>\n<h4><b>React<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">TypeScript c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng v\u1edbi React \u0111\u1ec3 x\u00e2y d\u1ef1ng c\u00e1c th\u00e0nh ph\u1ea7n an to\u00e0n v\u1ec1 ki\u1ec3u (type) nh\u01b0:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">interface GreetingProps {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0name: string;<\/span>\r\n<span style=\"font-weight: 400;\">}<\/span>\r\n\r\n<span style=\"font-weight: 400;\">const Greeting = ({ name }: GreetingProps) =&gt; {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0return &lt;h1&gt;Hello, {name}!&lt;\/h1&gt;;<\/span>\r\n<span style=\"font-weight: 400;\">};<\/span>\r\n\r\n<span style=\"font-weight: 400;\">interface ContainerProps {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0children: React.ReactNode;<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0className?: string;<\/span>\r\n<span style=\"font-weight: 400;\">}<\/span>\r\n\r\n<span style=\"font-weight: 400;\">const Container = ({ children, className }: ContainerProps) =&gt; {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0return &lt;div className={className}&gt;{children}&lt;\/div&gt;;<\/span>\r\n<span style=\"font-weight: 400;\">};<\/span><\/pre>\n<h4><b>Node.js<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">TypeScript c\u0169ng c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 ph\u00e1t tri\u1ec3n ph\u00eda m\u00e1y ch\u1ee7 v\u1edbi Node.js:\u00a0<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">import express, { Request, Response } from 'express';<\/span>\r\n\r\n<span style=\"font-weight: 400;\">const app = express();<\/span>\r\n\r\n<span style=\"font-weight: 400;\">app.get('\/', (req: Request, res: Response) =&gt; {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0res.send('Hello, TypeScript with Node.js!');<\/span>\r\n<span style=\"font-weight: 400;\">});<\/span>\r\n\r\n<span style=\"font-weight: 400;\">app.listen(3000, () =&gt; {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0console.log('Server is running on port 3000');<\/span>\r\n<span style=\"font-weight: 400;\">});<\/span><\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Cac_chu_de_hoc_TypeScript_co_ban\"><\/span><b>C\u00e1c ch\u1ee7 \u0111\u1ec1 h\u1ecdc TypeScript c\u01a1 b\u1ea3n\u00a0<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><b>Ch\u00fa th\u00edch (Type Annotations)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">C\u1ed1t l\u00f5i c\u1ee7a TypeScript n\u1eb1m \u1edf vi\u1ec7c \u0111\u1ecbnh ngh\u0129a r\u00f5 r\u00e0ng c\u00e1c ki\u1ec3u d\u1eef li\u1ec7u c\u1ee7a bi\u1ebfn, h\u00e0m v\u00e0 c\u00e1c c\u1ea5u tr\u00fac kh\u00e1c. \u0110i\u1ec1u n\u00e0y c\u00f3 ngh\u0129a l\u00e0 kh\u00f4ng c\u00f2n ph\u1ea3i \u0111o\u00e1n xem bi\u1ebfn c\u00f3 ki\u1ec3u g\u00ec, d\u1eabn \u0111\u1ebfn \u00edt l\u1ed7i th\u1eddi gian ch\u1ea1y v\u00e0 hi\u1ec3u m\u00e3 t\u1ed1t h\u01a1n.<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">let name: string = \"ITviec Blog\";\u00a0<\/span><\/pre>\n<pre><span style=\"font-weight: 400;\">let age: number = 30;<\/span><\/pre>\n<h3><b>Nguy\u00ean th\u1ee7y (Primitive Types)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">TypeScript cung c\u1ea5p c\u00e1c kh\u1ed1i x\u00e2y d\u1ef1ng c\u01a1 b\u1ea3n nh\u01b0 chu\u1ed7i, s\u1ed1, boolean,.. \u0111\u1ea1i di\u1ec7n cho c\u00e1c ki\u1ec3u d\u1eef li\u1ec7u c\u01a1 b\u1ea3n \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng trong to\u00e0n b\u1ed9 m\u00e3 c\u1ee7a b\u1ea1n.\u00a0<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">let isDone: boolean = true;\u00a0\u00a0<\/span><\/pre>\n<pre><span style=\"font-weight: 400;\">let price: number = 19.99;\u00a0\u00a0\u00a0<\/span><\/pre>\n<pre><span style=\"font-weight: 400;\">let name: string = \"John\"<\/span><\/pre>\n<h3><b>M\u1ea3ng v\u00e0 \u0110\u1ed1i t\u01b0\u1ee3ng (Arrays and Objects)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">T\u01b0\u01a1ng t\u1ef1 v\u1edbi JavaScript, TypeScript cho ph\u00e9p l\u00e0m vi\u1ec7c v\u1edbi m\u1ea3ng v\u00e0 \u0111\u1ed1i t\u01b0\u1ee3ng. Tuy nhi\u00ean, b\u1ea1n c\u00f3 th\u1ec3 x\u00e1c \u0111\u1ecbnh lo\u1ea1i ph\u1ea7n t\u1eed trong m\u1ea3ng ho\u1eb7c thu\u1ed9c t\u00ednh c\u1ee7a \u0111\u1ed1i t\u01b0\u1ee3ng, \u0111\u1ea3m b\u1ea3o t\u00ednh nh\u1ea5t qu\u00e1n c\u1ee7a d\u1eef li\u1ec7u.<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">let numbers: number[] = [1, 2, 3];\u00a0<\/span><\/pre>\n<pre><span style=\"font-weight: 400;\">let person: { name: string, age: number } = { name: \"Jane\", age: 25 };<\/span><\/pre>\n<h3><b>H\u00e0m (Function)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">X\u00e1c \u0111\u1ecbnh k\u1ef3 v\u1ecdng r\u00f5 r\u00e0ng cho \u0111\u1ea7u v\u00e0o v\u00e0 \u0111\u1ea7u ra c\u1ee7a h\u00e0m b\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng ch\u00fa th\u00edch. \u0110i\u1ec1u n\u00e0y gi\u00fap t\u0103ng c\u01b0\u1eddng t\u00ednh r\u00f5 r\u00e0ng c\u1ee7a m\u00e3 v\u00e0 tr\u00e1nh \u0111\u01b0\u1ee3c c\u00e1c h\u00e0nh vi kh\u00f4ng mong mu\u1ed1n.<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">function add(x: number, y: number): number {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0return x + y;<\/span>\r\n<span style=\"font-weight: 400;\">}<\/span>\r\n\r\n<span style=\"font-weight: 400;\">const result = add(5, 10);<\/span><\/pre>\n<h3><b>Giao di\u1ec7n (Interfaces)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">T\u1ea1o b\u1ea3n thi\u1ebft k\u1ebf cho c\u00e1c \u0111\u1ed1i t\u01b0\u1ee3ng, ph\u00e1c th\u1ea3o thu\u1ed9c t\u00ednh v\u00e0 type. \u0110i\u1ec1u n\u00e0y \u0111\u1ea3m b\u1ea3o c\u00e1c \u0111\u1ed1i t\u01b0\u1ee3ng tu\u00e2n th\u1ee7 theo m\u1ed9t c\u1ea5u tr\u00fac c\u1ee5 th\u1ec3, th\u00fac \u0111\u1ea9y t\u00ednh nh\u1ea5t qu\u00e1n v\u00e0 kh\u1ea3 n\u0103ng t\u00e1i s\u1eed d\u1ee5ng.\u00a0<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">interface Product {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0id: number;<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0name: string;<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0price: number;<\/span>\r\n<span style=\"font-weight: 400;\">}<\/span>\r\n\r\n<span style=\"font-weight: 400;\">const product: Product = { id: 1, name: \"T-shirt\", price: 15.0 };<\/span><\/pre>\n<h3><b>L\u1edbp (Classes)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">L\u1edbp \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 \u0111\u00f3ng g\u00f3i d\u1eef li\u1ec7u v\u00e0 c\u00e1c h\u00e0nh vi c\u1ee7a m\u00e3. T\u01b0\u01a1ng t\u1ef1 nh\u01b0 giao di\u1ec7n, b\u1ea1n c\u00f3 th\u1ec3 x\u00e1c \u0111\u1ecbnh c\u00e1c lo\u1ea1i thu\u1ed9c t\u00ednh v\u00e0 ph\u01b0\u01a1ng th\u1ee9c, d\u1eabn \u0111\u1ebfn m\u00e3 c\u00f3 c\u1ea5u tr\u00fac t\u1ed1t c\u0169ng nh\u01b0 d\u1ec5 b\u1ea3o tr\u00ec h\u01a1n.<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">class User {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0name: string;<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0age: number;<\/span>\r\n\r\n<span style=\"font-weight: 400;\"> \u00a0constructor(name: string, age: number) {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0this.name = name;<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0this.age = age;<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0}<\/span>\r\n\r\n<span style=\"font-weight: 400;\"> \u00a0greet() {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0console.log(`Hello, my name is ${this.name}!`);<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0}<\/span>\r\n<span style=\"font-weight: 400;\">}<\/span>\r\n\r\n<span style=\"font-weight: 400;\">const user = new User(\"Alice\", 35);<\/span>\r\n<span style=\"font-weight: 400;\">user.greet();<\/span><\/pre>\n<h3><b>Generics<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Vi\u1ebft m\u00e3 m\u1ed9t c\u00e1ch linh ho\u1ea1t v\u00e0 c\u00f3 th\u1ec3 ho\u1ea1t \u0111\u1ed9ng v\u1edbi c\u00e1c ki\u1ec3u d\u1eef li\u1ec7u kh\u00e1c nhau b\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng generic. \u0110i\u1ec1u n\u00e0y l\u00e0m gi\u1ea3m s\u1ef1 tr\u00f9ng l\u1eb7p m\u00e3 v\u00e0 th\u00fac \u0111\u1ea9y kh\u1ea3 n\u0103ng b\u1ea3o tr\u00ec t\u1ed1t h\u01a1n.\u00a0<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">function identity&lt;T&gt;(value: T): T {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0return value;<\/span>\r\n<span style=\"font-weight: 400;\">}<\/span>\r\n\r\n<span style=\"font-weight: 400;\">const number = identity(5); <\/span>\r\n<span style=\"font-weight: 400;\">const string = identity(\"hello\");<\/span><\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Cac_chu_de_hoc_TypeScript_nang_cao\"><\/span><b>C\u00e1c ch\u1ee7 \u0111\u1ec1 h\u1ecdc TypeScript n\u00e2ng cao<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">H\u1ec7 th\u1ed1ng type c\u1ee7a TypeScript v\u01b0\u1ee3t xa ki\u1ec3u t\u0129nh c\u01a1 b\u1ea3n. Ch\u00fang cung c\u1ea5p c\u00e1c t\u00ednh n\u0103ng \u0111\u1ec3 x\u00e1c \u0111\u1ecbnh c\u00e1c ki\u1ec3u ph\u1ee9c t\u1ea1p, thao t\u00e1c c\u00e1c ki\u1ec3u, thi\u1ebft l\u1eadp m\u1ed1i quan h\u1ec7 gi\u1eefa c\u00e1c bi\u1ebfn, th\u1ef1c thi c\u00e1c r\u00e0ng bu\u1ed9c v\u00e0 m\u1ed9t s\u1ed1 ch\u1ee9c n\u0103ng kh\u00e1c, cho ph\u00e9p ph\u00e1t tri\u1ec3n \u1ee9ng d\u1ee5ng kh\u00f4ng c\u00f3 l\u1ed7i.<\/span><\/p>\n<h3><b>Ki\u1ec3u h\u1ee3p nh\u1ea5t (Union Type)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Ki\u1ec3u h\u1ee3p nh\u1ea5t trong TypeScript \u0111\u1ec1 c\u1eadp vi\u1ec7c khai b\u00e1o m\u1ed9t bi\u1ebfn ho\u1eb7c \u0111\u1ed1i s\u1ed1 h\u00e0m ch\u1ee9a nhi\u1ec1u ki\u1ec3u d\u1eef li\u1ec7u. \u0110i\u1ec1u n\u00e0y c\u00f3 th\u1ec3 c\u00f3 l\u1ee3i khi m\u1ed9t gi\u00e1 tr\u1ecb c\u00f3 ki\u1ec3u d\u1eef li\u1ec7u kh\u00e1c nhau khi ch\u1ea1y.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Ki\u1ec3u h\u1ee3p nh\u1ea5t \u0111\u01b0\u1ee3c bi\u1ec3u di\u1ec5n b\u1eb1ng k\u00fd hi\u1ec7u |, c\u00f3 ngh\u0129a ph\u00e2n t\u00e1ch c\u00e1c ki\u1ec3u d\u1eef li\u1ec7u. V\u00ed d\u1ee5:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">let age: number | string;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">age = 10;<\/span>\r\n<span style=\"font-weight: 400;\">age = \"ten\";<\/span>\r\n<span style=\"font-weight: 400;\">age = true;<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Theo v\u00ed d\u1ee5 tr\u00ean, b\u1ea1n c\u00f3 th\u1ec3 ch\u1ec9 \u0111\u1ecbnh r\u1eb1ng bi\u1ebfn age c\u00f3 th\u1ec3 s\u1edf h\u1eefu hai ki\u1ec3u d\u1eef li\u1ec7u. \u0110i\u1ec1u n\u00e0y mang l\u1ea1i s\u1ef1 linh ho\u1ea1t m\u00e0 kh\u00f4ng g\u00e2y nguy hi\u1ec3m c\u00f3 t\u00ednh an to\u00e0n.<\/span><\/p>\n<h3><b>Ki\u1ec3u giao nhau (Intersection types)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Ki\u1ec3u giao nhau cho ph\u00e9p t\u1ea1o ki\u1ec3u m\u1edbi b\u1eb1ng c\u00e1ch k\u1ebft h\u1ee3p nhi\u1ec1u ki\u1ec3u hi\u1ec7n c\u00f3 th\u00e0nh m\u1ed9t. Ki\u1ec3u m\u1edbi n\u00e0y c\u00f3 c\u00e1c thu\u1ed9c t\u00ednh v\u00e0 ch\u1ee9c n\u0103ng nh\u01b0 ki\u1ec3u h\u1ee3p nh\u1ea5t (union).\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Ki\u1ec3u giao nhau \u0111\u01b0\u1ee3c k\u00fd hi\u1ec7u b\u1eb1ng &amp; gi\u1eefa c\u00e1c ki\u1ec3u c\u1ea7n k\u1ebft h\u1ee3p. V\u00ed d\u1ee5:\u00a0<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">interface User {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0id: number;<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0username: string;<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0email: string;<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0}<\/span>\r\n\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0interface Admin {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0isAdmin: boolean;<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0}<\/span>\r\n\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\/\/ A new type using intersection type<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0type UserAndAdmin = User &amp; Admin;<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">User AndAdmin k\u1ebft h\u1ee3p c\u00e1c thu\u1ed9c t\u00ednh c\u1ee7a c\u1ea3 giao di\u1ec7n User v\u00e0 Admin \u0111\u1ec3 t\u1ea1o ra m\u1ed9t ki\u1ec3u y\u00eau c\u1ea7u t\u1ea5t c\u1ea3 thu\u1ed9c t\u00ednh t\u1eeb c\u1ea3 hai.<\/span><\/p>\n<h3><b>Ki\u1ec3u c\u00f3 \u0111i\u1ec1u ki\u1ec7n (Conditional Type)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Ki\u1ec3u c\u00f3 \u0111i\u1ec1u ki\u1ec7n trong TypeScript t\u1ea1o ra c\u00e1c ki\u1ec3u ph\u1ee5 thu\u1ed9c v\u00e0o tr\u1ea1ng th\u00e1i, cho ph\u00e9p \u0111\u1ecbnh ngh\u0129a c\u00e1c ki\u1ec3u \u0111\u1ed9ng thay \u0111\u1ed5i d\u1ef1a tr\u00ean c\u00e1c thu\u1ed9c t\u00ednh c\u1ee7a ki\u1ec3u, gi\u00e1 tr\u1ecb ho\u1eb7c ng\u1eef c\u1ea3nh kh\u00e1c.<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">type NonNullable&lt;T&gt; = T extends null | undefined ? never : T;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\/\/ Infer keyword<\/span>\r\n<span style=\"font-weight: 400;\">type ReturnType&lt;T&gt; = T extends (...args: any[]) =&gt; infer R ? R : any;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\/\/ Distributive conditional types<\/span>\r\n<span style=\"font-weight: 400;\">type ToArray&lt;T&gt; = T extends any ? T[] : never;<\/span>\r\n<span style=\"font-weight: 400;\">type StrNumBool = ToArray&lt;string | number | boolean&gt;;<\/span>\r\n<span style=\"font-weight: 400;\">\/\/ = string[] | number[] | boolean[]<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Ki\u1ec3u c\u00f3 \u0111i\u1ec1u ki\u1ec7n \u0111\u01b0\u1ee3c \u0111\u1ecbnh ngh\u0129a b\u1eb1ng c\u00fa ph\u00e1p to\u00e1n t\u1eed ba ng\u00f4i (? \ud83d\ude42 trong d\u1ea5u ngo\u1eb7c nh\u1ecdn (&lt;&gt;) \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 &#8220;tham s\u1ed1 ki\u1ec3u chung&#8221;. Ch\u00fang c\u0169ng s\u1eed d\u1ee5ng t\u1eeb kh\u00f3a extends, cho ph\u00e9p ki\u1ec3m tra xem m\u1ed9t ki\u1ec3u c\u00f3 \u0111\u00e1p \u1ee9ng m\u1ed9t \u0111i\u1ec1u ki\u1ec7n nh\u1ea5t \u0111\u1ecbnh hay kh\u00f4ng v\u00e0 t\u1ea1o ra m\u1ed9t ki\u1ec3u kh\u00e1c d\u1ef1a tr\u00ean k\u1ebft qu\u1ea3 c\u1ee7a \u0111i\u1ec1u ki\u1ec7n \u0111\u00f3.<\/span><\/p>\n<h3><b>Mappedn types<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Mapped type trong TypeScript cho ph\u00e9p t\u1ea1o ra c\u00e1c ki\u1ec3u m\u1edbi b\u1eb1ng c\u00e1ch chuy\u1ec3n \u0111\u1ed5i thu\u1ed9c t\u00ednh c\u1ee7a c\u00e1c ki\u1ec3u hi\u1ec7n c\u00f3. Ch\u00fang th\u1ef1c hi\u1ec7n \u0111i\u1ec1u n\u00e0y b\u1eb1ng c\u00e1ch l\u1eb7p l\u1ea1i c\u00e1c thu\u1ed9c t\u00ednh c\u1ee7a m\u1ed9t ki\u1ec3u ngu\u1ed3n v\u00e0 \u00e1p d\u1ee5ng m\u1ed9t ph\u00e9p chuy\u1ec3n \u0111\u1ed5i cho t\u1eebng thu\u1ed9c t\u00ednh \u0111\u1ec3 t\u1ea1o ra m\u1ed9t ki\u1ec3u m\u1edbi.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">V\u00ed d\u1ee5:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">type User = {<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0id: number;<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0username: string;<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0email: string;<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0};<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0type OptionalUser = { [P in keyof User]?: User[P] };<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0const optionalUser: OptionalUser = { id: 1 };<\/span>\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0optionalUser.username = \"itviec_blog\";<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Mapped type \u0111\u01b0\u1ee3c \u0111\u1ecbnh ngh\u0129a b\u1eb1ng c\u00fa ph\u00e1p { [P trong keyof Type]: NewType }, trong \u0111\u00f3 Type l\u00e0 ki\u1ec3u ngu\u1ed3n, P l\u00e0 kh\u00f3a thu\u1ed9c t\u00ednh v\u00e0 NewType l\u00e0 ki\u1ec3u \u0111\u01b0\u1ee3c chuy\u1ec3n \u0111\u1ed5i. P l\u1eb7p qua c\u00e1c kh\u00f3a thu\u1ed9c t\u00ednh v\u00e0 chuy\u1ec3n \u0111\u1ed5i x\u00e1c \u0111\u1ecbnh thay \u0111\u1ed5i.<\/span><\/p>\n<h3><b>Ki\u1ec3u bi\u1ec7t danh (Type aliases)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Ki\u1ec3u bi\u1ec7t danh (Type aliases) cho ph\u00e9p t\u1ea1o t\u00ean t\u00f9y ch\u1ec9nh (bi\u1ec7t danh) cho c\u00e1c ki\u1ec3u TypeScript hi\u1ec7n c\u00f3, bao g\u1ed3m c\u00e1c ki\u1ec3u nguy\u00ean th\u1ee7y, ki\u1ec3u h\u1ee3p nh\u1ea5t, ki\u1ec3u giao nhau v\u00e0 th\u1eadm ch\u00ed c\u00e1c ki\u1ec3u ph\u1ee9c t\u1ea1p h\u01a1n nh\u01b0 ki\u1ec3u \u0111\u1ed1i t\u01b0\u1ee3ng v\u00e0 ki\u1ec3u h\u00e0m. Bi\u1ec7t danh ki\u1ec3u \u0111\u01b0\u1ee3c \u0111\u1ecbnh ngh\u0129a b\u1eb1ng t\u1eeb kh\u00f3a ki\u1ec3u theo sau l\u00e0 t\u00ean m\u1edbi, nh\u01b0 \u0111\u01b0\u1ee3c hi\u1ec3n th\u1ecb b\u00ean d\u01b0\u1edbi:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">type Result = \"success\" | \"error\";\r\n<\/span>\r\n<span style=\"font-weight: 400;\">type Point = { x: number; y: number };<\/span>\r\n\r\n<span style=\"font-weight: 400;\">type Greeting = (name: string) =&gt; string;<\/span>\r\n\r\n<span style=\"font-weight: 400;\"> \u00a0const status: Result = \"success\";<\/span>\r\n<span style=\"font-weight: 400;\"> \u00a0const origin: Point = { x: 0, y: 0 };<\/span>\r\n<span style=\"font-weight: 400;\">  const greet: Greeting = (name) =&gt; `Hello, ${name}!`;<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">\u0110o\u1ea1n m\u00e3 tr\u00ean cho th\u1ea5y c\u00e1c tr\u01b0\u1eddng h\u1ee3p s\u1eed d\u1ee5ng kh\u00e1c nhau c\u1ee7a bi\u1ec7t danh cho c\u00e1c ki\u1ec3u kh\u00e1c trong TypeScript v\u00e0 c\u00e1ch s\u1eed d\u1ee5ng ch\u00fang sau khi khai b\u00e1o.\u00a0<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"5_nguon_tai_nguyen_tu_hoc_TypeScript_tham_khao\"><\/span><b> 5+ ngu\u1ed3n t\u00e0i nguy\u00ean t\u1ef1 h\u1ecdc TypeScript tham kh\u1ea3o<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">M\u1ed9t s\u1ed1 kh\u00f3a h\u1ecdc TypeScript online m\u00e0 b\u1ea1n c\u00f3 th\u1ec3 tham kh\u1ea3o \u0111\u1ec3 t\u1ef1 h\u1ecdc v\u1ec1 TypeScript hi\u1ec7u qu\u1ea3 h\u01a1n nh\u01b0:\u00a0<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Kh\u00f3a h\u1ecdc<\/b><\/td>\n<td><b>N\u1ec1n t\u1ea3ng<\/b><\/td>\n<td><b>Tr\u00ecnh \u0111\u1ed9<\/b><\/td>\n<td><b>Ch\u1ee9ng ch\u1ec9<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Learn TypeScript\u00a0<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Scrimba<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Trung c\u1ea5p<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Tr\u1ea3 ph\u00ed<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Build JavaScript applications using TypeScript\u00a0<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Microsoft<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Trung c\u1ea5p<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Mi\u1ec5n ph\u00ed<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Learn TypeScript\u00a0<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Codecademy<\/span><\/td>\n<td><span style=\"font-weight: 400;\">C\u01a1 b\u1ea3n<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Tr\u1ea3 ph\u00ed<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Up and Running with TypeScript\u00a0<\/span><\/td>\n<td><span style=\"font-weight: 400;\">egghead.io<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Trung c\u1ea5p<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Kh\u00f4ng c\u00f3 ch\u1ee9ng ch\u1ec9<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Understanding TypeScript\u00a0<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Udemy<\/span><\/td>\n<td><span style=\"font-weight: 400;\">C\u01a1 b\u1ea3n<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Tr\u1ea3 ph\u00ed<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><a href=\"https:\/\/scrimba.com\/learn-typescript-c03c\" target=\"_blank\" rel=\"noopener\"><b>Learn TypeScript<\/b><\/a><b> (Scrimba)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Kh\u00f3a h\u1ecdc Learn Typescript c\u1ee7a Scrimba gi\u00fap b\u1ea1n b\u1eaft \u0111\u1ea7u v\u1edbi TypeScript b\u1eb1ng c\u00e1ch chia c\u00e1c ki\u1ebfn \u200b\u200bth\u1ee9c c\u01a1 b\u1ea3n c\u1ee7a Typescript th\u00e0nh c\u00e1c ph\u1ea7n nh\u1ecf v\u00e0 d\u1ec5 ti\u1ebfp c\u1eadn. Kh\u00f3a h\u1ecdc n\u00e0y nh\u1ea5n m\u1ea1nh ph\u01b0\u01a1ng ph\u00e1p h\u1ecdc th\u1ef1c h\u00e0nh b\u1eb1ng c\u00e1ch x\u00e2y d\u1ef1ng trang web.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0110\u1ebfn cu\u1ed1i kh\u00f3a h\u1ecdc, b\u1ea1n s\u1ebd n\u1eafm \u0111\u01b0\u1ee3c n\u1ec1n t\u1ea3ng c\u01a1 b\u1ea3n v\u1ec1 c\u00e1c ki\u1ec3u d\u1eef li\u1ec7u nguy\u00ean th\u1ee7y, ki\u1ec3u d\u1eef li\u1ec7u c\u00f3 c\u1ea5u tr\u00fac, t\u1ed5 ch\u1ee9c t\u1ec7p, m\u00f4-\u0111un, l\u1edbp, bi\u00ean d\u1ecbch,&#8230;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Ngo\u00e0i ra, Scrimba c\u00f3 c\u1ed9ng \u0111\u1ed3ng Discord h\u1eefu \u00edch, n\u01a1i b\u1ea1n c\u00f3 th\u1ec3 \u0111\u1eb7t c\u00e2u h\u1ecfi v\u00e0 chia s\u1ebb \u00fd t\u01b0\u1edfng v\u1edbi nh\u1eefng ng\u01b0\u1eddi h\u1ecdc kh\u00e1c ho\u1eb7c c\u1ed1 v\u1ea5n. \u0110\u1ec3 tham gia kh\u00f3a h\u1ecdc n\u00e0y, b\u1ea1n ph\u1ea3i c\u00f3 hi\u1ec3u bi\u1ebft c\u01a1 b\u1ea3n v\u1ec1 HTML, CSS v\u00e0 JavaScript.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Nh\u1eefng g\u00ec b\u1ea1n s\u1ebd h\u1ecdc \u0111\u01b0\u1ee3c:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Ki\u1ebfn th\u1ee9c c\u01a1 b\u1ea3n v\u1ec1 TypeScript v\u00e0 l\u1ee3i th\u1ebf c\u1ee7a n\u00f3 so v\u1edbi JavaScript<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u00e1c ki\u1ec3u thi\u1ebft y\u1ebfu: ki\u1ec3u nguy\u00ean th\u1ee7y, \u0111\u1ed1i t\u01b0\u1ee3ng, m\u1ea3ng, b\u1ed9, enum, h\u1ee3p nh\u1ea5t,&#8230;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u1ee8ng d\u1ee5ng th\u1ef1c t\u1ebf c\u1ee7a TypeScript trong c\u00e1c d\u1ef1 \u00e1n ph\u00e1t tri\u1ec3n web<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u00e1c kh\u00e1i ni\u1ec7m n\u00e2ng cao nh\u01b0 giao di\u1ec7n, m\u00f4-\u0111un v\u00e0 l\u1edbp<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">S\u1eed d\u1ee5ng tr\u00ecnh bi\u00ean d\u1ecbch TypeScript v\u00e0 kh\u1eafc ph\u1ee5c c\u00e1c l\u1ed7i th\u01b0\u1eddng g\u1eb7p<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u00e1c ph\u01b0\u01a1ng ph\u00e1p hay nh\u1ea5t \u0111\u1ec3 t\u1ed5 ch\u1ee9c v\u00e0 c\u1ea5u tr\u00fac m\u00e3 TypeScript.<\/span><\/li>\n<\/ul>\n<h3><a href=\"https:\/\/learn.microsoft.com\/en-us\/training\/paths\/build-javascript-applications-typescript\/\" target=\"_blank\" rel=\"noopener\"><b>Build JavaScript applications using TypeScript<\/b><\/a><b> (Microsoft)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Trong Build JavaScript b\u1eb1ng TypeScript, b\u1ea1n s\u1ebd \u0111\u01b0\u1ee3c ti\u1ebfp c\u1eadn v\u1edbi c\u00e1ch s\u1eed d\u1ee5ng TypeScript \u0111\u1ec3 ph\u00e1t tri\u1ec3n JavaScript. \u0110i\u1ec1u n\u00e0y c\u00f3 th\u1ec3 gi\u00fap b\u1ea1n x\u00e2y d\u1ef1ng m\u00e3 m\u1ea1nh m\u1ebd h\u01a1n, gi\u1ea3m l\u1ed7i lo\u1ea1i th\u1eddi gian ch\u1ea1y, t\u1eadn d\u1ee5ng c\u00e1c t\u00ednh n\u0103ng hi\u1ec7n \u0111\u1ea1i tr\u01b0\u1edbc khi ch\u00fang c\u00f3 s\u1eb5n trong JavaScript v\u00e0 l\u00e0m vi\u1ec7c t\u1ed1t h\u01a1n.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Ngo\u00e0i ra, n\u1ebfu b\u1ea1n ho\u00e0n th\u00e0nh kh\u00f3a h\u1ecdc, b\u1ea1n s\u1ebd nh\u1eadn \u0111\u01b0\u1ee3c ch\u1ee9ng ch\u1ec9 mi\u1ec5n ph\u00ed. \u0110\u1ec3 tham gia kh\u00f3a h\u1ecdc n\u00e0y, b\u1ea1n s\u1ebd c\u1ea7n c\u00f3 ki\u1ebfn \u200b\u200bth\u1ee9c c\u01a1 b\u1ea3n v\u1ec1 HTML v\u00e0 JavaScript ES6.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Nh\u1eefng \u0111i\u1ec1u b\u1ea1n s\u1ebd h\u1ecdc \u0111\u01b0\u1ee3c khi tham gia kh\u00f3a h\u1ecdc:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp m\u00f4i tr\u01b0\u1eddng TypeScript trong Visual Studio Code<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">H\u1ec7 th\u1ed1ng ki\u1ec3u t\u0129nh c\u1ee7a TypeScript v\u00e0 c\u00e1c l\u1ee3i \u00edch c\u1ee7a n\u00f3<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">L\u1eadp tr\u00ecnh h\u01b0\u1edbng \u0111\u1ed1i t\u01b0\u1ee3ng v\u1edbi giao di\u1ec7n trong TypeScript<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u00e1c t\u00ednh n\u0103ng h\u00e0m v\u00e0 l\u1edbp n\u00e2ng cao ch\u1ec9 c\u00f3 trong TypeScript<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">S\u1eed d\u1ee5ng generic \u0111\u1ec3 t\u1ea1o m\u1eabu m\u00e3 c\u00f3 th\u1ec3 t\u00e1i s\u1eed d\u1ee5ng<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">S\u1eafp x\u1ebfp m\u00e3 b\u1eb1ng m\u00f4-\u0111un v\u00e0 kh\u00f4ng gian t\u00ean.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Nh\u1eadp th\u01b0 vi\u1ec7n ki\u1ec3u b\u00ean ngo\u00e0i.<\/span><\/li>\n<\/ul>\n<h3><a href=\"https:\/\/www.codecademy.com\/learn\/learn-typescript\"><b>Learn TypeScript<\/b><\/a><b> (Codecademy)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Trong kh\u00f3a h\u1ecdc mi\u1ec5n ph\u00ed n\u00e0y, b\u1ea1n s\u1ebd \u00e1p d\u1ee5ng c\u00fa ph\u00e1p JavaScript \u0111\u00e3 bi\u1ebft v\u00e0o h\u1ec7 th\u1ed1ng ki\u1ec3u c\u1ee7a TypeScript. \u0110\u1ebfn cu\u1ed1i kh\u00f3a h\u1ecdc, b\u1ea1n s\u1ebd quen thu\u1ed9c v\u1edbi c\u00e1ch TypeScript ho\u1ea1t \u0111\u1ed9ng. B\u1ea1n s\u1ebd c\u1ea7n m\u1ed9t s\u1ed1 kinh nghi\u1ec7m v\u1ec1 JavaScript \u0111\u1ec3 t\u1eadn d\u1ee5ng t\u1ed1i \u0111a kh\u00f3a h\u1ecdc n\u00e0y.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Nh\u1eefng g\u00ec b\u1ea1n s\u1ebd h\u1ecdc:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u01a1 b\u1ea3n v\u1ec1 TypeScript v\u00e0 h\u1ec7 th\u1ed1ng ch\u00fa th\u00edch ki\u1ec3u c\u1ee7a n\u00f3<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Vi\u1ebft v\u00e0 s\u1eed d\u1ee5ng c\u00e1c h\u00e0m trong TypeScript, l\u00e0m n\u1ed5i b\u1eadt s\u1ef1 kh\u00e1c bi\u1ec7t so v\u1edbi JavaScript<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u00e1c ki\u1ec3u ph\u1ee9c t\u1ea1p cho m\u1ea3ng v\u00e0 \u0111\u1ed1i t\u01b0\u1ee3ng<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u00e1c ki\u1ec3u h\u1ee3p nh\u1ea5t \u0111\u1ec3 k\u1ebft h\u1ee3p c\u00e1c ki\u1ec3u ri\u00eang l\u1ebb m\u1ed9t c\u00e1ch linh ho\u1ea1t<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Thu h\u1eb9p ki\u1ec3u b\u1eb1ng c\u00e1c b\u1ea3o v\u1ec7 ki\u1ec3u \u0111\u1ec3 t\u1ed1i \u01b0u h\u00f3a h\u00e0nh vi th\u1eddi gian ch\u1ea1y<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u00e1c kh\u00e1i ni\u1ec7m n\u00e2ng cao: giao di\u1ec7n cho c\u00e1c ki\u1ec3u v\u00e0 l\u1edbp, c\u00e1c ki\u1ec3u s\u00e2u v\u00e0 h\u1ee3p th\u00e0nh, ch\u1eef k\u00fd ch\u1ec9 m\u1ee5c.<\/span><\/li>\n<\/ul>\n<h3><a href=\"https:\/\/egghead.io\/courses\/up-and-running-with-typescript\"><b>Up and Running with TypeScript (egghead.io)<\/b><\/a><\/h3>\n<p><span style=\"font-weight: 400;\">Kh\u00f3a h\u1ecdc mi\u1ec5n ph\u00ed ng\u1eafn g\u1ecdn v\u00e0 d\u1ec5 hi\u1ec3u s\u1ebd h\u01b0\u1edbng d\u1eabn b\u1ea1n nh\u1eefng ki\u1ebfn \u200b\u200bth\u1ee9c c\u01a1 b\u1ea3n v\u1ec1 m\u00e3 h\u00f3a b\u1eb1ng TypeScript. \u0110\u1ebfn cu\u1ed1i kh\u00f3a h\u1ecdc, b\u1ea1n s\u1ebd bi\u1ebft v\u1ec1 tr\u00ecnh bi\u00ean d\u1ecbch TypeScript, c\u00e1ch c\u1ea5u h\u00ecnh d\u1ef1 \u00e1n, t\u1ec7p \u0111\u1ecbnh ngh\u0129a v\u00e0 c\u00e1ch s\u1eed d\u1ee5ng TypeScript trong d\u1ef1 \u00e1n c\u1ee7a m\u00ecnh.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0110\u1ec3 tham gia kh\u00f3a h\u1ecdc n\u00e0y, b\u1ea1n s\u1ebd c\u1ea7n c\u00f3 m\u1ed9t s\u1ed1 kinh nghi\u1ec7m v\u1ec1 JavaScript.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">M\u1ed9t s\u1ed1 \u0111i\u1ec3m n\u1ed5i b\u1eadt kh\u00f3a h\u1ecdc \u0111em \u0111\u1ebfn cho b\u1ea1n nh\u01b0:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Thi\u1ebft l\u1eadp m\u1ed9t d\u1ef1 \u00e1n TypeScript th\u00f4ng th\u01b0\u1eddng<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u1ea5u h\u00ecnh TypeScript cho React v\u00e0 JSX<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Hi\u1ec3u v\u1ec1 tr\u00ecnh bi\u00ean d\u1ecbch TypeScript<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Kh\u00e1m ph\u00e1 h\u1ec7 th\u1ed1ng ki\u1ec3u c\u1ee7a TypeScript<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Vi\u1ebft h\u00e0m trong TypeScript<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">L\u00e0m vi\u1ec7c v\u1edbi c\u00e1c ph\u1ea7n t\u1eed DOM b\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng c\u00e1c kh\u1eb3ng \u0111\u1ecbnh ki\u1ec3u<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">T\u1ea1o c\u00e1c ki\u1ec3u chung cho c\u00e1c ki\u1ec3u th\u00e0nh ph\u1ea7n linh ho\u1ea1t<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">S\u1eed d\u1ee5ng c\u00e1c \u0111\u1ecbnh ngh\u0129a ki\u1ec3u cho c\u00e1c d\u1ef1 \u00e1n npm.<\/span><\/li>\n<\/ul>\n<h3><a href=\"https:\/\/www.udemy.com\/course\/understanding-typescript\/\"><b>Understanding TypeScript (Udemy)<\/b><\/a><\/h3>\n<p><span style=\"font-weight: 400;\">Kh\u00f3a h\u1ecdc to\u00e0n di\u1ec7n n\u00e0y s\u1ebd d\u1ea1y b\u1ea1n c\u00e1c kh\u00e1i ni\u1ec7m c\u1ea7n thi\u1ebft \u0111\u1ec3 l\u1eadp tr\u00ecnh trong TypeScript, c\u00f9ng v\u1edbi c\u00e1c d\u1ef1 \u00e1n th\u1ef1c t\u1ebf \u0111\u1ec3 c\u1ee7ng c\u1ed1 ki\u1ebfn \u200b\u200bth\u1ee9c hi\u1ec7u qu\u1ea3. Khi k\u1ebft th\u00fac kh\u00f3a h\u1ecdc, b\u1ea1n s\u1ebd l\u00e0m quen \u0111\u01b0\u1ee3c v\u1edbi TypeScript v\u00e0 trang b\u1ecb ki\u1ebfn \u200b\u200bth\u1ee9c v\u1ec1 hai frameworks l\u00e0 Angular v\u00e0 ReactJS.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Ngo\u00e0i ra, b\u1ea1n s\u1ebd c\u1ea7n c\u00f3 m\u1ed9t s\u1ed1 ki\u1ebfn \u200b\u200bth\u1ee9c c\u01a1 b\u1ea3n v\u1ec1 JavaScript khi tham gia kh\u00f3a h\u1ecdc n\u00e0y.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Kh\u00f3a h\u1ecdc cung c\u1ea5p m\u1ed9t s\u1ed1 ki\u1ebfn th\u1ee9c c\u01a1 b\u1ea3n nh\u01b0:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Nh\u1eefng \u0111i\u1ec1u c\u01a1 b\u1ea3n v\u00e0 \u01b0u \u0111i\u1ec3m c\u1ee7a TypeScript so v\u1edbi JavaScript<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Nghi\u00ean c\u1ee9u chuy\u00ean s\u00e2u v\u1ec1 c\u00e1c t\u00ednh n\u0103ng \u0111\u1ed9c \u0111\u00e1o v\u00e0 c\u00e1c ki\u1ec3u \u0111\u00e3 khai b\u00e1o c\u1ee7a TypeScript<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u1ea5u h\u00ecnh v\u00e0 t\u1ed1i \u01b0u h\u00f3a tr\u00ecnh bi\u00ean d\u1ecbch<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">T\u00edch h\u1ee3p c\u00e1c t\u00ednh n\u0103ng JavaScript th\u1ebf h\u1ec7 ti\u1ebfp theo v\u00e0o TypeScript<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u00e1c kh\u00e1i ni\u1ec7m n\u00e2ng cao nh\u01b0 c\u00e1c ki\u1ec3u chung \u0111\u1ec3 t\u00e1i s\u1eed d\u1ee5ng m\u00e3 v\u00e0 c\u00e1c tr\u00ecnh trang tr\u00ed \u0111\u1ec3 s\u1eeda \u0111\u1ed5i h\u00e0m<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u1ee8ng d\u1ee5ng th\u1ef1c t\u1ebf th\u00f4ng qua c\u00e1c d\u1ef1 \u00e1n<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">T\u1ed5 ch\u1ee9c m\u00e3 v\u1edbi kh\u00f4ng gian t\u00ean v\u00e0 m\u00f4-\u0111un<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u00e1c c\u00f4ng c\u1ee5 ph\u00e1t tri\u1ec3n front-end hi\u1ec7n \u0111\u1ea1i nh\u01b0 Webpack<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">S\u1eed d\u1ee5ng TypeScript v\u1edbi c\u00e1c th\u01b0 vi\u1ec7n v\u00e0 framework c\u1ee7a b\u00ean th\u1ee9 ba (Angular, ReactJS, NodeJS).<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Ngo\u00e0i ra, m\u1ed9t s\u1ed1 kh\u00f3a h\u1ecdc kh\u00e1c b\u1ea1n c\u00f3 th\u1ec3 tham kh\u1ea3o nh\u01b0:\u00a0<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/www.classcentral.com\/course\/codemastery-ts-interactive-handbook-97449\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Also Great Free Article-Based Course (CodeMastery.dev)<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/www.classcentral.com\/course\/freecodecamp-learn-typescript-full-course-for-beginners-97400\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Best Concise Course to Get You Started (fCC)<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/www.classcentral.com\/course\/youtube-no-bs-ts-97401\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Best Video-Based Course (Jack Herrington)<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/www.classcentral.com\/course\/independent-typescript-deep-dive-97409\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Best Text-Based Course (Basarat Ali)<\/span><\/a><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Cau_hoi_thuong_gap_ve_hoc_TypeScript\"><\/span><b>C\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p v\u1ec1 h\u1ecdc TypeScript<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><b>Khi n\u00e0o c\u1ea7n s\u1eed d\u1ee5ng TypeScript?<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Nh\u00ecn chung, TypeScript c\u00f3 th\u1ec3 \u00e1p d\u1ee5ng cho h\u1ea7u h\u1ebft c\u00e1c lo\u1ea1i d\u1ef1 \u00e1n JavaScript nh\u01b0:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>T\u00ednh \u1ee9ng d\u1ee5ng cao:<\/b><span style=\"font-weight: 400;\"> TypeScript \u0111\u01b0\u1ee3c ph\u00e1t tri\u1ec3n \u0111\u1ec3 gi\u1ea3i quy\u1ebft c\u00e1c v\u1ea5n \u0111\u1ec1 m\u1edf r\u1ed9ng h\u01a1n c\u1ee7a JavaScript. Do \u0111\u00f3, khi m\u1ed9t d\u1ef1 \u00e1n ph\u00e1t tri\u1ec3n, ki\u1ec3u t\u0129nh s\u1ebd gi\u00fap ph\u00e1t hi\u1ec7n l\u1ed7i s\u1edbm v\u00e0 c\u1ea3i thi\u1ec7n kh\u1ea3 n\u0103ng b\u1ea3o tr\u00ec m\u00e3 t\u1ed1t h\u01a1n.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>D\u1ef1 \u00e1n d\u00e0i h\u1ea1n:<\/b><span style=\"font-weight: 400;\"> TypeScript s\u1ebd ph\u00f9 h\u1ee3p v\u1edbi c\u00e1c d\u1ef1 \u00e1n c\u00f3 t\u00ednh ch\u1ea5t l\u00e2u d\u00e0i. B\u1edfi v\u00ec kh\u1ea3 n\u0103ng b\u1ea3o tr\u00ec m\u00e3, kh\u1ea3 n\u0103ng m\u1edf r\u1ed9ng v\u00e0 kh\u1ea3 n\u0103ng ch\u1ed1ng l\u1ed7i c\u1ee7a TypeScript s\u1ebd gi\u00fap b\u1ea3o tr\u00ec cho v\u00f2ng \u0111\u1eddi ph\u00e1t tri\u1ec3n c\u1ee7a \u1ee9ng d\u1ee5ng hi\u1ec7u qu\u1ea3 h\u01a1n.\u00a0<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Ng\u01b0\u1ee3c l\u1ea1i, v\u1edbi nh\u1eefng d\u1ef1 \u00e1n c\u00f3 quy m\u00f4 nh\u1ecf v\u00e0 \u0111\u1ed9 ph\u1ee9c t\u1ea1p kh\u00f4ng qu\u00e1 nhi\u1ec1u th\u00ec b\u1ea1n c\u00f3 th\u1ec3 c\u00e2n nh\u1eafc s\u1eed d\u1ee5ng c\u00e1c ng\u00f4n ng\u1eef kh\u00e1c thay v\u00ec TypeScript.\u00a0<\/span><\/p>\n<h3><b>H\u1ecdc TypeScript hay Python t\u1ed1t h\u01a1n?<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">C\u1ea3 Python v\u00e0 TypeScript \u0111\u1ec1u c\u00f3 \u0111i\u1ec3m m\u1ea1nh ri\u00eang. TypeScript c\u00f3 th\u1ec3 cung c\u1ea5p hi\u1ec7u su\u1ea5t t\u1ed1t, \u0111\u1eb7c bi\u1ec7t \u1edf m\u00e1y kh\u00e1ch, trong khi Python l\u1ea1i v\u01b0\u1ee3t tr\u1ed9i \u1edf c\u00e1c l\u0129nh v\u1ef1c nh\u01b0 Khoa h\u1ecdc d\u1eef li\u1ec7u v\u00e0 Machine Learning. L\u1ef1a ch\u1ecdn h\u1ecdc TypeScript hay Python s\u1ebd ph\u1ee5 thu\u1ed9c v\u00e0o nhu c\u1ea7u c\u1ee5 th\u1ec3 c\u1ee7a b\u1ea1n c\u0169ng nh\u01b0 t\u00ednh ch\u1ea5t d\u1ef1 \u00e1n.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Tong_ket_ve_hoc_TypeScript\"><\/span><b>T\u1ed5ng k\u1ebft v\u1ec1 h\u1ecdc TypeScript\u00a0<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">B\u00e0i vi\u1ebft \u0111\u00e3 cung c\u1ea5p chi ti\u1ebft v\u1ec1 TypeScript c\u0169ng nh\u01b0 nh\u1eefng \u0111i\u1ec1u c\u01a1 b\u1ea3n c\u1ea7n n\u1eafm khi <\/span><b>h\u1ecdc TypeScript<\/b><span style=\"font-weight: 400;\"> cho ng\u01b0\u1eddi m\u1edbi b\u1eaft \u0111\u1ea7u. H\u1ec7 th\u1ed1ng type m\u1ea1nh m\u1ebd c\u1ee7a TypeScript c\u00f9ng c\u00e1c t\u00ednh n\u0103ng JavaScript hi\u1ec7n \u0111\u1ea1i khi\u1ebfn n\u00f3 tr\u1edf th\u00e0nh l\u1ef1a ch\u1ecdn l\u00fd t\u01b0\u1edfng \u0111\u1ec3 x\u00e2y d\u1ef1ng c\u00e1c \u1ee9ng d\u1ee5ng m\u1ea1nh m\u1ebd v\u00e0 d\u1ec5 b\u1ea3o tr\u00ec.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>TypeScript l\u00e0 ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh \u0111\u01b0\u1ee3c ph\u00e1t tri\u1ec3n \u0111\u1ec3 m\u1edf r\u1ed9ng JavaScript, mang l\u1ea1i tr\u1ea3i nghi\u1ec7m l\u1eadp tr\u00ecnh hi\u1ec7u qu\u1ea3 h\u01a1n. H\u1ecdc TypeScript kh\u00f4ng ch\u1ec9 gi\u00fap b\u1ea1n t\u1ed1i \u01b0u h\u00f3a m\u00e3 ngu\u1ed3n hi\u1ec7u qu\u1ea3, n\u00e2ng cao kh\u1ea3 n\u0103ng x\u00e2y d\u1ef1ng c\u00e1c d\u1ef1 \u00e1n l\u1edbn d\u1ec5 d\u00e0ng h\u01a1n m\u00e0 c\u00f2n mang l\u1ea1i m\u1ed9t s\u1ef1 nghi\u1ec7p [&hellip;]<\/p>\n","protected":false},"author":207,"featured_media":83676,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_gspb_post_css":"","footnotes":""},"categories":[109],"tags":[],"class_list":["post-83248","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-chuyen-mon-it"],"blocksy_meta":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.8 (Yoast SEO v27.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>H\u1ecdc TypeScript t\u1eeb c\u01a1 b\u1ea3n \u0111\u1ebfn n\u00e2ng cao v\u1edbi l\u1ed9 tr\u00ecnh h\u1ecdc 2025 - ITviec Blog<\/title>\n<meta name=\"description\" content=\"L\u01b0u ngay l\u1ed9 tr\u00ecnh h\u1ecdc TypeScript A-Z v\u1edbi c\u00e1c ch\u1ee7 \u0111\u1ec1 c\u01a1 b\u1ea3n, n\u00e2ng cao, h\u01b0\u1edbng d\u1eabn c\u00e1ch b\u1eaft \u0111\u1ea7u v\u1edbi TypeScript v\u00e0 v\u00ec sao b\u1ea1n n\u00ean h\u1ecdc trong 2025.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/\" \/>\n<meta property=\"og:locale\" content=\"vi_VN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"H\u1ecdc TypeScript t\u1eeb c\u01a1 b\u1ea3n \u0111\u1ebfn n\u00e2ng cao v\u1edbi l\u1ed9 tr\u00ecnh h\u1ecdc 2025\" \/>\n<meta property=\"og:description\" content=\"TypeScript l\u00e0 ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh \u0111\u01b0\u1ee3c ph\u00e1t tri\u1ec3n \u0111\u1ec3 m\u1edf r\u1ed9ng JavaScript, mang l\u1ea1i tr\u1ea3i nghi\u1ec7m l\u1eadp tr\u00ecnh hi\u1ec7u qu\u1ea3 h\u01a1n. H\u1ecdc TypeScript kh\u00f4ng ch\u1ec9 gi\u00fap b\u1ea1n t\u1ed1i\" \/>\n<meta property=\"og:url\" content=\"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/\" \/>\n<meta property=\"og:site_name\" content=\"ITviec Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ITviec\" \/>\n<meta property=\"article:published_time\" content=\"2025-01-01T09:48:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/01\/hoc-Typescript-vippro.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1500\" \/>\n\t<meta property=\"og:image:height\" content=\"790\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Uyen Ngo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ITviec\" \/>\n<meta name=\"twitter:site\" content=\"@ITviec\" \/>\n<meta name=\"twitter:label1\" content=\"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi\" \/>\n\t<meta name=\"twitter:data1\" content=\"Uyen Ngo\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc\" \/>\n\t<meta name=\"twitter:data2\" content=\"20 ph\u00fat\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"H\u1ecdc TypeScript t\u1eeb c\u01a1 b\u1ea3n \u0111\u1ebfn n\u00e2ng cao v\u1edbi l\u1ed9 tr\u00ecnh h\u1ecdc 2025 - ITviec Blog","description":"L\u01b0u ngay l\u1ed9 tr\u00ecnh h\u1ecdc TypeScript A-Z v\u1edbi c\u00e1c ch\u1ee7 \u0111\u1ec1 c\u01a1 b\u1ea3n, n\u00e2ng cao, h\u01b0\u1edbng d\u1eabn c\u00e1ch b\u1eaft \u0111\u1ea7u v\u1edbi TypeScript v\u00e0 v\u00ec sao b\u1ea1n n\u00ean h\u1ecdc trong 2025.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/","og_locale":"vi_VN","og_type":"article","og_title":"H\u1ecdc TypeScript t\u1eeb c\u01a1 b\u1ea3n \u0111\u1ebfn n\u00e2ng cao v\u1edbi l\u1ed9 tr\u00ecnh h\u1ecdc 2025","og_description":"TypeScript l\u00e0 ng\u00f4n ng\u1eef l\u1eadp tr\u00ecnh \u0111\u01b0\u1ee3c ph\u00e1t tri\u1ec3n \u0111\u1ec3 m\u1edf r\u1ed9ng JavaScript, mang l\u1ea1i tr\u1ea3i nghi\u1ec7m l\u1eadp tr\u00ecnh hi\u1ec7u qu\u1ea3 h\u01a1n. H\u1ecdc TypeScript kh\u00f4ng ch\u1ec9 gi\u00fap b\u1ea1n t\u1ed1i","og_url":"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/","og_site_name":"ITviec Blog","article_publisher":"https:\/\/www.facebook.com\/ITviec","article_published_time":"2025-01-01T09:48:43+00:00","og_image":[{"width":1500,"height":790,"url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/01\/hoc-Typescript-vippro.jpg","type":"image\/jpeg"}],"author":"Uyen Ngo","twitter_card":"summary_large_image","twitter_creator":"@ITviec","twitter_site":"@ITviec","twitter_misc":{"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi":"Uyen Ngo","\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc":"20 ph\u00fat"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/#article","isPartOf":{"@id":"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/"},"author":{"name":"Uyen Ngo","@id":"https:\/\/itviec.com\/blog\/#\/schema\/person\/f4cd1226846e0258c664e170d3e52d20"},"headline":"H\u1ecdc TypeScript t\u1eeb c\u01a1 b\u1ea3n \u0111\u1ebfn n\u00e2ng cao v\u1edbi l\u1ed9 tr\u00ecnh h\u1ecdc 2025","datePublished":"2025-01-01T09:48:43+00:00","mainEntityOfPage":{"@id":"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/"},"wordCount":5501,"publisher":{"@id":"https:\/\/itviec.com\/blog\/#organization"},"image":{"@id":"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/#primaryimage"},"thumbnailUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/01\/hoc-Typescript-vippro.jpg","articleSection":["Chuy\u00ean m\u00f4n IT"],"inLanguage":"vi"},{"@type":"WebPage","@id":"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/","url":"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/","name":"H\u1ecdc TypeScript t\u1eeb c\u01a1 b\u1ea3n \u0111\u1ebfn n\u00e2ng cao v\u1edbi l\u1ed9 tr\u00ecnh h\u1ecdc 2025 - ITviec Blog","isPartOf":{"@id":"https:\/\/itviec.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/#primaryimage"},"image":{"@id":"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/#primaryimage"},"thumbnailUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/01\/hoc-Typescript-vippro.jpg","datePublished":"2025-01-01T09:48:43+00:00","description":"L\u01b0u ngay l\u1ed9 tr\u00ecnh h\u1ecdc TypeScript A-Z v\u1edbi c\u00e1c ch\u1ee7 \u0111\u1ec1 c\u01a1 b\u1ea3n, n\u00e2ng cao, h\u01b0\u1edbng d\u1eabn c\u00e1ch b\u1eaft \u0111\u1ea7u v\u1edbi TypeScript v\u00e0 v\u00ec sao b\u1ea1n n\u00ean h\u1ecdc trong 2025.","breadcrumb":{"@id":"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/#breadcrumb"},"inLanguage":"vi","potentialAction":[{"@type":"ReadAction","target":["https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/"]}]},{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/#primaryimage","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/01\/hoc-Typescript-vippro.jpg","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/01\/hoc-Typescript-vippro.jpg","width":1500,"height":790,"caption":"l\u1ed9 tr\u00ecnh ho\u0323c Typescript - itviec blog"},{"@type":"BreadcrumbList","@id":"https:\/\/itviec.com\/blog\/lo-trinh-hoc-typescript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Chuy\u00ean m\u00f4n IT","item":"https:\/\/itviec.com\/blog\/chuyen-mon-it\/"},{"@type":"ListItem","position":2,"name":"H\u1ecdc TypeScript t\u1eeb c\u01a1 b\u1ea3n \u0111\u1ebfn n\u00e2ng cao v\u1edbi l\u1ed9 tr\u00ecnh h\u1ecdc 2025"}]},{"@type":"WebSite","@id":"https:\/\/itviec.com\/blog\/#website","url":"https:\/\/itviec.com\/blog\/","name":"ITviec Blog","description":"IT Jobs &amp; People in Vietnam","publisher":{"@id":"https:\/\/itviec.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/itviec.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"vi"},{"@type":"Organization","@id":"https:\/\/itviec.com\/blog\/#organization","name":"ITviec","url":"https:\/\/itviec.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2018\/12\/itviec-black-square-facebook.png","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2018\/12\/itviec-black-square-facebook.png","width":1800,"height":1800,"caption":"ITviec"},"image":{"@id":"https:\/\/itviec.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ITviec","https:\/\/x.com\/ITviec","https:\/\/www.linkedin.com\/company\/itviec","https:\/\/www.youtube.com\/channel\/UCYthAQ3bcGr57M_ag5gHDvQ"]},{"@type":"Person","@id":"https:\/\/itviec.com\/blog\/#\/schema\/person\/f4cd1226846e0258c664e170d3e52d20","name":"Uyen Ngo","image":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/ngo-thieu-my-uyen-author-e1709880420317-100x100.jpg","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/ngo-thieu-my-uyen-author-e1709880420317-100x100.jpg","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/ngo-thieu-my-uyen-author-e1709880420317-100x100.jpg","caption":"Uyen Ngo"},"url":"https:\/\/itviec.com\/blog\/author\/uyen-ngo\/"}]}},"_links":{"self":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/83248","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/users\/207"}],"replies":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/comments?post=83248"}],"version-history":[{"count":0,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/83248\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/media\/83676"}],"wp:attachment":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/media?parent=83248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/categories?post=83248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/tags?post=83248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}