Using escape or unescape in TypeScript, you can get the following error:
TSError: ⨯ Unable to compile TypeScript
src\lecture_search\LectureSearchApp.tsx (117,11): Cannot find name 'unescape'. (2304)
at getOutput (D:\projects\image-annotation\node_modules\ts-node\src\ts-node.ts:210:13)
at Object.loader (D:\projects\image-annotation\node_modules\ts-node\src\ts-node.ts:225:23)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Object. (D:\projects\image-annotation\index.js:7:1)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
To fix this, add:
declare function unescape(s:string): string;
declare function escape(s:string): string;
This is because these are considered deprecated.
The alternative would be to use decodeURI ?
Thanks!!!
You helped me (-;
Thanks, exact thing I needed.
Deprecated?!? says who? they look legit to me https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/escape
thank a lot !!!
Thanks a lot, this was helpful!!