{"id":4780,"date":"2016-07-25T02:36:05","date_gmt":"2016-07-25T02:36:05","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=4780"},"modified":"2016-07-25T02:36:05","modified_gmt":"2016-07-25T02:36:05","slug":"fixing-error-cannot-find-name-unescape-typescript","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/fixing-error-cannot-find-name-unescape-typescript\/","title":{"rendered":"Fixing error: &#8220;Cannot find name &#8216;unescape'&#8221; in TypeScript"},"content":{"rendered":"<p>Using escape or unescape in TypeScript, you can get the following error:<\/p>\n<pre lang=\"javascript\">\nTSError: \u2a2f Unable to compile TypeScript\nsrc\\lecture_search\\LectureSearchApp.tsx (117,11): Cannot find name 'unescape'. (2304)\n    at getOutput (D:\\projects\\image-annotation\\node_modules\\ts-node\\src\\ts-node.ts:210:13)\n    at Object.loader (D:\\projects\\image-annotation\\node_modules\\ts-node\\src\\ts-node.ts:225:23)\n    at Module.load (module.js:456:32)\n    at tryModuleLoad (module.js:415:12)\n    at Function.Module._load (module.js:407:3)\n    at Module.require (module.js:466:17)\n    at require (internal\/module.js:20:19)\n    at Object.<anonymous> (D:\\projects\\image-annotation\\index.js:7:1)\n    at Module._compile (module.js:541:32)\n    at Object.Module._extensions..js (module.js:550:10)\n<\/pre>\n<p>To fix this, add:<\/p>\n<pre lang=\"javascript\">\ndeclare function unescape(s:string): string;\ndeclare function escape(s:string): string;\n<\/pre>\n<p>This is because these are considered deprecated.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to fix errors using old browser function in Node<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[9],"tags":[302,557],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/4780"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=4780"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/4780\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=4780"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=4780"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=4780"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}