{"id":325236,"date":"2021-06-21T09:00:45","date_gmt":"2021-06-21T09:00:45","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=325236"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=325236","title":{"rendered":"\u041a\u0430\u0440\u043c\u0430\u043d\u043d\u0430\u044f \u043a\u043d\u0438\u0433\u0430 \u043f\u043e TypeScript. \u0427\u0430\u0441\u0442\u044c 8. \u041c\u043e\u0434\u0443\u043b\u0438"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ad\/rw\/w4\/adrww41gv8k_vuxeswr0-xkl57y.png\" alt=\"image\"><\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0441\u0435\u0440\u0438\u044e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 <a href=\"https:\/\/www.typescriptlang.org\/docs\/handbook\/intro.html\"><code> &quot;\u041a\u0430\u0440\u043c\u0430\u043d\u043d\u043e\u0439 \u043a\u043d\u0438\u0433\u0438 \u043f\u043e TypeScript<\/code>&quot;.<\/a>  <\/p>\n<p>\u0414\u0440\u0443\u0433\u0438\u0435 \u0447\u0430\u0441\u0442\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/macloud\/blog\/559902\/\">\u0427\u0430\u0441\u0442\u044c 1. \u041e\u0441\u043d\u043e\u0432\u044b<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/macloud\/blog\/559976\/\">\u0427\u0430\u0441\u0442\u044c 2. \u0422\u0438\u043f\u044b \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/macloud\/blog\/560594\/\">\u0427\u0430\u0441\u0442\u044c 3. \u0421\u0443\u0436\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/macloud\/blog\/561470\/\">\u0427\u0430\u0441\u0442\u044c 4. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/macloud\/blog\/562054\/\">\u0427\u0430\u0441\u0442\u044c 5. \u041e\u0431\u044a\u0435\u043a\u0442\u043d\u044b\u0435 \u0442\u0438\u043f\u044b<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/macloud\/blog\/562786\/\">\u0427\u0430\u0441\u0442\u044c 6. \u041c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u0442\u0438\u043f\u0430\u043c\u0438<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/macloud\/blog\/563408\/\">\u0427\u0430\u0441\u0442\u044c 7. \u041a\u043b\u0430\u0441\u0441\u044b<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h1 id=\"opredelenie-modulya\">\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f<\/h1>\n<p>  <\/p>\n<p>\u0412 <code>TS<\/code>, \u043a\u0430\u043a \u0438 \u0432 <code>ECMAScript2015<\/code>, \u043b\u044e\u0431\u043e\u0439 \u0444\u0430\u0439\u043b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 <code>import<\/code> \u0438\u043b\u0438 <code>export<\/code> \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f (\u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439), \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u043c.<\/p>\n<p>  <\/p>\n<p>\u0424\u0430\u0439\u043b, \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c.<\/p>\n<p>  <\/p>\n<p>\u041c\u043e\u0434\u0443\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0430 \u043d\u0435 \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u0442.\u0434., \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u043c\u043e\u0434\u0443\u043b\u0435, \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043e\u043d\u0438 \u0432 \u044f\u0432\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0437 \u043d\u0435\u0433\u043e \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043f\u0435\u0440\u0435\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u0438\u0445 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u0439\u043b.<\/p>\n<p>  <\/p>\n<h1 id=\"ne-moduli\">\u041d\u0435 \u043c\u043e\u0434\u0443\u043b\u0438<\/h1>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f, \u0447\u0442\u043e <code>TS<\/code> \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u0435\u043c. \u0421\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f <code>JS<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u0447\u0442\u043e \u043b\u044e\u0431\u043e\u0439 \u0444\u0430\u0439\u043b \u0431\u0435\u0437 <code>export<\/code> \u0438\u043b\u0438 <code>await<\/code> \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c, \u0430 \u043d\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u043c.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u0442\u0438\u043f\u044b, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u043c\u0438 (\u0438\u043c\u0435\u044e\u0442 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438), \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0432 \u043e\u0434\u0438\u043d \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u0431\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u043a\u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 <code>outFile<\/code>, \u043b\u0438\u0431\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 <code>script<\/code> \u0432 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0435 (\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435).<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 <code>import<\/code> \u0438\u043b\u0438 <code>export<\/code>, \u043d\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0441\u0447\u0438\u0442\u0430\u043b\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u043c, \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<pre><code class=\"javascript\">export {}<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"moduli-v-ts\">\u041c\u043e\u0434\u0443\u043b\u0438 \u0432 <code>TS<\/code><\/h1>\n<p>  <\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 3 \u0432\u0435\u0449\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u0432 <code>TS<\/code>:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441: \u043a\u0430\u043a\u043e\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u044f \u0445\u043e\u0447\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439?<\/li>\n<li>\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439: \u043a\u0430\u043a\u043e\u0432\u044b \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 (\u0438\u043b\u0438 \u0438\u0445 \u043f\u0443\u0442\u044f\u043c\u0438) \u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435?<\/li>\n<li>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: \u043d\u0430 \u0447\u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u043e\u0445\u043e\u0436 \u043a\u043e\u0434 \u043c\u043e\u0434\u0443\u043b\u044f?<\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"sintaksis\">\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441<\/h2>\n<p>  <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0432 \u0444\u0430\u0439\u043b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>export default<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ @filename: hello.ts export default function helloWorld() {   console.log('\u041f\u0440\u0438\u0432\u0435\u0442, \u043d\u0430\u0440\u043e\u0434!') }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0434\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">import hello from '.\/hello.js' hello()<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u043a \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0443 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u043c\u043e\u0436\u0435\u0442 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>export<\/code> (\u0431\u0435\u0437 <code>default<\/code>):<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ @filename: maths.ts export var pi = 3.14 export let squareTwo = 1.41 export const phi = 1.61  export class RandomNumberGenerator {}  export function absolute(num: number) {   if (num &lt; 0) return num * -1   return num }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">import { pi, phi, absolute } from '.\/maths.js'  console.log(pi) const absPhi = absolute(phi)   \/\/ const absPhi: number<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"dopolnitelnyy-sintaksis-importa\">\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0438\u043c\u043f\u043e\u0440\u0442\u0430<\/h2>\n<p>  <\/p>\n<p>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>import { old as new }<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">import { pi as \u03c0 } from '.\/maths.js'  console.log(\u03c0)         \/*           (alias) var \u03c0: number           import \u03c0         *\/<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ @filename: maths.ts export const pi = 3.14 export default class RandomNumberGenerator {}  \/\/ @filename: app.ts import RNGen, { pi as \u03c0 } from '.\/maths.js'  RNGen \/*   (alias) class RNGen   import RNGen *\/  console.log(\u03c0) \/*   (alias) const \u03c0: 3.14   import \u03c0 *\/<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043f\u0440\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043e\u0434\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>* as name<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ @filename: app.ts import * as math from '.\/maths.js'  console.log(math.pi) const positivePhi = math.absolute(math.phi)   \/\/ const positivePhi: number<\/code><\/pre>\n<p>  <\/p>\n<p>\u0424\u0430\u0439\u043b\u044b \u043c\u043e\u0436\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ @filename: app.ts import '.\/maths.js'  console.log('3.14')<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <code>import<\/code> \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u0438\u0437 <code>maths.ts<\/code> \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f (\u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f), \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432, \u0432\u043b\u0438\u044f\u044e\u0449\u0438\u0445 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b.<\/p>\n<p>  <\/p>\n<h3 id=\"specifichnyy-dlya-ts-sintaksis-moduley\">\u0421\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0439 \u0434\u043b\u044f <code>TS<\/code> \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u0439<\/h3>\n<p>  <\/p>\n<p>\u0422\u0438\u043f\u044b \u043c\u043e\u0433\u0443\u0442 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0430\u043a\u043e\u0433\u043e \u0436\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430, \u0447\u0442\u043e \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 <code>JS<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ @filename: animal.ts export type Cat = { breed: string, yearOfBirth: number }  export interface Dog {   breeds: string[]   yearOfBirth: number }  \/\/ @filename: app.ts import { Cat, Dog } from '.\/animal.js' type Animals = Cat | Dog<\/code><\/pre>\n<p>  <\/p>\n<p><code>TS<\/code> \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 <code>import<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>import type<\/code>, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0438\u043f\u044b.<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ @filename: animal.ts export type Cat = { breed: string, yearOfBirth: number } \/\/ 'createCatName' cannot be used as a value because it was imported using 'import type'. \/\/ 'createCatName' \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e 'import type' export type Dog = { breeds: string[], yearOfBirth: number } export const createCatName = () =&gt; 'fluffy'  \/\/ @filename: valid.ts import type { Cat, Dog } from '.\/animal.js' export type Animals = Cat | Dog  \/\/ @filename: app.ts import type { createCatName } from '.\/animal.js' const name = createCatName()<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u043e\u0439 \u0438\u043c\u043f\u043e\u0440\u0442 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u0442\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u043c, \u0432\u0440\u043e\u0434\u0435 <code>Babel<\/code>, <code>swc<\/code> \u0438\u043b\u0438 <code>esbuild<\/code>, \u043a\u0430\u043a\u043e\u0439 \u0438\u043c\u043f\u043e\u0440\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0443\u0434\u0430\u043b\u0435\u043d.<\/p>\n<p>  <\/p>\n<h3 id=\"sintaksis-es-moduley-s-povedeniem-commonjs\">\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 <code>ES-\u043c\u043e\u0434\u0443\u043b\u0435\u0439<\/code> \u0441 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c <code>CommonJS<\/code><\/h3>\n<p>  <\/p>\n<p>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 <code>ES-\u043c\u043e\u0434\u0443\u043b\u0435\u0439<\/code> \u0432 <code>TS<\/code> \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441\u043e\u0433\u043b\u0430\u0441\u0443\u0435\u0442\u0441\u044f \u0441 <code>CommonJS<\/code> \u0438 <code>require<\/code> \u0438\u0437 <code>AMD<\/code>. \u0418\u043c\u043f\u043e\u0440\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>ES-\u043c\u043e\u0434\u0443\u043b\u0435\u0439<\/code> \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e <code>require<\/code> \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f\u0445, \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435 <code>TS-\u0444\u0430\u0439\u043b\u0430<\/code> \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c <code>CommonJS<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">import fs = require('fs') const code = fs.readFileSync('hello.ts', 'utf8')<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"sintaksis-commonjs\">\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 <code>CommonJS<\/code><\/h1>\n<p>  <\/p>\n<p><code>CommonJS<\/code> \u2014 \u044d\u0442\u043e \u0444\u043e\u0440\u043c\u0430\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e\u043c <code>npm-\u043f\u0430\u043a\u0435\u0442\u043e\u0432<\/code>. \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 <code>ES-\u043c\u043e\u0434\u0443\u043b\u0435\u0439<\/code>, \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 <code>CommonJS<\/code>, \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u0432 \u043e\u0442\u043b\u0430\u0434\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p>  <\/p>\n<h2 id=\"eksport\">\u042d\u043a\u0441\u043f\u043e\u0440\u0442<\/h2>\n<p>  <\/p>\n<p>\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u044d\u043a\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 <code>exports<\/code> \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>module<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">function absolute(num: number) {   if (num &lt; 0) return num * -1   return num }  module.exports = {   pi: 3.14,   squareTwo: 1.41,   phi: 1.61,   absolute }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u044d\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 <code>require<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const maths = require('maths') maths.pi   \/\/ any<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043c\u043f\u043e\u0440\u0442 \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0437\u0430\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">const { squareTwo } = require('maths') squareTwo   \/\/ const squareTwo: any<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"vzaimodeystvie-commonjs-s-es-modulyami\">\u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 <code>CommonJS<\/code> \u0441 <code>ES-\u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438<\/code><\/h2>\n<p>  <\/p>\n<p>\u041c\u0435\u0436\u0434\u0443 <code>CommonJS<\/code> \u0438 <code>ES-\u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438<\/code> \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <code>ES-\u043c\u043e\u0434\u0443\u043b\u0438<\/code> \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 &quot;\u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439&quot; \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043d\u043e \u043d\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0414\u043b\u044f \u043f\u0440\u0435\u043e\u0434\u043e\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0435\u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0432 <code>TS<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u043b\u0430\u0433 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#esModuleInterop\"><code>esModuleInterop<\/code><\/a>.<\/p>\n<p>  <\/p>\n<h1 id=\"nastroyki-svyazannye-s-razresheniem-moduley\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u0439<\/h1>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u0438\u0437 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 <code>import<\/code> \u0438\u043b\u0438 <code>require<\/code>.<\/p>\n<p>  <\/p>\n<p><code>TS<\/code> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0432\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439: \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0438 <code>Node<\/code>. \u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0435\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e (\u043a\u043e\u0433\u0434\u0430 \u0444\u043b\u0430\u0433 <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#module\"><code>module<\/code><\/a> \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0435 \u043e\u0442 <code>commonjs<\/code>) \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438. \u0421\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f <code>Node<\/code> \u0438\u043c\u0438\u0442\u0438\u0440\u0443\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 <code>Node.js<\/code> \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 <code>CommonJS<\/code> \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u043c\u0438 \u0434\u043b\u044f <code>.ts<\/code> \u0438 <code>.d.ts<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0444\u043b\u0430\u0433\u043e\u0432, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u0439: <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#moduleResolution\"><code>moduleResolution<\/code><\/a>, <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#baseUrl\"><code>baseUrl<\/code><\/a>, <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#paths\"><code>paths<\/code><\/a>, <a href=\"https:\/\/www.typescriptlang.org\/tsconfig#rootDirs\"><code>rootDirs<\/code><\/a> \u0438 \u0434\u0440.<\/p>\n<p>  <\/p>\n<h1 id=\"nastroyki-dlya-rezultatov-razresheniya-moduley\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439<\/h1>\n<p>  <\/p>\n<p>\u0418\u043c\u0435\u0435\u0442\u0441\u044f \u0434\u0432\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 <code>JS-\u043a\u043e\u0434<\/code>:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/www.typescriptlang.org\/tsconfig#target\"><code>target<\/code><\/a> \u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u044e <code>JS<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f <code>TS-\u043a\u043e\u0434<\/code><\/li>\n<li><a href=\"https:\/\/www.typescriptlang.org\/tsconfig#module\"><code>module<\/code><\/a> \u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0422\u043e, \u043a\u0430\u043a\u0443\u044e \u0446\u0435\u043b\u044c (target) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0432 \u043a\u0430\u043a\u043e\u0439 \u0441\u0440\u0435\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043a\u043e\u0434 (\u043a\u0430\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0440\u0435\u0434\u043e\u0439). \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0441\u0435\u0431\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0441\u0442\u0430\u0440\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432, \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e <code>Node.js<\/code> \u0438\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f, \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0442\u0430\u043a\u0438\u043c\u0438 \u0441\u0440\u0435\u0434\u0430\u043c\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043a\u0430\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>Electron<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u043c\u043e\u0434\u0443\u043b\u0435\u0439 (module loader), \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u044b\u0439 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 <code>module<\/code>. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0432\u0441\u0435\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043c\u043e\u0434\u0443\u043b\u044f \u043f\u0435\u0440\u0435\u0434 \u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>  <\/p>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 <code>ES-\u043c\u043e\u0434\u0443\u043b\u0435\u0439<\/code> \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 <code>module<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">import { valueOfPi } from '.\/constants.js'  export const twoPi = valueOfPi * 2<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"es2020\"><code>ES2020<\/code><\/h2>\n<p>  <\/p>\n<pre><code class=\"javascript\">import { valueOfPi } from '.\/constants.js' export const twoPi = valueOfPi * 2<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"commonjs\"><code>CommonJS<\/code><\/h2>\n<p>  <\/p>\n<pre><code class=\"javascript\">&quot;use strict&quot;; Object.defineProperty(exports, &quot;__esModule&quot;, { value: true }); exports.twoPi = void 0; const constants_js_1 = require(&quot;.\/constants.js&quot;); exports.twoPi = constants_js_1.valueOfPi * 2;<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"umd\"><code>UMD<\/code><\/h2>\n<p>  <\/p>\n<pre><code class=\"javascript\">(function (factory) {   if (typeof module === &quot;object&quot; &amp;&amp; typeof module.exports === &quot;object&quot;) {     var v = factory(require, exports);     if (v !== undefined) module.exports = v;   }   else if (typeof define === &quot;function&quot; &amp;&amp; define.amd) {     define([&quot;require&quot;, &quot;exports&quot;, &quot;.\/constants.js&quot;], factory);   } })(function (require, exports) {   &quot;use strict&quot;;   Object.defineProperty(exports, &quot;__esModule&quot;, { value: true });   exports.twoPi = void 0;   const constants_js_1 = require(&quot;.\/constants.js&quot;);   exports.twoPi = constants_js_1.valueOfPi * 2; });<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"prostranstva-imen-namespaces\">\u041f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d (namespaces)<\/h1>\n<p>  <\/p>\n<p><code>TS<\/code> \u0438\u043c\u0435\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>namespaces<\/code>. \u0414\u0430\u043d\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0438\u043c\u0435\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0438 \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 <a href=\"https:\/\/www.typescriptlang.org\/dt\/\"><code>DefinitelyTyped<\/code><\/a>. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e <code>namespaces<\/code> \u043d\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043d\u044b \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043c\u0438 (deprecated), \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043d\u0430\u0448\u043b\u0430 \u0432\u043e\u043f\u043b\u043e\u0449\u0435\u043d\u0438\u0435 \u0432 <code>ES-\u043c\u043e\u0434\u0443\u043b\u044f\u0445<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441.<\/p>\n<p>  <\/p>\n<hr>\n<p>  <\/p>\n<p><a href=\"https:\/\/macloud.ru\/?partner=4189mjxpzx\">VPS<\/a> \u0441\u0435\u0440\u0432\u0435\u0440\u044b \u043e\u0442 \u041c\u0430\u043a\u043b\u0430\u0443\u0434 \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0435.<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435\u0441\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u0432\u044b\u0448\u0435 \u0438\u043b\u0438 \u043a\u043b\u0438\u043a\u043d\u0443\u0432 \u043d\u0430 \u0431\u0430\u043d\u043d\u0435\u0440 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 10% \u0441\u043a\u0438\u0434\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u043c\u0435\u0441\u044f\u0446 \u0430\u0440\u0435\u043d\u0434\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438!<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/macloud.ru\/?partner=4189mjxpzx&amp;utm_source=habr&amp;utm_medium=perevod&amp;utm_campaign=igor\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/et\/1a\/yp\/et1aypandyuamqprsz3m2ntm4ky.png\"><\/a><\/p>\n<\/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\/macloud\/blog\/563722\/\"> https:\/\/habr.com\/ru\/company\/macloud\/blog\/563722\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ad\/rw\/w4\/adrww41gv8k_vuxeswr0-xkl57y.png\" alt=\"image\"><\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0441\u0435\u0440\u0438\u044e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 <a href=\"https:\/\/www.typescriptlang.org\/docs\/handbook\/intro.html\"><code> &quot;\u041a\u0430\u0440\u043c\u0430\u043d\u043d\u043e\u0439 \u043a\u043d\u0438\u0433\u0438 \u043f\u043e TypeScript<\/code>&quot;.<\/a>  <\/p>\n<p>\u0414\u0440\u0443\u0433\u0438\u0435 \u0447\u0430\u0441\u0442\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/macloud\/blog\/559902\/\">\u0427\u0430\u0441\u0442\u044c 1. \u041e\u0441\u043d\u043e\u0432\u044b<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/macloud\/blog\/559976\/\">\u0427\u0430\u0441\u0442\u044c 2. \u0422\u0438\u043f\u044b \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/macloud\/blog\/560594\/\">\u0427\u0430\u0441\u0442\u044c 3. \u0421\u0443\u0436\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/macloud\/blog\/561470\/\">\u0427\u0430\u0441\u0442\u044c 4. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/macloud\/blog\/562054\/\">\u0427\u0430\u0441\u0442\u044c 5. \u041e\u0431\u044a\u0435\u043a\u0442\u043d\u044b\u0435 \u0442\u0438\u043f\u044b<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/macloud\/blog\/562786\/\">\u0427\u0430\u0441\u0442\u044c 6. \u041c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u0442\u0438\u043f\u0430\u043c\u0438<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/macloud\/blog\/563408\/\">\u0427\u0430\u0441\u0442\u044c 7. \u041a\u043b\u0430\u0441\u0441\u044b<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h1 id=\"opredelenie-modulya\">\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f<\/h1>\n<p>  <\/p>\n<p>\u0412 <code>TS<\/code>, \u043a\u0430\u043a \u0438 \u0432 <code>ECMAScript2015<\/code>, \u043b\u044e\u0431\u043e\u0439 \u0444\u0430\u0439\u043b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 <code>import<\/code> \u0438\u043b\u0438 <code>export<\/code> \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f (\u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439), \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u043c.<\/p>\n<p>  <\/p>\n<p>\u0424\u0430\u0439\u043b, \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c.<\/p>\n<p>  <\/p>\n<p>\u041c\u043e\u0434\u0443\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0430 \u043d\u0435 \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u0442.\u0434., \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u043c\u043e\u0434\u0443\u043b\u0435, \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043e\u043d\u0438 \u0432 \u044f\u0432\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0437 \u043d\u0435\u0433\u043e \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043f\u0435\u0440\u0435\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u0438\u0445 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0444\u0430\u0439\u043b.<\/p>\n<p>  <\/p>\n<h1 id=\"ne-moduli\">\u041d\u0435 \u043c\u043e\u0434\u0443\u043b\u0438<\/h1>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f, \u0447\u0442\u043e <code>TS<\/code> \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u0435\u043c. \u0421\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f <code>JS<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u0447\u0442\u043e \u043b\u044e\u0431\u043e\u0439 \u0444\u0430\u0439\u043b \u0431\u0435\u0437 <code>export<\/code> \u0438\u043b\u0438 <code>await<\/code> \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c, \u0430 \u043d\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u043c.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u0442\u0438\u043f\u044b, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435, \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u043c\u0438 (\u0438\u043c\u0435\u044e\u0442 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438), \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0432 \u043e\u0434\u0438\u043d \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u0431\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u043a\u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 <code>outFile<\/code>, \u043b\u0438\u0431\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 <code>script<\/code> \u0432 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0435 (\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435).<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 <code>import<\/code> \u0438\u043b\u0438 <code>export<\/code>, \u043d\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0441\u0447\u0438\u0442\u0430\u043b\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u043c, \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443:<\/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-325236","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/325236","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=325236"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/325236\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=325236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=325236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=325236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}