What is the “as syntax” pointed out by tslint?
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 below: var foo: any; var bar = <string> foo; // … Read more