function transpileAndRegisterForModule(loader, module, component, source, language) {
  return transpileSource(module.name, component.name, source, language)
    .then((src) => {
      const moduleBase = path.resolve(loader.baseDir, module.base);
      return evaluateModule(moduleBase, module.name, component.name, src);
    })
    .then((implementation) => {
      registerSources(loader, module.name, component.name, source, language);
      registerSpecs(loader, module.name, component.name, component.tests || '');
      return new Promise((resolve, reject) => {
        loader.registerComponent(module.name, component.name, implementation, (err) => {
          if (err) {
            reject(err);
            return;
          }
          resolve();
        });
      });
    });
}
@param {import("../ComponentLoader").ComponentLoader} loader
@param {import("fbp-manifest/dist/lib/list").FbpManifestModule} module
@param {import("fbp-manifest/dist/lib/list").FbpManifestComponent} component
@param {string} source
@param {string} language
@returns {Promise<void>}