Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
Elio	Struyf
Waldek Mastykarz
October	26th,	2017
TypeScript	for	SharePoint	
Developers
What	is	TypeScript?
It’s	a	strongly-typed	superset	
of	JavaScript
Benefits	of	using	TypeScript
• Allows	for	large-scale	JavaScript	applications
• Follows	ECMAScript	future	proposal
• Suppo...
Benefits	of	using	TypeScript
Hey,	show	us	some	code!
How	to	use	TypeScript	in	SharePoint	projects
Where	to	use	it?
• SharePoint	Framework
• JSLink
• Display	templates
• CEWP	/	SEWP
• Custom	actions
• Single	Page	Applicat...
Prerequisites
VSCode
• Node.js
• npm
• TypeScript	compiler
Visual	Studio
• TypeScript	add-in	for	VS
• NuGet
• MSBuild targ...
When	to	use	what?
VSCode
• SharePoint	Framework
• JSLink
• Display	templates
• CEWP	/	SEWP
• Custom	actions
• Single	Page	...
Using	TypeScript	in	VSCode
- Install:	npm install	-g	typescript
- Create	a	TS	file
- Run:	tsc index.ts --target	ES5
- Use	the	JS	file
Steps	to	start	...
Tip:	use	a	tsconfig.json	file	to	
simplify	things
But,	how	do	you	get	
intellisense?
By	declaration	/	definition	
files:	*.d.ts
npm install	@types/<module>	--save-dev
Display	
Templates
Demo
Using	TypeScript	in	Visual	
Studio
But,	how	do	you	get	
intellisense?
Use	NuGet to	install	
definitions
Add-inDemo
Questions?
SPUnite17 TypeScript for SharePoint Developers
SPUnite17 TypeScript for SharePoint Developers
Nächste SlideShare
Wird geladen in …5
×

SPUnite17 TypeScript for SharePoint Developers

SharePoint Unite 2017 Session

  • Als Erste(r) kommentieren

SPUnite17 TypeScript for SharePoint Developers

  1. 1. Elio Struyf Waldek Mastykarz October 26th, 2017 TypeScript for SharePoint Developers
  2. 2. What is TypeScript?
  3. 3. It’s a strongly-typed superset of JavaScript
  4. 4. Benefits of using TypeScript • Allows for large-scale JavaScript applications • Follows ECMAScript future proposal • Supports plain-old JavaScript • Not excluding any JavaScript feature • Improved consistency • IDE support (e.g. Intellisense) • Compile-time type checking
  5. 5. Benefits of using TypeScript
  6. 6. Hey, show us some code!
  7. 7. How to use TypeScript in SharePoint projects
  8. 8. Where to use it? • SharePoint Framework • JSLink • Display templates • CEWP / SEWP • Custom actions • Single Page Application • Add-ins
  9. 9. Prerequisites VSCode • Node.js • npm • TypeScript compiler Visual Studio • TypeScript add-in for VS • NuGet • MSBuild targets configuration
  10. 10. When to use what? VSCode • SharePoint Framework • JSLink • Display templates • CEWP / SEWP • Custom actions • Single Page Application Visual Studio • SharePoint Framework • Add-ins
  11. 11. Using TypeScript in VSCode
  12. 12. - Install: npm install -g typescript - Create a TS file - Run: tsc index.ts --target ES5 - Use the JS file Steps to start writing
  13. 13. Tip: use a tsconfig.json file to simplify things
  14. 14. But, how do you get intellisense?
  15. 15. By declaration / definition files: *.d.ts
  16. 16. npm install @types/<module> --save-dev
  17. 17. Display Templates Demo
  18. 18. Using TypeScript in Visual Studio
  19. 19. But, how do you get intellisense?
  20. 20. Use NuGet to install definitions
  21. 21. Add-inDemo
  22. 22. Questions?

×