mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
build: perform TypeCheck for all packages (#2573)
Co-authored-by: himself65 <himself65@outlook.com> Co-authored-by: Peng Xiao <pengxiao@outlook.com>
This commit is contained in:
0
apps/web/src/bootstrap/index.ts
Normal file
0
apps/web/src/bootstrap/index.ts
Normal file
@@ -36,7 +36,7 @@ export type BaseHeaderProps<
|
||||
leftSlot?: ReactNode;
|
||||
};
|
||||
|
||||
export const enum HeaderRightItemName {
|
||||
export enum HeaderRightItemName {
|
||||
EditorOptionMenu = 'editorOptionMenu',
|
||||
TrashButtonGroup = 'trashButtonGroup',
|
||||
SyncUser = 'syncUser',
|
||||
|
||||
@@ -10,7 +10,7 @@ import { toast } from '../../../utils';
|
||||
declare global {
|
||||
interface DocumentEventMap {
|
||||
'affine-error': CustomEvent<{
|
||||
code: MessageCode;
|
||||
code: keyof typeof Messages;
|
||||
}>;
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ export const MessageCenter: FC = memo(function MessageCenter() {
|
||||
useEffect(() => {
|
||||
const listener = (
|
||||
event: CustomEvent<{
|
||||
code: MessageCode;
|
||||
code: keyof typeof Messages;
|
||||
}>
|
||||
) => {
|
||||
// fixme: need refactor
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { WorkspaceSubPath } from '@affine/workspace/type';
|
||||
import type { NextRouter } from 'next/router';
|
||||
import { useCallback } from 'react';
|
||||
|
||||
export const enum RouteLogic {
|
||||
export enum RouteLogic {
|
||||
REPLACE = 'replace',
|
||||
PUSH = 'push',
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import '@affine/component/theme/global.css';
|
||||
import '@affine/component/theme/theme.css';
|
||||
import 'react-mosaic-component/react-mosaic-component.css';
|
||||
// bootstrap code before everything
|
||||
import '@affine/env/bootstrap';
|
||||
import '../bootstrap';
|
||||
|
||||
import { WorkspaceFallback } from '@affine/component/workspace';
|
||||
import { config } from '@affine/env';
|
||||
|
||||
@@ -4,7 +4,6 @@ import type {
|
||||
} from '@affine/workspace/type';
|
||||
import type { AffinePublicWorkspace } from '@affine/workspace/type';
|
||||
import type { WorkspaceRegistry } from '@affine/workspace/type';
|
||||
import { WorkspaceSubPath } from '@affine/workspace/type';
|
||||
import { Workspace as BlockSuiteWorkspace } from '@blocksuite/store';
|
||||
import type { NextPage } from 'next';
|
||||
import type { ReactElement, ReactNode } from 'react';
|
||||
@@ -25,6 +24,13 @@ export type NextPageWithLayout<P = Record<string, unknown>, IP = P> = NextPage<
|
||||
getLayout?: (page: ReactElement) => ReactNode;
|
||||
};
|
||||
|
||||
export enum WorkspaceSubPath {
|
||||
ALL = 'all',
|
||||
SETTING = 'setting',
|
||||
TRASH = 'trash',
|
||||
SHARED = 'shared',
|
||||
}
|
||||
|
||||
export const WorkspaceSubPathName = {
|
||||
[WorkspaceSubPath.ALL]: 'All Pages',
|
||||
[WorkspaceSubPath.SETTING]: 'Settings',
|
||||
|
||||
Reference in New Issue
Block a user