{"id":304903,"date":"2020-06-05T15:01:06","date_gmt":"2020-06-05T15:01:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=304903"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=304903","title":{"rendered":"12 \u0441\u043e\u0432\u0435\u0442\u043e\u0432 \u043f\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044e TypeScript \u0432 React-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/tinkoff\/blog\/505488\/\">TypeScript \u2014 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u043c <a href=\"https:\/\/2019.stateofjs.com\/ru\/javascript-flavors\/typescript\/\">State of JavaScript<\/a>, TS \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u044f\u0432\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441 \u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432. \u041f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u043e\u043f\u0440\u043e\u0441\u0430 \u0437\u0430 2019 \u0433\u043e\u0434, \u043f\u043e\u0447\u0442\u0438 60% \u0440\u0435\u0441\u043f\u043e\u043d\u0434\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 TS \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, 22% \u043d\u0435 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0438 \u0436\u0435\u043b\u0430\u044e\u0442 \u0438\u0437\u0443\u0447\u0438\u0442\u044c.<\/p>\n<p>  \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u2014 \u0441\u0431\u043e\u0440\u043d\u0438\u043a \u0441\u043e\u0432\u0435\u0442\u043e\u0432 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0438 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 TypeScript. \u041f\u0435\u0440\u0432\u0430\u044f \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0441\u043e\u0432\u0435\u0442\u043e\u0432 \u043e\u0431\u0449\u0430\u044f, \u043a\u0430\u0441\u0430\u044e\u0449\u0430\u044f\u0441\u044f \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0438 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u0412\u0442\u043e\u0440\u0430\u044f \u2014 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u043e\u0431\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0444\u0438\u0448\u0435\u043a \u044f\u0437\u044b\u043a\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/di\/nt\/qe\/dintqe2eppni8xbm7oooyd4bui4.png\"><br \/>  <a name=\"habracut\"><\/a><br \/>  \u042f \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0441\u044c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 React-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043e\u0434\u043d\u0430\u043a\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0432\u0435\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b \u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445.<\/p>\n<h2>\u0421\u043e\u0432\u0435\u0442 1: \u043d\u0435\u0442\u0435\u0440\u043f\u0438\u043c\u043e\u0441\u0442\u044c \u043a \u043e\u0448\u0438\u0431\u043a\u0430\u043c<\/h2>\n<p>  \u041a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u2014 \u044d\u0442\u043e \u0434\u043e\u0432\u0435\u0440\u0438\u0435 \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c\u0443 \u043a\u043e\u0434\u0443 \u0438 \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430. \u0427\u0442\u043e\u0431\u044b \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u043d\u0430 \u0432\u0430\u0441, \u043d\u0443\u0436\u043d\u043e \u0441\u0442\u0440\u043e\u0433\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u044c\u0441\u044f \u043a \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u043c \u0442\u0438\u043f\u043e\u0432:<\/p>\n<ol>\n<li>\u0421\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0434\u043b\u044f dev-\u0440\u0435\u0436\u0438\u043c\u0430, \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0437\u0443 \u0432\u0438\u0434\u0435\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438.<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u0432 CI \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0443\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442. \u042d\u0442\u043e \u0434\u0430\u0441\u0442 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0442\u0438\u043f\u044b.<\/li>\n<\/ol>\n<p>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0432\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 ts-\u0444\u0430\u0439\u043b\u043e\u0432: \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 <a href=\"https:\/\/www.typescriptlang.org\/docs\/handbook\/compiler-options.html\">TSC<\/a> \u0438 <a href=\"https:\/\/babeljs.io\/docs\/en\/babel-preset-typescript\">@babel\/preset-typescript.<\/a> \u041c\u0435\u0442\u043e\u0434 babel \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d: \u0438\u0437 .ts \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u044b\u0440\u0435\u0437\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u0438\u043f\u0430\u0445, \u0437\u0430 \u0441\u0447\u0435\u0442 \u0447\u0435\u0433\u043e \u0441\u0431\u043e\u0440\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0439. \u0412\u043e\u0442 <a href=\"https:\/\/iamturns.com\/typescript-babel\/\">\u0441\u0442\u0430\u0442\u044c\u044f \u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0438.<\/a><\/p>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0438\u043f\u043e\u0432 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 babel \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/www.npmjs.com\/package\/fork-ts-checker-webpack-plugin\">fork-ts-checker-webpack-plugin.<\/a> \u0412 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0442\u043e\u0438\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0443 \u0438 \u043d\u0435 \u043c\u0435\u0448\u0430\u0442\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434. \u041f\u0440\u0438 \u043f\u0443\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0430\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0438\u043f\u043e\u0432, \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0431\u0438\u043b\u0434, \u0435\u0441\u043b\u0438 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0430.<\/p>\n<h2>\u0421\u043e\u0432\u0435\u0442 2: \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c<\/h2>\n<p>  \u041e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c \u0447\u0435\u0440\u0435\u0437 API \u0441\u0430\u043c\u043e \u043f\u043e \u0441\u0435\u0431\u0435 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u043e\u0431\u043c\u0435\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041f\u043e\u043b\u0435\u0437\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u044d\u0442\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u043e\u0439, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b. \u041c\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0438\u0445 DTO \u2014 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/DTO\">Data Transfer Object.<\/a><\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0441\u043b\u043e\u0439, \u043d\u0443\u0436\u043d\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0433\u043e\u0432\u043e\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0430\u0432\u0438\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435:<\/p>\n<ul>\n<li>\u0418\u043c\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0438\u043c\u0435\u0435\u0442 \u0441\u0443\u0444\u0444\u0438\u043a\u0441 Dto: FooBarDto.<\/li>\n<li>\u0420\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435.<\/li>\n<li>\u041c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c API.<\/li>\n<li>\u0414\u0430\u043d\u043d\u044b\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f, \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e.<\/li>\n<\/ul>\n<p>  \u041f\u043b\u044e\u0441\u044b \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430: \u043f\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u044f\u0442\u0435\u043d \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0434\u0430\u043d\u043d\u044b\u0445, \u043b\u0435\u0433\u0447\u0435 \u0438\u0441\u043a\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u0434, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435. \u0422\u0430\u043a\u0438\u0435 \u0442\u0438\u043f\u044b \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0441\u043d\u0430\u0431\u0434\u0438\u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438, \u2014 \u043a\u043e\u043b\u043b\u0435\u0433\u0438-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u0430\u0441 \u043d\u0430 \u0440\u0443\u043a\u0430\u0445 \u043d\u043e\u0441\u0438\u0442\u044c. <\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f API \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a href=\"https:\/\/swagger.io\/\">Swagger<\/a>, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<h2>\u0421\u043e\u0432\u0435\u0442 3: \u0430\u043b\u0438\u0430\u0441\u044b \u043d\u0430 any<\/h2>\n<p>  \u0412\u044b \u0438 \u0432\u0430\u0448\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0438\u0448\u0435\u0442\u0435 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u043d\u043e \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u2014 \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u0442\u043e\u0447\u043d\u043e \u0432 \u0441\u0440\u043e\u043a. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u0442\u0430\u043a, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u0435 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u043f\u0443\u043d\u043a\u0442\u0443 \ud83d\ude09<\/p>\n<p>  \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0436\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0441\u043e\u0431\u043b\u0430\u0437\u043d\u044b \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0438 TS \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442. \u0425\u043e\u0447\u0435\u0442\u0441\u044f \u044f\u0432\u043d\u043e \u0438\u043b\u0438 \u043d\u0435\u044f\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c any. \u0415\u0441\u0442\u044c \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u044b\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u044b: \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043a\u043e\u0434, \u0441\u0440\u043e\u0447\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u043d\u0435\u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c \u2014 \u0443\u0441\u0438\u043b\u0438\u044f \u043d\u0435 \u043e\u043a\u0443\u043f\u0430\u044e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<p>  \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0435\u0435 \u00ab\u043b\u0435\u0433\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c\u00bb:<\/p>\n<pre><code class=\"javascript\">export type TODO_ANY = any; <\/code><\/pre>\n<p>  \u041f\u043b\u044e\u0441\u044b:<\/p>\n<ul>\n<li>\u0412\u044b \u043d\u0435 \u0445\u0438\u0442\u0440\u0438\u0442\u0435 \u0438 \u043d\u0435 \u043f\u0438\u0448\u0435\u0442\u0435 \u043a\u043e\u0441\u0442\u044b\u043b\u0435\u0439.<\/li>\n<li>\u0412\u044b \u0441\u043e\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043a\u043e\u0434 \u0441\u0442\u043e\u0438\u0442 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/li>\n<li>\u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0442\u0438\u043f \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u043f\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0443.<\/li>\n<li>\u0410ny \u043c\u043e\u0436\u0435\u0442 \u044f\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0430\u043c, \u0433\u0434\u0435 \u0442\u0438\u043f \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"javascript\">const getArrayLength = (array: any[]) =&gt; array.length<\/code><\/pre>\n<p>  \u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u0447\u0430\u0441\u0442\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u0435\u043c\u0430 \u0432\u0440\u044f\u0434 \u043b\u0438 \u043f\u0440\u0438\u043d\u0435\u0441\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u0443.<\/li>\n<li>\u041d\u0443\u0436\u043d\u0430 \u0441\u043e\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0443\u0431\u0440\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0437\u0430\u0442\u044b\u0447\u043a\u0438.<\/li>\n<\/ul>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0432\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f: <\/p>\n<pre><code class=\"javascript\">export type TODO_UNKNOWN = unknown; <\/code><\/pre>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 <b>any<\/b> \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u044e\u0431\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 <b>unknown<\/b> \u2014 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u044e\u0431\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043e\u0448\u0438\u0431\u043a\u0435. \u041f\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 TODO_UNKNOWN, \u043f\u043e\u043a\u0430 \u043d\u0435 \u044f\u0441\u0435\u043d \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u2192 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u2192 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0443 \u2192 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u0442\u0438\u043f \u2192 \u0432\u044b \u0432\u043e\u0441\u0445\u0438\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u044b.<\/p>\n<h2>\u0421\u043e\u0432\u0435\u0442 4: \u0442\u0438\u043f\u044b \u0434\u043b\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/h2>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0439 js-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439, \u043f\u043e\u0438\u0449\u0438\u0442\u0435 \u0442\u0438\u043f\u044b <a href=\"https:\/\/github.com\/DefinitelyTyped\/DefinitelyTyped\">\u0432 DefinitelyTyped.<\/a> \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043e\u043d\u0438 \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u2014 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0438 \u043d\u0430\u0441\u043b\u0430\u0436\u0434\u0430\u0435\u043c\u0441\u044f \u0436\u0438\u0437\u043d\u044c\u044e.<\/p>\n<p>  \u0410 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0442\u0438\u043f\u043e\u0432 \u0442\u043e\u0447\u043d\u043e \u043d\u0435\u0442? \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u0425\u043e\u0440\u043e\u0448\u0430\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 jsDoc: \u0432 TypeScript 3.7 tsc-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 <a href=\"https:\/\/www.typescriptlang.org\/docs\/handbook\/release-notes\/typescript-3-7.html#--declaration-and---allowjs\">\u043d\u0430\u0443\u0447\u0438\u043b\u0441\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/a> \u0442\u0438\u043f\u044b .d.ts \u043a\u0430\u043a \u0438\u0437 .ts, \u0442\u0430\u043a \u0438 \u0438\u0437 .js \u0444\u0430\u0439\u043b\u043e\u0432.\u00a0<\/p>\n<p>  \u0414\u0440\u0443\u0433\u0430\u044f \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u044c: \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440\u044b js -&gt; ts. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/github.com\/JoshuaKGoldberg\/TypeStat\">TypeStat<\/a> \u043f\u043e\u043c\u043e\u0433 \u043c\u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u043c\u0438 React-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438.<\/p>\n<p>  \u041f\u043b\u043e\u0445\u0430\u044f \u043d\u043e\u0432\u043e\u0441\u0442\u044c: \u0432\u0440\u044f\u0434 \u043b\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0442\u0438\u043f\u043e\u0432. \u0420\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0439\u0442\u0435 \u043d\u0430 \u00ab\u0441\u043a\u0435\u043b\u0435\u0442\u00bb, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0440\u0430\u0441\u0442\u0438\u0442\u044c \u00ab\u043c\u044f\u0441\u0446\u043e\u00bb.<\/p>\n<h2>\u0421\u043e\u0432\u0435\u0442 5: \u0442\u0438\u043f\u044b \u043f\u043e\u0432\u0435\u0440\u0445 \u0442\u0438\u043f\u043e\u0432<\/h2>\n<p>  \u2026 \u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u043f\u043e\u0433\u043e\u043d\u044f\u044e\u0442!<\/p>\n<p>  \u0411\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0442\u0438\u043f\u044b \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u2014 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043e\u0431\u0449\u0438\u0435 (\u0430 \u0432\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0435\u0439), \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043e\u0448\u0438\u0431\u043a\u0443, \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0432\u0435\u0440\u0441\u0438\u044f \u2014 \u0438\u043b\u0438 \u0436\u0435 \u0442\u0438\u043f\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442.<\/p>\n<p>  \u041e\u0431\u044b\u0447\u043d\u043e \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445 (\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0449\u0435 \u0438 \u0447\u0430\u0441\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442\u0441\u044f), \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u2014 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0440\u0435\u0434\u043a\u043e. \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\/\u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u0438\u043f\u044b.<\/p>\n<p>  \u041e\u043f\u0438\u0448\u0435\u043c \u0442\u0438\u043f \u0434\u043b\u044f \u043c\u043e\u0434\u0443\u043b\u044f example. \u041f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0438\u043f, \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f:<\/p>\n<pre><code class=\"javascript\">declare module &quot;example&quot; {     const foo: { bar: string };     export default foo; } <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u043e\u0435 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043b\u0443\u0447\u0448\u0435 \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0438 \u0444\u0430\u0439\u043b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <b>typings\/example.d.ts<\/b>. \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0432\u0441\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0438\u0437 typings \u0432 \u043f\u043e\u043b\u0435 compilerOptions.typeRoots \u0432 tsconfig:<\/p>\n<pre><code class=\"json\">{     &quot;compilerOptions&quot;: {         &quot;typeRoots&quot;: [&quot;node_modules\/@types&quot;, &quot;.\/typings&quot;]     } } <\/code><\/pre>\n<p>  \u0412\u0443\u0430\u043b\u044f \u2014 \u0442\u0438\u043f\u044b \u0434\u043b\u044f example \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0438\u0437 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f!<\/p>\n<h2>\u0421\u043e\u0432\u0435\u0442 6: \u0441\u0442\u0430\u0439\u043b\u0433\u0430\u0439\u0434<\/h2>\n<p>  Type \u0438\u043b\u0438 interface? const \u0438\u043b\u0438 enum? \u041a\u0430\u043a \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0438\u043f\u044b \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435? \u0410 \u0432 \u043c\u0435\u043c\u043e\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c?<\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 TS \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0442\u0430\u043a\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0443 \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435: \u0431\u0443\u0440\u044f \u0434\u043b\u0438\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0434\u0435\u043b\u044c, \u043f\u043e\u0442\u043e\u043c \u0443\u0441\u0442\u0430\u043a\u0430\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 \u0441\u0442\u0438\u043b\u044c \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u0424\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b \u2014 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0441\u043f\u043e\u0440\u0430\u0445 \u0438 \u0445\u043e\u043b\u0438\u0432\u0430\u0440\u0430\u0445 \u0432 \u043f\u0443\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0430\u0445. \u0421\u043e\u0431\u0435\u0440\u0438\u0442\u0435\u0441\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0438 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u0432\u043e\u0439 \u0441\u0442\u0430\u0439\u043b\u0433\u0430\u0439\u0434.<\/p>\n<ul>\n<li>\u0412\u043e\u0437\u044c\u043c\u0438\u0442\u0435 \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0441\u0442\u0430\u0439\u043b\u0433\u0430\u0439\u0434\u044b. \u041c\u043d\u0435 \u043d\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u044d\u0442\u0438: <a href=\"https:\/\/github.com\/typescript-cheatsheets\/react-typescript-cheatsheet\">react-typescript-cheatsheet<\/a>, <a href=\"https:\/\/github.com\/piotrwitek\/react-redux-typescript-guide\">react-redux-typescript-guide<\/a>, <a href=\"https:\/\/github.com\/David-Else\/modern-typescript-with-examples-cheat-sheet\/blob\/master\/README.md\">modern-typescript-with-examples-cheat-sheet.<\/a><\/li>\n<li>\u041f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0439\u0442\u0435 \u043b\u0438\u043d\u0442\u0435\u0440\u044b \u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0435\u0440\u044b \u2014 \u043f\u0443\u0441\u0442\u044c \u0447\u0435\u0440\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0434\u0435\u043b\u0430\u044e\u0442 \u043c\u0430\u0448\u0438\u043d\u044b.<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0443 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430: \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b, \u043b\u0443\u0447\u0448\u0438\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438, \u0445\u0443\u0434\u0448\u0438\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438.<\/li>\n<li>\u0417\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0439\u0442\u0435 \u044d\u0442\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u0441\u0441\u044b\u043b\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u043d\u0438\u0445 \u043f\u0440\u0438 \u043a\u043e\u0434-\u0440\u0435\u0432\u044c\u044e.<\/li>\n<li>\u041e\u0431\u0435\u0441\u043f\u0435\u0447\u044c\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u0438 \u043c\u0435\u043d\u044f\u0442\u044c \u044d\u0442\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/li>\n<\/ul>\n<p>  \u0425\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0441\u0442\u0430\u0439\u043b\u0433\u0430\u0439\u0434 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0447\u0443\u0434\u0435\u0441\u0430 CPDD (<i>Copy Paste Driven Development<\/i>): \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0438\u0448\u0443\u0442 \u0432 \u0435\u0434\u0438\u043d\u043e\u043c \u0441\u0442\u0438\u043b\u0435, \u0442\u0440\u0430\u0442\u044f\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u0431\u043e\u0439\u043b\u0435\u0440\u043f\u043b\u0435\u0439\u0442\u0430\u043c. \u041d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u044d\u043f\u0438\u0447\u043d\u044b\u0435 \u0431\u0430\u0442\u0430\u043b\u0438\u0438 \u0442\u0430\u0431\u044b <i>vs<\/i> \u043f\u0440\u043e\u0431\u0435\u043b\u044b (\u043f\u0430\u0440\u0434\u043e\u043d, \u0442\u0438\u043f\u044b <i>vs<\/i> \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b), \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442\u0441\u044f \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<p>  P.S.: \u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 ts-\u0443\u0442\u0438\u043b\u0438\u0442. \u041d\u0430\u0439\u0434\u0435\u0442\u0435 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0445\u0435\u043b\u043f\u0435\u0440\u044b, \u043d\u043e \u0438 \u043a\u043e\u0434 \u043e\u0442 \u043f\u0440\u043e\u0444\u0438 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/github.com\/piotrwitek\/utility-types\">utility-types<\/a>, <a href=\"https:\/\/github.com\/andnp\/SimplyTyped\">SimplyTyped<\/a>.<\/p>\n<h2>\u0421\u043e\u0432\u0435\u0442 7: \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430<\/h2>\n<p>  \u0412\u043d\u0435\u0434\u0440\u044f\u0435\u0442\u0435 \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435? \u0412\u0435\u0434\u0438\u0442\u0435 \u0443\u0447\u0435\u0442 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438.<\/p>\n<p>  \u0417\u0430\u0447\u0435\u043c:<\/p>\n<ul>\n<li>\u041e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0440\u0430\u0431\u043e\u0442\u044b.<\/li>\n<li>\u0420\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445.<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u0447\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u2014 \u00ab\u0421\u043c\u043e\u0442\u0440\u0438\u0442\u0435, \u043a\u0430\u043a\u0438\u0435 \u043c\u044b \u043c\u043e\u043b\u043e\u0434\u0446\u044b, \u0435\u0449\u0435 \u043d\u0430 \u0448\u0430\u0433 \u0431\u043b\u0438\u0436\u0435 \u043a \u0446\u0435\u043b\u0438\u00bb.<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ys\/m-\/r5\/ysm-r5wgtar6nrq9weyotjmyzgk.png\"><\/p>\n<p>  \u2318 \u2318\u00a0\u2318<\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0437\u0430\u043a\u043e\u043d\u0447\u0443 \u0431\u043b\u043e\u043a \u0441 \u043e\u0431\u0449\u0438\u043c\u0438 \u0441\u043e\u0432\u0435\u0442\u0430\u043c\u0438 \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e TS.\u00a0<\/p>\n<p>  \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u043f\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u043f\u0440\u0438\u0435\u043c\u0430\u043c TS, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445.<\/p>\n<p>  \u2318 \u2318 \u2318<\/p>\n<h2>\u041d\u0435 \u0441\u043e\u0432\u0435\u0442 \u2014 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043f\u043e TS<\/h2>\n<p>  \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0437\u043d\u0430\u043d\u0438\u0439 \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435 \u043b\u0438 \u0432\u044b, \u0447\u0442\u043e \u0442\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442:<\/p>\n<pre><code class=\"javascript\">const example = {     a: &quot;foo&quot;,     b: &quot;bar&quot; };  \/\/ \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b typeof \u0438 keyof type Ex1 = typeof example; \/\/ { a: string; b: string } type Ex2 = keyof typeof example; \/\/ 'a' | 'b'  \/\/ \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0442\u0438\u043f\u0430\u043c\u0438 type Ex3 = Pick&lt;typeof example, &quot;a&quot;&gt;; \/\/ { a: string }; type Ex4 = Omit&lt;typeof example, &quot;a&quot;&gt;; \/\/ { b: string }; type Ex5 = Partial&lt;typeof example&gt;; \/\/ { a?: string; b?: string}  type Ex6 = Record&lt;'a' | 'b', number&gt;; \/\/ { a: number; b: number };  \/\/ \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 const func = (a: string, b: number) =&gt; true; type Ex7 = ReturnType&lt;typeof func&gt;; \/\/ boolean type Ex8 = Parameters&lt;typeof func&gt;; \/\/ [string, number] <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0421\u043e\u0432\u0435\u0442 8: \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f vs enum<\/h2>\n<p>  TypeScript \u0432\u0432\u043e\u0434\u0438\u0442 \u0443\u0434\u043e\u0431\u043d\u0443\u044e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u2014 <b>enum<\/b>. Enum \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u041e\u0441\u0432\u043e\u0438\u0432 enum, \u043f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u043e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e. \u041e\u0434\u043d\u0430\u043a\u043e \u0443 enum \u0435\u0441\u0442\u044c \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u0430\u044f \u043a\u0440\u0438\u0442\u0438\u043a\u0430, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0430\u044f <a href=\"https:\/\/stackoverflow.com\/a\/54455743\/3623102\">\u0441 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u043a\u043e\u0434\u043e\u043c<\/a> \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/p>\n<p>  \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u2014 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438 \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f. \u0412 \u0440\u044f\u0434\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u0431\u043e\u043b\u0435\u0435 \u0443\u043c\u0435\u0441\u0442\u043d\u043e.<\/p>\n<p>  \u0416\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u2014 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u043f\u0440\u043e\u043f\u0441\u044b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:<\/p>\n<pre><code class=\"javascript\">\/\/ \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 enum enum ColorEnum {     yellow = &quot;yellow&quot;,     transparent = &quot;transparent&quot; }  const ExampleEnum = (props: { color: ColorEnum }) =&gt; &lt;div&gt;{props.color}&lt;\/div&gt;;  \/\/ \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044c\u043d\u044b\u043c \u0442\u0438\u043f\u043e\u043c type ColorLiteral = &quot;yellow&quot; | &quot;transparent&quot;;  const ExampleLiteral = (props: { color: ColorLiteral }) =&gt; &lt;div&gt;{props.color}&lt;\/div&gt;;  \/\/ \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u0431\u043e\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 const Example = () =&gt; (&lt;&gt;         &lt;ExampleEnum color={ColorEnum.yellow} \/&gt;         &lt;ExampleLiteral color=&quot;yellow&quot; \/&gt;  &lt;\/&gt;); <\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432 \u043e\u0431\u043e\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0438\u043f\u0430 \u043f\u0440\u043e\u043f\u0441\u0430 color. \u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 enum \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u043c \u2014 \u044d\u0442\u043e \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435, \u0438 \u0431\u043e\u043b\u0435\u0435 \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f. \u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u043c \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u0435\u0439, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0442\u0438\u043f\u0430. \u041d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c \u043a\u043e\u0434 enum.<\/p>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0442\u0438\u043f\u043e\u0432. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 enum \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043b\u0443\u0447\u0448\u0435 \u043e\u0442\u0434\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u0435 <a href=\"https:\/\/www.typescriptlang.org\/docs\/handbook\/enums.html#const-enums\">const enum<\/a> (\u043e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 <a href=\"https:\/\/github.com\/babel\/babel\/issues\/8741\">\u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f babel<\/a>, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c <a href=\"https:\/\/www.npmjs.com\/package\/babel-plugin-const-enum\">\u043f\u043b\u0430\u0433\u0438\u043d<\/a>).<\/p>\n<h2>\u0421\u043e\u0432\u0435\u0442 9: const assertions<\/h2>\n<p>  \u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u043f\u043e\u0432\u043e\u0434 \u0440\u0435\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c enum \u2014 <a href=\"https:\/\/www.typescriptlang.org\/docs\/handbook\/release-notes\/typescript-3-4.html#const-assertions\">const assertions.<\/a><\/p>\n<p>  <b>as const<\/b> \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u0417\u043d\u0430\u0447\u0438\u0442, \u043c\u043e\u0436\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0442\u0438\u043f\u044b.<\/p>\n<pre><code class=\"javascript\">const loadAction = {     start: &quot;LOAD_START&quot;,     done: &quot;LOADED&quot;,     error: &quot;LOAD_ERROR&quot; } as const;  type LoadActionType = typeof loadAction; type LoadActionKey = keyof LoadActionType; \/\/ 'start' | 'done' | 'error' type LoadActionValue = LoadActionType[LoadActionKey]; \/\/ 'LOAD_START' | 'LOADED' | 'LOAD_ERROR' \/\/ \u0431\u0435\u0437 &quot;as const&quot; LoadActionValue \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u0430\u043a string <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c as const \u0438 \u043a \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c:<\/p>\n<pre><code class=\"javascript\">const DIRECTION_ASC = 1; const DIRECTION_DESC = -1; const sortDirectionTypes = [DIRECTION_ASC, DIRECTION_DESC] as const; type SortDirection = typeof sortDirectionTypes[number]; \/\/ -&gt; 1 | -1 <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b:<\/p>\n<pre><code class=\"javascript\">const sortDirectionDescription: Record&lt;SortDirection, string&gt; = {     [DIRECTION_ASC]: &quot;\u041e\u0442 \u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e&quot;,     [DIRECTION_DESC]: &quot;\u041e\u0442 \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e&quot; }; const sortDirectionDescription2: Record&lt;SortDirection, string&gt; = {     [DIRECTION_ASC]: &quot;\u041e\u0442 \u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e&quot; }; \/\/ Error: TS2741: Property '[-1]' is missing \/\/ in type '{ [DIRECTION_ASC]: string; }' <\/code><\/pre>\n<p>  P.S.: \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043f\u0440\u043e const assertions \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/mariusschulz.com\/blog\/const-assertions-in-literal-expressions-in-typescript\">\u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/a><\/p>\n<h2>\u0421\u043e\u0432\u0435\u0442 10: \u0431\u0440\u0435\u043d\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b<\/h2>\n<p>  <a href=\"https:\/\/github.com\/piotrwitek\/utility-types#brandt-u\">Brand<\/a> \u2014 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 (\u00ab\u0431\u0440\u0435\u043d\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445\u00bb) \u0442\u0438\u043f\u043e\u0432. \u041e\u0431\u044b\u0447\u043d\u043e \u0442\u0430\u043a\u0438\u0435 \u0442\u0438\u043f\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u2014 \u0441\u0442\u0440\u043e\u043a, \u0447\u0438\u0441\u0435\u043b.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f id. \u0418\u043d\u043e\u0433\u0434\u0430 \u043a\u0440\u0430\u0439\u043d\u0435 \u0432\u0430\u0436\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0442\u0438\u043f id \u043e\u0442 \u0434\u0440\u0443\u0433\u043e\u0433\u043e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, id \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043e\u0442 id \u0435\u0433\u043e \u0437\u0430\u043a\u0430\u0437\u0430 \u0432 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435), \u0445\u043e\u0442\u044f \u0438 \u0442\u043e, \u0438 \u0434\u0440\u0443\u0433\u043e\u0435 \u2014 \u0441\u0442\u0440\u043e\u043a\u0438. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Brand \u043a\u0430\u043a \u0440\u0430\u0437 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0432\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u0430:<\/p>\n<pre><code class=\"javascript\">type Brand&lt;T, U&gt; = T &amp; { __brand: U };  type UserId = Brand&lt;string, &quot;userId&quot;&gt;; \/\/ &quot;5435436&quot; \u2013 \u043f\u0440\u0438\u043c\u0435\u0440 id \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f type OrderId = Brand&lt;string, &quot;orderId&quot;&gt;; \/\/ &quot;42da-fet3-cdsl&quot; \u2013 \u043f\u0440\u0438\u043c\u0435\u0440 id \u0437\u0430\u043a\u0430\u0437\u0430  declare const userID = &quot;1111&quot; as UserId; \/\/ \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c declare function getOrderById(id: OrderId): any; \/\/ \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f  getOrderById(userID); \/\/ Error: TS2345 \/\/ Type '&quot;userId&quot;' is not assignable to type '&quot;orderId&quot;'. <\/code><\/pre>\n<p>  \u0427\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0442\u0435\u043e\u0440\u0438\u0438 \u043f\u043e \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435 \u2014 \u043e \u043d\u043e\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u0442\u0438\u043f\u0430\u0445 \u2014 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/446768\/\">\u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/a>, \u0430 \u0435\u0449\u0435 <a href=\"https:\/\/medium.com\/better-programming\/nominal-typescript-eee36e9432d2\">\u0442\u0443\u0442<\/a> \u0438 <a href=\"https:\/\/spin.atomicobject.com\/2018\/01\/15\/typescript-flexible-nominal-typing\/\">\u0442\u0443\u0442.<\/a><\/p>\n<h2>\u0421\u043e\u0432\u0435\u0442 11: discriminated union types<\/h2>\n<p>  \u0421\u043b\u043e\u0436\u043d\u044b\u0439 \u0442\u0435\u0440\u043c\u0438\u043d <b>discriminated union<\/b> (\u0440\u0430\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0435\/\u0440\u0430\u0437\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f) \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435: \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u0441 \u043e\u0431\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u044c\u044e (\u0434\u0438\u0441\u043a\u0440\u0438\u043c\u0438\u043d\u0430\u043d\u0442\u043e\u043c). \u041f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435\u043c ts-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f.<\/p>\n<p>  \u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f discriminated union \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u043d\u0430 \u0448\u0430\u0431\u043b\u043e\u043d \u0440\u0435\u0434\u044c\u044e\u0441\u0435\u0440\u0430. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043e\u0431\u0449\u0435\u043c\u0443 \u043f\u043e\u043b\u044e type \u0442\u0438\u043f \u0434\u043b\u044f payload \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438:<\/p>\n<pre><code class=\"javascript\">type Action =     | { type: 'SET_ONE'; payload: string }     | { type: 'SET_TWO'; payload: number };  export function reducer(state: AppState, action: Action): AppState {     switch (action.type) {         case 'SET_ONE':             return { ...state, one: action.payload}; \/\/ `payload` is string         case 'SET_TWO':             return { ...state, two: action.payload}; \/\/ `payload` is number         default:             return state;     } } <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0421\u043e\u0432\u0435\u0442 12: never<\/h2>\n<p>  <b>Never<\/b> \u2014 \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043a\u0430 \u043e\u0442 \u043d\u0435\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u043a\u0435\u0439\u0441\u043e\u0432. \u0412\u043e\u0437\u044c\u043c\u0435\u043c \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430, \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0435\u0437 &#8216;SET_TWO&#8217;, \u0438 \u0441 \u0434\u043e\u0431\u0430\u0432\u043a\u043e\u0439 typeguard: never;<\/p>\n<pre><code class=\"javascript\">type Action =     | { type: 'SET_ONE'; payload: string }     | { type: 'SET_TWO'; payload: number };  export function reducer(state: AppState, action: Action): AppState {     switch (action.type) {          case 'SET_ONE':             return { ...state,                         one: action.payload}; \/\/ `payload` is string          default:             const typeguard: never = action;             return state;             \/\/ Error: TS2322: Type '{ type: &quot;SET_TWO&quot;; payload: number; }'             \/\/ is not assignable to type 'never'.     } } <\/code><\/pre>\n<p>  \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0442\u0438\u043f \u0434\u043b\u044f typeguard \u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043a \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u044e. \u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u2014 \u0442\u0438\u043f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435\u0442, never. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u2014 \u0432\u044b\u0432\u043e\u0434\u0438\u043c\u044b\u0439 \u0442\u0438\u043f &#8216;SET_TWO&#8217;. \u0422\u0438\u043f\u044b \u043d\u0435 \u0441\u0445\u043e\u0434\u044f\u0442\u0441\u044f, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443.<\/p>\n<p>  \u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 (\u043d\u043e \u0440\u0435\u0434\u043a\u0438\u0439) \u043a\u0435\u0439\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f never \u0432 React \u2014 \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u043f\u0440\u043e\u043f\u0441\u043e\u0432:<\/p>\n<pre><code class=\"javascript\">type IconProps = {     size: 's' | 'm';     children?: never;     foo?: never; };  const Icon: React.FC&lt;IconProps&gt; = () =&gt; &lt;div&gt;Whatewer&lt;\/div&gt;;      const Example = () =&gt; (&lt;&gt;     &lt;Icon size=&quot;s&quot;&gt; &lt;div \/&gt; &lt;\/Icon&gt; {\/* \u041e\u0448\u0438\u0431\u043a\u0430 \u2013 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f children *\/}     &lt;Icon size=&quot;s&quot; foo=&quot;123&quot;\/&gt; {\/* \u041e\u0448\u0438\u0431\u043a\u0430 - \u0443\u043a\u0430\u0437\u0430\u043d foo *\/}  &lt;\/&gt;); <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 never \u0432\u043e\u0432\u0441\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 (<a href=\"https:\/\/www.typescriptlang.org\/docs\/handbook\/advanced-types.html#conditional-types\">conditional-types<\/a>). \u0412\u043e\u0442 <a href=\"https:\/\/hackernoon.com\/learn-advanced-typescript-4yl727e6\">\u043a\u043b\u0430\u0441\u0441\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0431\u044b\u043b\u0438 \u0434\u043b\u044f \u0432\u0430\u0441 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043b\u0435\u0433\u043a\u0438\u0435.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 TypeScript \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043a\u043e\u0434\u0430. \u0421\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043b\u0435\u0433\u0447\u0435 \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u043a\u043e\u0434, \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433. \u0421\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u0432 \u043a\u043e\u0434\u0435: \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432 \u0433\u043e\u043b\u043e\u0432\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u0444\u043e\u0440\u043c\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u2014 \u043f\u0443\u0441\u0442\u044c \u044d\u0442\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b.\u00a0<\/p>\n<p>  \u041f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043b\u0435\u0432\u0435\u043b-\u0430\u043f, \u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430\u043c\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0438 \u043d\u043e\u0432\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u2014 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0442\u0438\u043f\u043e\u0432. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u0432\u0435\u0442\u044b \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0432\u0430\u043c \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443.<\/p>\n<p>  \u0410 \u0432\u044b \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0447\u0442\u043e-\u043b\u0438\u0431\u043e \u0438\u0437 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0435\u043c\u043e\u0432? \u041c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u043e\u0438\u043c\u0438? \u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438!<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/tinkoff\/blog\/505488\/\"> https:\/\/habr.com\/ru\/company\/tinkoff\/blog\/505488\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/tinkoff\/blog\/505488\/\">TypeScript \u2014 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f\u043c <a href=\"https:\/\/2019.stateofjs.com\/ru\/javascript-flavors\/typescript\/\">State of JavaScript<\/a>, TS \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u044f\u0432\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441 \u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432. \u041f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u043e\u043f\u0440\u043e\u0441\u0430 \u0437\u0430 2019 \u0433\u043e\u0434, \u043f\u043e\u0447\u0442\u0438 60% \u0440\u0435\u0441\u043f\u043e\u043d\u0434\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 TS \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, 22% \u043d\u0435 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0438 \u0436\u0435\u043b\u0430\u044e\u0442 \u0438\u0437\u0443\u0447\u0438\u0442\u044c.<\/p>\n<p>  \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u2014 \u0441\u0431\u043e\u0440\u043d\u0438\u043a \u0441\u043e\u0432\u0435\u0442\u043e\u0432 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0438 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 TypeScript. \u041f\u0435\u0440\u0432\u0430\u044f \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0441\u043e\u0432\u0435\u0442\u043e\u0432 \u043e\u0431\u0449\u0430\u044f, \u043a\u0430\u0441\u0430\u044e\u0449\u0430\u044f\u0441\u044f \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0438 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u0412\u0442\u043e\u0440\u0430\u044f \u2014 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u043e\u0431\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0444\u0438\u0448\u0435\u043a \u044f\u0437\u044b\u043a\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/di\/nt\/qe\/dintqe2eppni8xbm7oooyd4bui4.png\">  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-304903","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304903","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=304903"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304903\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304903"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304903"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304903"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}