OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
687 stars 94 forks source link

TypeScript type definition for isSetSupported method #2354

Closed clavx closed 7 months ago

clavx commented 2 years ago

Message from office-js bot: We’re closing this issue because it has been inactive for a long time. We’re doing this to keep the issues list manageable and useful for everyone. If this issue is still relevant for you, please create a new issue. Thank you for your understanding and continued feedback.

What is the difference between these isSetSupported methods defined in @types/office-js?

isSetSupported

This method returns the value as expected. isSetSupported in Office.RequirementSetSupport interface

console.log(Office.context.requirements.isSetSupported("Mailbox", "1.11"));

This method results in an error. Office.isSetSupported

console.log(Office.isSetSupported("Mailbox", "1.11"));

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

AlexJerabek commented 2 years ago

Hi @clavx,

My understanding was that there was no functional difference between the two. I'm going to transfer this to the office-js repo, where the product team can investigate the issue.

ghelyar commented 2 years ago

Also OfficeRuntime.apiInformation.isSetSupported