diff --git a/packages/runtime/src/core/provider.ts b/packages/runtime/src/core/provider.ts index 5268797ab..f3209f278 100644 --- a/packages/runtime/src/core/provider.ts +++ b/packages/runtime/src/core/provider.ts @@ -56,7 +56,7 @@ export interface DataSourceItem { type: string; options: { uri: string; - params: object; + params: Record; method: string; shouldFetch?: string; willFetch?: string; @@ -121,6 +121,7 @@ export default class Provider { } async(): Promise { + // eslint-disable-next-line no-async-promise-executor return new Promise(async (resolve, reject) => { try { const appData: IAppData = await this.getAppData(); @@ -216,11 +217,11 @@ export default class Provider { throw new Error('Method called "getAppData" not implemented.'); } - getPageData(pageId?: string): any { + getPageData(): any { throw new Error('Method called "getPageData" not implemented.'); } - getLazyComponent(pageId: string, props: any): any { + getLazyComponent(): any { throw new Error('Method called "getLazyComponent" not implemented.'); } @@ -229,7 +230,7 @@ export default class Provider { throw new Error('Method called "createApp" not implemented.'); } - runApp(App: any, config: IAppConfig) { + runApp() { throw new Error('Method called "runApp" not implemented.'); } diff --git a/packages/runtime/src/core/runApp.ts b/packages/runtime/src/core/runApp.ts index 6c6cc2318..0241334fd 100644 --- a/packages/runtime/src/core/runApp.ts +++ b/packages/runtime/src/core/runApp.ts @@ -37,15 +37,15 @@ export default function runApp() { const App = provider.createApp(); provider.runApp(App, config); }).catch((err: Error) => { - console.error(err.message); - const { fallbackUI, afterCatch } = app.getErrorBoundary() || {}; - if (typeof afterCatch === 'function') { - afterCatch(err.message, err.stack); - } - if (!fallbackUI) { - return; - } - provider.runApp(fallbackUI, {}); + console.error(err.message); + const { fallbackUI, afterCatch } = app.getErrorBoundary() || {}; + if (typeof afterCatch === 'function') { + afterCatch(err.message, err.stack); + } + if (!fallbackUI) { + return; + } + provider.runApp(fallbackUI, {}); }); }); }