{"action":"closed","issue":{"url":"https://api.github.com/repos/SharePoint/sp-dev-docs/issues/1666","repository_url":"https://api.github.com/repos/SharePoint/sp-dev-docs","labels_url":"https://api.github.com/repos/SharePoint/sp-dev-docs/issues/1666/labels{/name}","comments_url":"https://api.github.com/repos/SharePoint/sp-dev-docs/issues/1666/comments","events_url":"https://api.github.com/repos/SharePoint/sp-dev-docs/issues/1666/events","html_url":"https://github.com/SharePoint/sp-dev-docs/issues/1666","id":314584414,"number":1666,"title":"SPFx and JSOM - typings need TypeScript v2.3?","user":{"login":"wy62","id":38424552,"avatar_url":"https://avatars3.githubusercontent.com/u/38424552?v=4","gravatar_id":"","url":"https://api.github.com/users/wy62","html_url":"https://github.com/wy62","followers_url":"https://api.github.com/users/wy62/followers","following_url":"https://api.github.com/users/wy62/following{/other_user}","gists_url":"https://api.github.com/users/wy62/gists{/gist_id}","starred_url":"https://api.github.com/users/wy62/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wy62/subscriptions","organizations_url":"https://api.github.com/users/wy62/orgs","repos_url":"https://api.github.com/users/wy62/repos","events_url":"https://api.github.com/users/wy62/events{/privacy}","received_events_url":"https://api.github.com/users/wy62/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-16T10:10:56Z","updated_at":"2018-04-16T10:35:35Z","closed_at":"2018-04-16T10:35:35Z","author_association":"NONE","body":"Following the guide [here](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/guidance/connect-to-sharepoint-using-jsom#reference-jsom-imperatively) to set up JSOM in my SPFx web part project.\r\n\r\nWhen attempting to build the solution I get lots of errors to do with the typings, e.g.: \r\n\r\n> Error - typescript - node_modules\\@types\\sharepoint\\index.d.ts(91,42): error TS2314: Generic type 'ListItem<T, any>' requires 2 type argument(s).\r\n\r\nLooking at the top of the index.d.ts it seems it requires TypeScript v2.3 (or later?):\r\n\r\n![image](https://user-images.githubusercontent.com/38424552/38803260-8ee08ec0-4166-11e8-80a9-9fd099b6774c.png)\r\n\r\nHowever, I believe SPFx uses TypeScript version 2.2.2.\r\n\r\nHow can I resolve this problem so I can use JSOM in my SPFx project?\r\n\r\nIs this documentation correct?\r\n\r\n---\r\n#### Document Details\r\n\r\n⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*\r\n\r\n* ID: 3762e11e-4284-069c-ed5d-d4695a5100b7\r\n* Version Independent ID: 42b56024-f9c6-2e76-2fc1-acd84f9440b2\r\n* Content: [Connect to SharePoint using the JavaScript Object Model (JSOM)](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/guidance/connect-to-sharepoint-using-jsom#reference-jsom-imperatively)\r\n* Content Source: [docs/spfx/web-parts/guidance/connect-to-sharepoint-using-jsom.md](https://github.com/SharePoint/sp-dev-docs/blob/master/docs/spfx/web-parts/guidance/connect-to-sharepoint-using-jsom.md)\r\n* Service: **unspecified**\r\n* GitHub Login: @spdevdocs\r\n* Microsoft Alias: **spdevdocs**"}}
{"actor":{"display_login":"wy62"}}