ci(mobile): typecheck (#8166)

This commit is contained in:
forehalo
2024-09-09 02:59:50 +00:00
parent 2a135d8a93
commit d31565eb98
4 changed files with 22 additions and 8 deletions

View File

@@ -21,7 +21,6 @@ import {
} from '@blocksuite/blocks';
import { DisposableGroup } from '@blocksuite/global/utils';
import { type AffineEditorContainer } from '@blocksuite/presets';
import type { Doc as BlockSuiteDoc } from '@blocksuite/store';
import {
DocService,
FrameworkScope,
@@ -106,7 +105,7 @@ const DetailPageImpl = () => {
usePageDocumentTitle(title);
const onLoad = useCallback(
(_bsPage: BlockSuiteDoc, editorContainer: AffineEditorContainer) => {
(editorContainer: AffineEditorContainer) => {
// blocksuite editor host
const editorHost = editorContainer.host;
@@ -191,11 +190,7 @@ const DetailPageImpl = () => {
className={styles.journalIconButton}
/>
)}
<PageDetailEditor
pageId={doc.id}
onLoad={onLoad}
docCollection={docCollection}
/>
<PageDetailEditor onLoad={onLoad} />
</AffineErrorBoundary>
</div>
</div>

View File

@@ -126,7 +126,7 @@ export const Component = () => {
if (workspaceNotFound) {
if (
detailDocRoute /* */ &&
environment.isBrowser /* only browser has share page */
environment.isDesktopEdition /* only browser has share page */
) {
return <div>TODO: share page</div>;
}

View File

@@ -19,6 +19,22 @@ import {
import { MobileCurrentWorkspaceModals } from '../../provider/model-provider';
// TODO(@forehalo): reuse the global context with [core/electron]
declare global {
/**
* @internal debug only
*/
// eslint-disable-next-line no-var
var currentWorkspace: Workspace | undefined;
// eslint-disable-next-line no-var
var exportWorkspaceSnapshot: (docs?: string[]) => Promise<void>;
// eslint-disable-next-line no-var
var importWorkspaceSnapshot: () => Promise<void>;
interface WindowEventMap {
'affine:workspace:change': CustomEvent<{ id: string }>;
}
}
export const WorkspaceLayout = ({
meta,
children,

View File

@@ -97,6 +97,9 @@
{
"path": "./packages/frontend/web"
},
{
"path": "./packages/frontend/mobile"
},
{
"path": "./packages/frontend/electron/tsconfig.test.json"
},