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:
LongYinan
2023-05-31 20:49:56 +08:00
committed by GitHub
parent 78410f531a
commit 1ea445ab15
81 changed files with 434 additions and 241 deletions
@@ -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);