refator: group core component ref in a object

Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Camila Belo
2023-11-20 09:37:24 +01:00
parent 413f05a6c9
commit a9da252cb4
7 changed files with 35 additions and 46 deletions
@@ -40,24 +40,29 @@ export function createComponentRef<T>(options: {
};
}
/** @public */
export const coreProgressComponentRef =
createComponentRef<CoreProgressComponent>({ id: 'core.components.progress' });
const coreProgressComponentRef = createComponentRef<CoreProgressComponent>({
id: 'core.components.progress',
});
/** @public */
export const coreBootErrorPageComponentRef =
const coreBootErrorPageComponentRef =
createComponentRef<CoreBootErrorPageComponent>({
id: 'core.components.bootErrorPage',
});
/** @public */
export const coreNotFoundErrorPageComponentRef =
const coreNotFoundErrorPageComponentRef =
createComponentRef<CoreNotFoundErrorPageComponent>({
id: 'core.components.notFoundErrorPage',
});
/** @public */
export const coreErrorBoundaryFallbackComponentRef =
const coreErrorBoundaryFallbackComponentRef =
createComponentRef<CoreErrorBoundaryFallbackComponent>({
id: 'core.components.errorBoundaryFallback',
});
/** @public */
export const coreComponentsRefs = {
progress: coreProgressComponentRef,
bootErrorPage: coreBootErrorPageComponentRef,
notFoundErrorPage: coreNotFoundErrorPageComponentRef,
errorBoundaryFallback: coreErrorBoundaryFallbackComponentRef,
};
@@ -14,13 +14,7 @@
* limitations under the License.
*/
export {
coreProgressComponentRef,
coreBootErrorPageComponentRef,
coreErrorBoundaryFallbackComponentRef,
coreNotFoundErrorPageComponentRef,
type ComponentRef,
} from './ComponentRef';
export { coreComponentsRefs, type ComponentRef } from './ComponentRef';
export { ExtensionError } from './ExtensionError';