function preloadDesigntimeLibrary(oMetadata) {
		return new Promise(function(resolve, reject) {
			sap.ui.require(["sap/ui/core/Lib"], function (Library) {
				//preload the designtime data for the library
				var sLibrary = oMetadata.getLibraryName(),
					sPreload = Library.getPreloadMode(),
					oLibrary = Library.all()[sLibrary];
				if (oLibrary && oLibrary.designtime) {
					var oPromise;
					if (sPreload === "async" || sPreload === "sync") {
						//ignore errors _loadJSResourceAsync is true here, do not break if there is no preload.
						oPromise = sap.ui.loader._.loadJSResourceAsync(oLibrary.designtime.replace(/\.designtime$/, "-preload.designtime.js"), true);
					} else {
						oPromise = Promise.resolve();
					}
					resolve(new Promise(function(fnResolve, fnReject) {
						oPromise.then(function() {
							sap.ui.require([oLibrary.designtime], function(oLib) {
								fnResolve(oLib);
							}, fnReject);
						});
					}));
				}
				resolve(null);
			}, reject);
		});
	}
Returns a promise that resolves if the designtime preload of a library is loaded for the given oMetadata
object is loaded.

@private