mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
refactor: remove React.FC (#3694)
This commit is contained in:
10
packages/env/src/workspace.ts
vendored
10
packages/env/src/workspace.ts
vendored
@@ -6,7 +6,7 @@ import type {
|
||||
PassiveDocProvider,
|
||||
Workspace as BlockSuiteWorkspace,
|
||||
} from '@blocksuite/store';
|
||||
import type { FC, PropsWithChildren } from 'react';
|
||||
import type { PropsWithChildren, ReactNode } from 'react';
|
||||
|
||||
import type { Collection } from './filter.js';
|
||||
|
||||
@@ -27,14 +27,14 @@ export interface AffineDownloadProvider extends PassiveDocProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* Download the first binary from local indexeddb
|
||||
* Download the first binary from local IndexedDB
|
||||
*/
|
||||
export interface BroadCastChannelProvider extends PassiveDocProvider {
|
||||
flavour: 'broadcast-channel';
|
||||
}
|
||||
|
||||
/**
|
||||
* Long polling provider with local indexeddb
|
||||
* Long polling provider with local IndexedDB
|
||||
*/
|
||||
export interface LocalIndexedDBBackgroundProvider
|
||||
extends StatusAdapter,
|
||||
@@ -165,6 +165,10 @@ type PageListProps<_Flavour extends keyof WorkspaceRegistry> = {
|
||||
collection: Collection;
|
||||
};
|
||||
|
||||
interface FC<P> {
|
||||
(props: P): ReactNode;
|
||||
}
|
||||
|
||||
export interface WorkspaceUISchema<Flavour extends keyof WorkspaceRegistry> {
|
||||
Header: FC<WorkspaceHeaderProps<Flavour>>;
|
||||
PageDetail: FC<PageDetailProps<Flavour>>;
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { Page } from '@blocksuite/store';
|
||||
import type { Workspace } from '@blocksuite/store';
|
||||
import type { Atom, getDefaultStore } from 'jotai/vanilla';
|
||||
import type { WritableAtom } from 'jotai/vanilla/atom';
|
||||
import type { FC } from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
|
||||
export type Part = 'headerItem' | 'editor' | 'setting' | 'formatBar';
|
||||
|
||||
@@ -22,7 +22,7 @@ export type CallbackMap = {
|
||||
export interface PluginContext {
|
||||
register: <T extends Part>(part: T, callback: CallbackMap[T]) => void;
|
||||
utils: {
|
||||
PluginProvider: FC;
|
||||
PluginProvider: FunctionComponent; // make more clear
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user