refator: group core component ref in a object
Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
@@ -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';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user