mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 11:06:25 +08: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:
@@ -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',
|
||||
|
||||
+30
-4
@@ -1,8 +1,7 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"target": "ESNext",
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
@@ -18,6 +17,33 @@
|
||||
"incremental": true,
|
||||
"experimentalDecorators": true
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "src/types/types.d.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
"include": [
|
||||
"next-env.d.ts",
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
"src/types/types.d.ts",
|
||||
"../../packages/graphql",
|
||||
"../electron/layers"
|
||||
],
|
||||
"exclude": ["node_modules"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../packages/env"
|
||||
},
|
||||
{
|
||||
"path": "../../packages/debug"
|
||||
},
|
||||
{
|
||||
"path": "../../packages/component"
|
||||
},
|
||||
{
|
||||
"path": "../../packages/i18n"
|
||||
},
|
||||
{
|
||||
"path": "../../packages/jotai"
|
||||
},
|
||||
{
|
||||
"path": "../../packages/hooks"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user