{"id":21900,"date":"2024-07-30T13:29:03","date_gmt":"2024-07-30T10:29:03","guid":{"rendered":"https:\/\/www.fl.ru\/projects\/5342944\/sozdanie-funktsii-modifikatsii-koda-typescript-s-pomoschyu-jscodeshift-ili-pohojego-kak-naprimer-astx.html"},"modified":"2024-07-30T13:29:03","modified_gmt":"2024-07-30T10:29:03","slug":"%d1%81%d0%be%d0%b7%d0%b4%d0%b0%d0%bd%d0%b8%d0%b5-%d1%84%d1%83%d0%bd%d0%ba%d1%86%d0%b8%d0%b8-%d0%bc%d0%be%d0%b4%d0%b8%d1%84%d0%b8%d0%ba%d0%b0%d1%86%d0%b8%d0%b8-%d0%ba%d0%be%d0%b4%d0%b0-typescript","status":"publish","type":"post","link":"https:\/\/texnolenta.ru\/job\/2024\/07\/30\/%d1%81%d0%be%d0%b7%d0%b4%d0%b0%d0%bd%d0%b8%d0%b5-%d1%84%d1%83%d0%bd%d0%ba%d1%86%d0%b8%d0%b8-%d0%bc%d0%be%d0%b4%d0%b8%d1%84%d0%b8%d0%ba%d0%b0%d1%86%d0%b8%d0%b8-%d0%ba%d0%be%d0%b4%d0%b0-typescript\/","title":{"rendered":"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 TypeScript \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e jscodeshift \u0438\u043b\u0438 \u043f\u043e\u0445\u043e\u0436\u0435\u0433\u043e, \u043a\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 ASTX. (\u0411\u044e\u0434\u0436\u0435\u0442: 15000 &#8381;)"},"content":{"rendered":"<p> \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 TypeScript \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e jscodeshift \u0438\u043b\u0438 \u043f\u043e\u0445\u043e\u0436\u0435\u0433\u043e \u043f\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u043a\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 ASTX. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<br \/>\n\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434\/\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (\u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u0435\u0449\u0435 \u043d\u0435\u0442). \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043f\u0430\u0440\u0441\u0435\u0440 \u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c\u0441\u044f, \u043a\u0430\u043a \u043e\u043f\u0446\u0438\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<br \/>\n\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430 (\u043d\u0430\u0431\u043e\u0440 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438-\u0441\u043f\u0438\u0441\u043a\u0430\u043c\u0438):<br \/>\n{<br \/>\n\u2026<br \/>\nimports: [code1, code2, \u2026],<br \/>\n\u2026<br \/>\n}<br \/>\n\u0412\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438: ins_code (`code3` )<br \/>\n\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<br \/>\n{<br \/>\n\u2026<br \/>\nimports: [code3, code1, code2, \u2026],<br \/>\n\u2026<br \/>\n} \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<br \/>\n\u0412 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 import \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c `TypeOrmModule.forRoot({type: &#8216;postgres&#8217;, host: &#8216;Postgres&#8217;})` (\u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 ins_code (`TypeOrmModule.forRoot({type: &#8216;postgres&#8217;, host: &#8216;Postgres&#8217;})`) \u041f\u0440\u0438\u043c\u0435\u0440  <br \/>\n\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434:<br \/>\nimport UserModule as process from \u201cusers.module\u201d;<br \/>\n@Module({ imports: [UsersModule], providers: [AppService],<br \/>\n})<br \/>\nexport class AppModule {} \u0412\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u0434:<br \/>\nimport UserModule as process from \u201cusers.module\u201d;<br \/>\n@Module({ imports: [TypeOrmModule.forRoot({type: &#8216;postgres&#8217;, host: &#8216;Postgres&#8217;}), UsersModule], providers: [AppService],<br \/>\n})<br \/>\nexport class AppModule {} \u041f\u0440\u0438\u043c\u0435\u0440 2.<br \/>\n\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434:<br \/>\nimport UserModule as process from \u201cusers.module\u201d;<br \/>\n@Module()<br \/>\nexport class AppModule {} \u0412\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u0434:<br \/>\nimport UserModule as process from \u201cusers.module\u201d;<br \/>\n@Module({ imports: [TypeOrmModule.forRoot({type: &#8216;postgres&#8217;, host: &#8216;Postgres&#8217;}), UsersModule]<br \/>\n})<br \/>\nexport class AppModule {}  <\/p>\n","protected":false},"excerpt":{"rendered":"<p> \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 TypeScript \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e jscodeshift \u0438\u043b\u0438 \u043f\u043e\u0445\u043e\u0436\u0435\u0433\u043e \u043f\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430, \u043a\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 ASTX. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<br \/>\n\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434\/\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (\u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u0435\u0449\u0435 \u043d\u0435\u0442). \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[13],"class_list":["post-21900","post","type-post","status-publish","format-standard","hentry","category-flrusoft","tag-13"],"_links":{"self":[{"href":"https:\/\/texnolenta.ru\/job\/wp-json\/wp\/v2\/posts\/21900","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/texnolenta.ru\/job\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/texnolenta.ru\/job\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/texnolenta.ru\/job\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/texnolenta.ru\/job\/wp-json\/wp\/v2\/comments?post=21900"}],"version-history":[{"count":0,"href":"https:\/\/texnolenta.ru\/job\/wp-json\/wp\/v2\/posts\/21900\/revisions"}],"wp:attachment":[{"href":"https:\/\/texnolenta.ru\/job\/wp-json\/wp\/v2\/media?parent=21900"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/texnolenta.ru\/job\/wp-json\/wp\/v2\/categories?post=21900"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/texnolenta.ru\/job\/wp-json\/wp\/v2\/tags?post=21900"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}