mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
build: enhance tsconfig type check (#2732)
This commit is contained in:
@@ -30,7 +30,7 @@ export class AffineErrorBoundary extends Component<
|
||||
AffineErrorBoundaryProps,
|
||||
AffineErrorBoundaryState
|
||||
> {
|
||||
public state: AffineErrorBoundaryState = {
|
||||
public override state: AffineErrorBoundaryState = {
|
||||
error: null,
|
||||
};
|
||||
|
||||
@@ -40,11 +40,11 @@ export class AffineErrorBoundary extends Component<
|
||||
return { error };
|
||||
}
|
||||
|
||||
public componentDidCatch(error: AffineError, errorInfo: ErrorInfo) {
|
||||
public override componentDidCatch(error: AffineError, errorInfo: ErrorInfo) {
|
||||
console.error('Uncaught error:', error, errorInfo);
|
||||
}
|
||||
|
||||
public render(): ReactNode {
|
||||
public override render(): ReactNode {
|
||||
if (this.state.error) {
|
||||
const error = this.state.error;
|
||||
if (error instanceof PageNotFoundError) {
|
||||
|
||||
@@ -80,6 +80,7 @@ const PageListEmpty = (props: {
|
||||
if (listType === 'shared') {
|
||||
return t['emptySharedPages']();
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -268,6 +268,7 @@ export const WorkspaceLayout: FC<PropsWithChildren> =
|
||||
affineGlobalChannel.disconnect();
|
||||
};
|
||||
}
|
||||
return;
|
||||
}, [currentWorkspaceId, jotaiWorkspaces]);
|
||||
|
||||
const Provider =
|
||||
|
||||
@@ -12,7 +12,7 @@ const description =
|
||||
export default class AppDocument extends Document<{
|
||||
emotionStyleTags: EmotionJSX.Element[];
|
||||
}> {
|
||||
static getInitialProps = async (ctx: DocumentContext) => {
|
||||
static override getInitialProps = async (ctx: DocumentContext) => {
|
||||
const originalRenderPage = ctx.renderPage;
|
||||
|
||||
const cache = createEmotionCache();
|
||||
@@ -41,7 +41,7 @@ export default class AppDocument extends Document<{
|
||||
emotionStyleTags,
|
||||
};
|
||||
};
|
||||
render() {
|
||||
override render() {
|
||||
return (
|
||||
<Html>
|
||||
<Head>
|
||||
|
||||
@@ -63,6 +63,7 @@ const IndexPageInner = () => {
|
||||
} else {
|
||||
console.warn('No target workspace. This should not happen in production');
|
||||
}
|
||||
return;
|
||||
}, [helper, jumpToPage, jumpToSubPath, router, workspaces]);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user