mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 12:36:24 +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:
@@ -13,7 +13,6 @@ import { assertExists } from '@blocksuite/global/utils';
|
||||
import type { Page, PageMeta } from '@blocksuite/store';
|
||||
import { Workspace } from '@blocksuite/store';
|
||||
import { faker } from '@faker-js/faker';
|
||||
import type {} from '@toeverything/hooks/use-block-suite-page-meta';
|
||||
import { beforeEach, describe, expect, test, vi } from 'vitest';
|
||||
import { WebSocket } from 'ws';
|
||||
import { applyUpdate } from 'yjs';
|
||||
@@ -36,6 +35,12 @@ import {
|
||||
setLoginStorage,
|
||||
} from '../login';
|
||||
|
||||
declare module '@blocksuite/store' {
|
||||
interface PageMeta {
|
||||
isPublic?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error
|
||||
globalThis.WebSocket = WebSocket;
|
||||
|
||||
@@ -110,7 +115,7 @@ beforeEach(async () => {
|
||||
declare global {
|
||||
interface DocumentEventMap {
|
||||
'affine-error': CustomEvent<{
|
||||
code: MessageCode;
|
||||
code: (typeof MessageCode)[keyof typeof MessageCode];
|
||||
}>;
|
||||
}
|
||||
}
|
||||
@@ -165,7 +170,7 @@ describe('api', () => {
|
||||
const listener = vi.fn(
|
||||
(
|
||||
e: CustomEvent<{
|
||||
code: MessageCode;
|
||||
code: (typeof MessageCode)[keyof typeof MessageCode];
|
||||
}>
|
||||
) => {
|
||||
expect(e.detail.code).toBe(MessageCode.loadListFailed);
|
||||
|
||||
Reference in New Issue
Block a user