What is the “as syntax” pointed out by tslint?
I upgraded tslint and now it complains about: ERROR: src/Metronome/JobFetcher.ts[13, 32]: Type assertion using the '<>' syntax is forbidden. Use the 'as' syntax instead. The offending code looks like: const jobs = <JobConfig[]> <any> await rp(fetchJobsOptions); What is the as syntax though and why should I use it? k0pernikus Refactor your code like this: const jobs = await rp(fetchJobsOptions) as JobConfig[]; As pointed out in the TypeScript Deep Dive book by Basarat Ali Syed , it says about type casting: as foo vs. <foo> Originally the syntax that was added was <foo> . This is demonstrated