我升级了tslint,现在它抱怨:
ERROR: src/Metronome/JobFetcher.ts[13, 32]: Type assertion using the '<>' syntax is forbidden. Use the 'as' syntax instead.
Run Code Online (Sandbox Code Playgroud)
违规代码如下:
const jobs = <JobConfig[]> <any> await rp(fetchJobsOptions);
Run Code Online (Sandbox Code Playgroud)
什么是语法,我为什么要使用它?