Handout UsingTypescriptandnpm
Handout UsingTypescriptandnpm
Lesson 2.2
Overview
Description:
Learn the foundations for TypeScript and npm development
Lesson Notes
• Create a new CDS environment for this course. You will not need to install the Dynamics 365
Apps.
o You could create a trial in an existing tenant - https://docs.microsoft.com/en-
us/power-platform/admin/trial-environments#create-a-trial-environment-without-
dynamics-365-apps
o You could also create a brand new tenant for your trial -
https://docs.microsoft.com/en-us/powerapps/maker/signup-for-powerapps#get-a-
license-from-scratch
o If you have an existing tenant with capacity you can use the admin center to create a
new environment - https://docs.microsoft.com/en-us/power-platform/admin/create-
environment
• You can grab the PCF Tester Entity Solution from /Module 2 Code/ProPCF_1_0_0_0.zip
• Simple TypeScript quick start - https://bit.ly/TypeScriptQuickStart
• Tsconfig reference - https://bit.ly/tsconfiginfo
• Information on ES6 vs ES5 - https://bit.ly/es6vses5
• Installing the XRM Typescript type definitions
npm install --save @types/xrm
npm install --save cryptr
npm install --save-dev @types/cryptr
• Simple TypeScript:
import Cryptr from 'cryptr';
export async function foo(){
const c = new Cryptr("foo bar");
return await Xrm.WebApi.retrieveRecord("account","123");
Professional PCF Controls for Model Driven Apps © Develop 1 Ltd 2020 Page 1
}
Professional PCF Controls for Model Driven Apps © Develop 1 Ltd 2020 Page 2