src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider.ts/requireToContent
export function requireToContent(instantiationService: IInstantiationService, resource: URI): Promise<string> {
	if (!resource.query) {
		throw new Error('Welcome: invalid resource');
	}

	const query = JSON.parse(resource.query);
	if (!query.moduleId) {
		throw new Error('Welcome: invalid resource');
	}

	const content: Promise<string> = new Promise<string>((resolve, reject) => {
		require([query.moduleId], content => {
			try {
				resolve(instantiationService.invokeFunction(content.default));
			} catch (err) {
				reject(err);
			}
		});
	});

	return content;
}