UNPKG

office-addin-dev-settings

Version:

Configure developer settings for Office Add-ins.

41 lines 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseAppType = exports.AppType = void 0; 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 || (exports.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}'.`); } } exports.parseAppType = parseAppType; //# sourceMappingURL=appType.js.map