{"id":16891,"date":"2026-06-20T08:59:44","date_gmt":"2026-06-19T23:59:44","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=16891"},"modified":"2026-06-20T09:02:24","modified_gmt":"2026-06-20T00:02:24","slug":"typescript%eb%98%90%eb%8a%94-javascript%ec%97%90%ec%84%9c%ec%9d%98-%ea%b9%8a%ec%9d%80-%eb%b3%b5%ec%82%ac","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=16891","title":{"rendered":"TypeScript(\ub610\ub294 JavaScript)\uc5d0\uc11c\uc758 \uae4a\uc740 \ubcf5\uc0ac"},"content":{"rendered":"<p>GoF\uc758 Prototype \ud328\ud134\uc73c\ub85c \uc608\uc2dc \ucf54\ub4dc\ub97c \ub4e4\uc5b4\ubcf4\uba74 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"typescript\">\r\nclass User {\r\n    constructor(\r\n        public name: string,\r\n        public hobbies: string[],\r\n        public settings: Map&lt;string, any>\r\n    ) {}\r\n\r\n    clone(): User {\r\n        const copy = Object.create(\r\n            Object.getPrototypeOf(this)\r\n        );\r\n\r\n        Object.assign(\r\n            copy,\r\n            structuredClone(this)\r\n        );\r\n\r\n        return copy;\r\n    }\r\n}\r\n<\/pre>\n<p>clone \ub9e4\uc11c\ub4dc\uc5d0 \uae4a\uc740 \ubcf5\uc0ac\uc5d0 \ub300\ud55c \ucf54\ub4dc\uac00 \uc5b8\uae09\ub418\uace0 \uc788\uc2b5\ub2c8\ub2e4. 9\ubc88 \ub77c\uc778\uc758 \ucf54\ub4dc\uac00 \ub9e4\uc11c\ub4dc\uc5d0 \ub300\ud55c \ubcf5\uc0ac, 13\ubc88 \ub77c\uc774\uc758 \ucf54\ub4dc\uac00 \uc18d\uc131\uc5d0 \ub300\ud55c \uae4a\uc740 \ubcf5\uc0ac\uc785\ub2c8\ub2e4. \ub9e4\uc11c\ub4dc\ub97c \uac00\uc9c4 \uac1d\uccb4\uc758 \ubcf5\uc0ac\uc5d0\uc11c\ub294 \uc774 \ub450\uac00\uc9c0\uc5d0 \ub300\ud55c \ubcf5\uc0ac\uac00 \ubc18\ub4dc\uc2dc \ud544\uc694\ud569\ub2c8\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GoF\uc758 Prototype \ud328\ud134\uc73c\ub85c \uc608\uc2dc \ucf54\ub4dc\ub97c \ub4e4\uc5b4\ubcf4\uba74 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4. class User { constructor( public name: string, public hobbies: string[], public settings: Map&lt;string, any> ) {} clone(): User { const copy = Object.create( Object.getPrototypeOf(this) ); Object.assign( copy, structuredClone(this) ); return copy; } } clone \ub9e4\uc11c\ub4dc\uc5d0 \uae4a\uc740 \ubcf5\uc0ac\uc5d0 \ub300\ud55c \ucf54\ub4dc\uac00 \uc5b8\uae09\ub418\uace0 \uc788\uc2b5\ub2c8\ub2e4. 9\ubc88 \ub77c\uc778\uc758 \ucf54\ub4dc\uac00 \ub9e4\uc11c\ub4dc\uc5d0 \ub300\ud55c \ubcf5\uc0ac, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=16891\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;TypeScript(\ub610\ub294 JavaScript)\uc5d0\uc11c\uc758 \uae4a\uc740 \ubcf5\uc0ac&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[88,1],"tags":[],"class_list":["post-16891","post","type-post","status-publish","format-standard","hentry","category-javascript","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/16891","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16891"}],"version-history":[{"count":5,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/16891\/revisions"}],"predecessor-version":[{"id":16893,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/16891\/revisions\/16893"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16891"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16891"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16891"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}