UNPKG

office-addin-dev-settings

Version:

Configure developer settings for Office Add-ins.

41 lines 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AppType = void 0; exports.parseAppType = parseAppType; const office_addin_usage_data_1 = require("office-addin-usage-data"); /** * The type of Office application. */ var AppType; (function (AppType) { /** * Office application for Windows or Mac */ AppType["Desktop"] = "desktop"; /** * Office application for the web browser */ AppType["Web"] = "web"; })(AppType || (exports.AppType = AppType = {})); /** * Parse the input text and get the associated AppType * @param text app-type/platform text * @returns AppType or undefined. */ function parseAppType(text) { switch (text ? text.toLowerCase() : undefined) { case "desktop": case "macos": case "win32": case "ios": case "android": return AppType.Desktop; case "web": return AppType.Web; case undefined: return undefined; default: throw new office_addin_usage_data_1.ExpectedError(`Please select a valid app type instead of '${text}'.`); } } //# sourceMappingURL=appType.js.map