Update to _spPageContextInfo type definitions - new properties available
Jun 16, 2017 1 min.
If you’re building modern SharePoint components (Framework or not), there’s a high chance you’re using TypeScript.
In that case you’re probably using @types/SharePoint to provide auto-completion as well as some level of understanding for the compiler of what’s going on.
There’s one object in particular that SharePoint hydrates for us to give some understanding of where the user is and what he/she is doing: _spPageContextInfo.
A lot of properties were missing in those type definitions, old stuff like the web Id but also new things coming from SharePoint Online like canUserCreateMicrosoftForm.