The latest version of the @types/sharepoint is throwing the the following error:
Error – typescript – node_modules\@types\sharepoint\index.d.ts(3604,17): error TS1005: ‘,’ expected.
Error – typescript – node_modules\@types\sharepoint\index.d.ts(70,42): error TS2314: Generic type ‘ListItem<T, any>’ requires 2 type
argument(s).
After spending sometime trying to fix the issue, I found the current version of the @types/sharepoint is expecting the new TypeScript Compiler. Issue reported
Fix:
If you already have installed the latest version, uninstall the version from the solution:
npm uninstall @types/sharepoint
Use the last working version (2013.1.6):
npm install @types/sharepoint@2013.1.6 --save-dev
Note: These are the versions that are available during the time of this post.