Building Applications and Solutions with Microsoft 365 Core Services (legacy) — Question 40
You plan to develop a TypeScript client-side app that will use the MSGraphClient library.
You need to configure Microsoft Visual Studio Code to use IntelliSense and support code completion for the MSGraph client library.
Which two actions should you perform? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
Answer options
- A. Add the following import statement to the code: import * as MicrosoftGraph from '@microsoft/microsoft-graph-client';
- B. Run the npm install @microsoft/microsoft-graph-types --save-dev command.
- C. Run the npm install @microsoft/microsoft-graph-client --save-dev command.
- D. Install the Microsoft Graph Toolkit.
- E. Add the following import statement to the code: import * as MicrosoftGraph from '@microsoft/microsoft-graph-types';
Correct answer: A, B
Explanation
The correct answers are A and B. Answer A provides the necessary import statement for the MSGraphClient library, enabling IntelliSense and code completion. Answer B installs the types used by the library, which is crucial for accurate code suggestions. Options C, D, and E do not contribute to setting up IntelliSense for the MSGraphClient library specifically.