I am using Azure DevOps storage, so I need to use the following code (as shown in the documentation: Azure DevOps Data Storage):
const extDataService = await SDK.getService<IExtensionDataService>(
CommonServiceIds.ExtensionDataService
);
import { IExtensionDataService, CommonServiceIds } from "azure-devops-extension-api";
However, I am getting the error shown in the attached screenshot. Could you please provide a solution?
Error when using IExtensionDataService with Azure DevOps storage (Uncaught TypeError: (void 0) is not a function)
I am trying to store values in Azure DevOps storage, following the guidance from the Azure DevOps Data Storage documentation.
I expected the code to return a valid IExtensionDataService object so that I could use it to store and retrieve values. However, it is throwing the error shown in the screenshot.
I would like to get the correct working code for storing values using IExtensionDataService, or an alternative method if this approach is no longer supported.
